neovim LSP
This commit is contained in:
@@ -21,5 +21,5 @@ local opts = {
|
||||
checker = { enabled = true },
|
||||
}
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("vim-options")
|
||||
require("lazy").setup("plugins", opts)
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user