update lsp keymappings
This commit is contained in:
parent
b47f21ba1b
commit
fa0957ddc6
2 changed files with 10 additions and 13 deletions
|
@ -51,15 +51,15 @@ local on_attach = function(client, bufnr)
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, ...)
|
vim.api.nvim_buf_set_keymap(bufnr, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true, buffer=0 }
|
||||||
buf_set_keymap("n", "gd", "<cmd>Telescope lsp_definitions<CR>", opts)
|
vim.keymap.set("n", "gd", "<cmd>Telescope lsp_definitions<CR>", opts)
|
||||||
buf_set_keymap("n", "gD", "<cmd>Telescope lsp_implementations<CR>", opts)
|
vim.keymap.set("n", "gD", "<cmd>Telescope lsp_implementations<CR>", opts)
|
||||||
vim.keymap.set("n", "gf", vim.lsp.buf.format)
|
vim.keymap.set("n", "gf", function() vim.lsp.buf.format {async = true} end, opts)
|
||||||
vim.keymap.set("n", "gh", vim.lsp.buf.hover)
|
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||||
vim.keymap.set("n", "ge", vim.diagnostic.open_float)
|
vim.keymap.set("n", "ge", vim.diagnostic.open_float, opts)
|
||||||
vim.keymap.set("n", "gs", vim.lsp.buf.signature_help)
|
vim.keymap.set("n", "gs", vim.lsp.buf.signature_help, opts)
|
||||||
vim.keymap.set("n", "gR", vim.lsp.buf.rename)
|
vim.keymap.set("n", "gR", vim.lsp.buf.rename, opts)
|
||||||
vim.keymap.set("n", "gH", vim.lsp.buf.code_action)
|
vim.keymap.set("n", "gH", vim.lsp.buf.code_action, opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- LSP INSTALLER
|
-- LSP INSTALLER
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
require("trouble").setup {
|
require("trouble").setup {}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>xx", "<cmd>TroubleToggle<cr>",
|
vim.keymap.set("n", "<leader>xx", "<cmd>TroubleToggle<cr>",
|
||||||
{silent = true, noremap = true}
|
{silent = true, noremap = true}
|
||||||
|
|
Loading…
Add table
Reference in a new issue