From 66439533666e8b80c8eae377de2df00be86030c1 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 21 Feb 2024 11:35:29 +0100 Subject: nvim: Minor config fixes --- .config/nvim/after/plugin/lsp.lua | 5 ++++- .config/nvim/after/plugin/treesitter.lua | 3 +-- .config/nvim/lua/mango/remap.lua | 5 ++--- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to '.config') diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua index 12e1025..e0684e2 100644 --- a/.config/nvim/after/plugin/lsp.lua +++ b/.config/nvim/after/plugin/lsp.lua @@ -1,6 +1,8 @@ local conf = require('lspconfig') -conf.clangd.setup {} +conf.clangd.setup { + cmd = {'clangd', '-header-insertion=never'} +} conf.gopls.setup {} conf.rust_analyzer.setup {} conf.lua_ls.setup { @@ -32,6 +34,7 @@ vim.api.nvim_create_autocmd('LspAttach', { vim.keymap.set(mode, map, fn, { buffer = ev.buf }) end + vim.diagnostic.disable() vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc' remap('n', 'K', vim.lsp.buf.hover) remap('n', 'gd', vim.lsp.buf.definition) diff --git a/.config/nvim/after/plugin/treesitter.lua b/.config/nvim/after/plugin/treesitter.lua index e069683..dfd2cc0 100644 --- a/.config/nvim/after/plugin/treesitter.lua +++ b/.config/nvim/after/plugin/treesitter.lua @@ -43,8 +43,7 @@ require('nvim-treesitter.configs').setup { keymaps = { init_selection = '', node_incremental = '', - scope_incremental = '', - node_decremental = '', + node_decremental = '', } }, diff --git a/.config/nvim/lua/mango/remap.lua b/.config/nvim/lua/mango/remap.lua index 787ae1e..a22632e 100644 --- a/.config/nvim/lua/mango/remap.lua +++ b/.config/nvim/lua/mango/remap.lua @@ -27,9 +27,8 @@ remap('n', '', 'zz') remap('n', 'n', 'nzzzv') remap('n', 'N', 'Nzzzv') --- Swap the jump-to-mark bindings --- remap('nv', "'", '`') --- remap('nv', '`', "'") +-- Compile code quickly +remap('n', 'M', ':make') -- Transpose characters; for some reason it has a noticable delay if I just give -- a string instead of lambda functions -- cgit v1.2.3