diff --git a/home/.local/Apps/neovim-distros/lunarvim/config.lua b/home/.local/Apps/neovim-distros/lunarvim/config.lua index b8cba54..d8c2e52 100644 --- a/home/.local/Apps/neovim-distros/lunarvim/config.lua +++ b/home/.local/Apps/neovim-distros/lunarvim/config.lua @@ -21,6 +21,7 @@ lvim.format_on_save = { lvim.leader = "space" -- add your own keymapping lvim.keys.normal_mode[""] = ":w" +lvim.keys.normal_mode[''] = ":Telescope find_files" -- lvim.keys.normal_mode[""] = ":BufferLineCycleNext" -- lvim.keys.normal_mode[""] = ":BufferLineCyclePrev" @@ -74,15 +75,14 @@ lvim.builtin.treesitter.auto_install = true -- end -- -- linters and formatters --- local formatters = require "lvim.lsp.null-ls.formatters" --- formatters.setup { --- { command = "stylua" }, --- { --- command = "prettier", --- extra_args = { "--print-width", "100" }, --- filetypes = { "typescript", "typescriptreact" }, --- }, --- } +local formatters = require "lvim.lsp.null-ls.formatters" +formatters.setup { + { + command = "prettier", + extra_args = { "--print-width", "100" }, + filetypes = { "typescript", "typescriptreact", "javascript", "javascriptreact" }, + }, +} -- local linters = require "lvim.lsp.null-ls.linters" -- linters.setup { -- { command = "flake8", filetypes = { "python" } }, @@ -109,6 +109,12 @@ lvim.builtin.treesitter.auto_install = true -- end, -- }) +local actions = require("telescope.actions") +lvim.builtin.telescope.pickers.find_files.mappings = { + i = { + [''] = actions.smart_send_to_qflist + actions.open_qflist, + } +} vim.cmd([[ command! -nargs=+ Gr :silent execute 'grep! -nr "" | copen' @@ -191,8 +197,26 @@ vmap gv imap nmap :BufferLineCyclePrev nmap :BufferLineCycleNext + +let g:user_emmet_mode='inv' +let g:user_emmet_install_global = 0 +autocmd FileType html,css,vue,jsx,php EmmetInstall +nmap :execute 'Telescope live_grep default_text=' . expand('') ]]) +-- imap (emmet-expand-abbr) +vim.keymap.set('i', '', '(emmet-expand-abbr)') + +vim.keymap.set('n', '', function() require('dap').continue() end) +vim.keymap.set('n', '', function() require('dap').step_over() end) +vim.keymap.set('n', '', function() require('dap').step_into() end) +vim.keymap.set('n', '', function() require('dap').step_out() end) lvim.builtin.dap.active = true +lvim.builtin.which_key.mappings["l"]["f"] = { + function() + require("lvim.lsp.utils").format { timeout_ms = 2000 } + end, + "Format", +} local dap = require('dap') dap.adapters.php = { @@ -212,7 +236,59 @@ dap.configurations.php = { } lvim.plugins = { - { - "gpanders/editorconfig.nvim", + { + "gpanders/editorconfig.nvim", + }, + { 'mattn/emmet-vim' }, + { + "tpope/vim-fugitive", + cmd = { + "G", + "Git", + "Gdiffsplit", + "Gread", + "Gwrite", + "Ggrep", + "GMove", + "GDelete", + "GBrowse", + "GRemove", + "GRename", + "Glgrep", + "Gedit" }, + ft = { "fugitive" } + }, + { + "iamcco/markdown-preview.nvim", + build = "cd app && npm install", + ft = "markdown", + config = function() + vim.g.mkdp_auto_start = 1 + end, + }, + { + "turbio/bracey.vim", + cmd = { "Bracey", "BracyStop", "BraceyReload", "BraceyEval" }, + build = "npm install --prefix server", + lazy = true, + }, + { + "kylechui/nvim-surround", + config = function() + require("nvim-surround").setup({ + -- Configuration here, or leave empty to use defaults + }) + end + }, + { + 'rmagatti/auto-session', + -- cmd = { 'SaveSession', 'RestoreSession', 'RestoreSessionFromFile', 'DeleteSession', 'Autosession', }, + config = function() + require("auto-session").setup { + log_level = "error", + auto_session_create_enabled = false, + } + end + } }