diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-03-06 04:09:19 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-03-06 04:09:19 +0800 |
commit | c4b66635e46d3a38e845dc7a6219a6acfff364bc (patch) | |
tree | 23fc4737f050299086e95b32ec55fa4baae3692b | |
parent | f77e7c85b1a7a18838d5c727345a1b5a5d6298b1 (diff) | |
download | crupest-c4b66635e46d3a38e845dc7a6219a6acfff364bc.tar.gz crupest-c4b66635e46d3a38e845dc7a6219a6acfff364bc.tar.bz2 crupest-c4b66635e46d3a38e845dc7a6219a6acfff364bc.zip |
feat(nvim): remove unused lsp config.
-rw-r--r-- | store/home/config/nvim/lua/crupest/nvim/lsp/c.lua | 2 | ||||
-rw-r--r-- | store/home/config/nvim/lua/crupest/nvim/lsp/init.lua | 25 |
2 files changed, 1 insertions, 26 deletions
diff --git a/store/home/config/nvim/lua/crupest/nvim/lsp/c.lua b/store/home/config/nvim/lua/crupest/nvim/lsp/c.lua index bb1f6f7..6080510 100644 --- a/store/home/config/nvim/lua/crupest/nvim/lsp/c.lua +++ b/store/home/config/nvim/lua/crupest/nvim/lsp/c.lua @@ -13,7 +13,7 @@ local function setup() lspconfig.clangd.setup { cmd = { clangd }, on_attach = function(_, bufnr) - vim.keymap.set('n', '<space>s', "<cmd>ClangdSwitchSourceHeader<cr>", { + vim.keymap.set('n', 'grs', "<cmd>ClangdSwitchSourceHeader<cr>", { buffer = bufnr }) end diff --git a/store/home/config/nvim/lua/crupest/nvim/lsp/init.lua b/store/home/config/nvim/lua/crupest/nvim/lsp/init.lua index 0fd29a3..ba11087 100644 --- a/store/home/config/nvim/lua/crupest/nvim/lsp/init.lua +++ b/store/home/config/nvim/lua/crupest/nvim/lsp/init.lua @@ -17,31 +17,6 @@ local function setup() lspconfig.bashls.setup {} require("crupest.nvim.lsp.c").setup() require("crupest.nvim.lsp.lua").setup() - - -- Use LspAttach auto command to only map the following keys - -- after the language server attaches to the current buffer - vim.api.nvim_create_autocmd('LspAttach', { - group = vim.api.nvim_create_augroup('UserLspConfig', {}), - callback = function(ev) - -- Buffer local mappings. - -- See `:help vim.lsp.*` for documentation on any of the below functions - local opts = { buffer = ev.buf } - vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) - vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) - vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts) - vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts) - vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts) - vim.keymap.set('n', '<space>wl', function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, opts) - vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, opts) - vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts) - vim.keymap.set({ 'n', 'v' }, '<space>ca', vim.lsp.buf.code_action, opts) - vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts) - vim.keymap.set('n', '<space>f', vim.lsp.buf.format, opts) - end, - }) end |