neovim LSP

This commit is contained in:
2025-08-05 21:01:07 -04:00
parent 4139f4e40a
commit e1991fa1d8
3 changed files with 30 additions and 7 deletions

View File

@@ -21,5 +21,5 @@ local opts = {
checker = { enabled = true },
}
-- Setup lazy.nvim
require("vim-options")
require("lazy").setup("plugins", opts)

View File

@@ -1,7 +1,30 @@
return {
{
"neovim/nvim-lspconfig",
lazy = false,
config = function()
vim.lsp.enable("zls")
vim.lsp.enable("clangd")
local lspconfig = require("lspconfig")
lspconfig.lua_ls.setup({})
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
vim.keymap.set("n", "<leader>gd", vim.lsp.buf.definition, {})
vim.keymap.set("n", "<leader>gr", vim.lsp.buf.references, {})
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {})
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, {})
end,
},
{
"williamboman/mason.nvim",
lazy = false,
config = function()
require("mason").setup()
end
},
{
"williamboman/mason-lspconfig.nvim",
lazy = false,
opts = {
auto_install = true,
},
}
}