mirror of
https://github.com/WarrenHood/dotfiles.git
synced 2025-04-30 00:24:59 +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({
|
require("mason-lspconfig").setup_handlers({
|
||||||
-- default handler
|
-- default handler
|
||||||
function(server_name) -- default handler (optional)
|
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,
|
end,
|
||||||
-- Overrides
|
-- Overrides
|
||||||
["sumneko_lua"] = function()
|
["sumneko_lua"] = function()
|
||||||
|
|
Loading…
Reference in a new issue