diff options
-rw-r--r-- | plugin/lsp-config.lua | 7 | ||||
-rw-r--r-- | plugin/mappings.lua | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/plugin/lsp-config.lua b/plugin/lsp-config.lua index b5b5633..0b3e2cb 100644 --- a/plugin/lsp-config.lua +++ b/plugin/lsp-config.lua @@ -11,7 +11,7 @@ local lsp_on_attach = function(client, bufnr) vim.keymap.set('n', 'gR', vim.lsp.buf.rename, opts) vim.keymap.set('n', 'gi', require('telescope.builtin').lsp_implementations, opts) vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) - vim.keymap.set('n', '<C-n>', vim.diagnostic.setqflist, opts) + vim.keymap.set('n', '<C-q>', vim.diagnostic.setqflist, opts) vim.keymap.set('n', '<leader>=', vim.lsp.buf.format, opts) vim.keymap.set('n', '<C-m>', vim.lsp.buf.format, opts) vim.keymap.set('i', '<C-o>', vim.lsp.buf.signature_help, opts) @@ -62,21 +62,26 @@ require('lspconfig')['gopls'].setup { } require('lspconfig')['clangd'].setup { + capabilities = capabilities, on_attach = lsp_on_attach, } require('lspconfig')['pylsp'].setup { + capabilities = capabilities, on_attach = lsp_on_attach, } require('lspconfig')['ocamllsp'].setup { + capabilities = capabilities, on_attach = lsp_on_attach, } require('lspconfig')['zls'].setup { + capabilities = capabilities, on_attach = lsp_on_attach, } require('lspconfig')['texlab'].setup { + capabilities = capabilities, on_attach = lsp_on_attach, } diff --git a/plugin/mappings.lua b/plugin/mappings.lua index 8fd435f..d46955f 100644 --- a/plugin/mappings.lua +++ b/plugin/mappings.lua @@ -4,6 +4,8 @@ local map = vim.api.nvim_set_keymap map('i', 'jk', '<esc>', {noremap = true, silent = true}) map('i', 'kj', '<esc>', {noremap = true, silent = true}) +map('n', '<Esc>', '<cmd>nohlsearch<CR>', {}) + -- TAB in normal mode will move to next buffer map('n', '<TAB>', ':bnext<cr>', {noremap = true, silent = true}) @@ -19,7 +21,6 @@ map('n', '<Leader>1', ':only<cr>', {noremap = true}) map('n', '<Leader>c', ':close<cr>', {noremap = true}) map('n', '<Leader>v', ':vsplit<cr><cr>', {noremap = true}) map('n', '<Leader>s', ':split<cr><cr>', {noremap = true}) -map('n', '<C-s>', ':split<cr>', {noremap = true, silent = true}) map('n', '<Leader>d', ':bd!<cr>', {noremap = true}) -- Placeholders |