added keymaps and jq to null-ls
This commit is contained in:
parent
30ad4308a5
commit
d579cafbef
1 changed files with 10 additions and 0 deletions
|
@ -27,6 +27,15 @@ return {
|
|||
on_attach = function(client, bufnr)
|
||||
local bufopts = { noremap = true, silent = true, buffer = bufnr }
|
||||
vim.keymap.set('n', '<space>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', '<leader>K', vim.lsp.buf.hover, bufopts)
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
|
||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
|
||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
|
||||
vim.keymap.set('n', '<space>a', vim.lsp.buf.code_action, bufopts)
|
||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
||||
vim.keymap.set('n', '<space>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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue