mirror of
https://github.com/WarrenHood/dotfiles.git
synced 2025-04-29 15:45:00 +01:00
Added lsp hover and goto definition keybinds
This commit is contained in:
parent
ac6d86d869
commit
0e30acac19
|
@ -11,7 +11,12 @@ local lspconfig = require('lspconfig')
|
|||
require("mason-lspconfig").setup_handlers({
|
||||
-- default handler
|
||||
function(server_name) -- default handler (optional)
|
||||
require("lspconfig")[server_name].setup {}
|
||||
require("lspconfig")[server_name].setup {
|
||||
on_attach = function()
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, { buffer = 0 })
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, { buffer = 0, desc = "Go to definition"})
|
||||
end
|
||||
}
|
||||
end,
|
||||
-- Overrides
|
||||
["sumneko_lua"] = function()
|
||||
|
|
Loading…
Reference in a new issue