feat!(nvim): Migrate to v0.11 built-in lsp configs

This commit is contained in:
js0ny 2025-04-02 20:09:30 +01:00
parent 4da1667c54
commit 9315c6e55d
16 changed files with 303 additions and 31 deletions

View file

@ -1,14 +1,31 @@
local nvim_version = vim.version()
if nvim_version.minor ~= 11 then
return
end
vim.diagnostic.config({
virtual_lines = true,
})
vim.lsp.enable({
"clangd",
"luals",
})
-- vim.lsp.enable({
-- "clangd",
-- "luals",
-- })
local lsp_configs = {}
for _, v in ipairs(vim.api.nvim_get_runtime_file('lsp/*', true)) do
local name = vim.fn.fnamemodify(v, ':t:r')
lsp_configs[name] = true
end
vim.lsp.enable(vim.tbl_keys(lsp_configs))
-- Delete 0.11 new gr- keymaps
vim.keymap.del({ "n" }, "grn")
vim.keymap.del({ "n", "x" }, "gra")
vim.keymap.del({ "n" }, "gri")