From d579cafbefaffb9b18401038dc51b7e2b460e734 Mon Sep 17 00:00:00 2001 From: pr0c3550r Date: Fri, 10 Feb 2023 22:02:52 +0100 Subject: [PATCH] added keymaps and jq to null-ls --- nvim/.config/nvim/lua/plugin/null-ls.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nvim/.config/nvim/lua/plugin/null-ls.lua b/nvim/.config/nvim/lua/plugin/null-ls.lua index fcdda5c..bf87f4a 100644 --- a/nvim/.config/nvim/lua/plugin/null-ls.lua +++ b/nvim/.config/nvim/lua/plugin/null-ls.lua @@ -27,6 +27,15 @@ return { on_attach = function(client, bufnr) local bufopts = { noremap = true, silent = true, buffer = bufnr } vim.keymap.set('n', 'a', vim.lsp.buf.code_action, bufopts) + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) + vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) + vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) + vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) + vim.keymap.set('n', 'a', vim.lsp.buf.code_action, bufopts) + vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) + vim.keymap.set('n', 'fm', function() vim.lsp.buf.format { async = true } end, bufopts) end, sources = { null_ls.builtins.diagnostics.trail_space.with{ @@ -34,6 +43,7 @@ return { }, null_ls.builtins.diagnostics.shellcheck, null_ls.builtins.code_actions.shellcheck, + null_ls.builtins.formatting.jq, }, } end,