Refactor: use vim 0.12 built-in package manager.

- removes lazyvim
- updates cmp config
This commit is contained in:
2026-04-25 10:39:16 -05:00
parent 3d16375b54
commit 32832a8260
11 changed files with 267 additions and 113 deletions
-46
View File
@@ -1,46 +0,0 @@
local lsp_zero = require('lsp-zero')
-- Attach keybindings on LSP connection
local lsp_attach = function(client, bufnr)
lsp_zero.default_keymaps({
buffer = bufnr
})
end
lsp_zero.extend_lspconfig({
lsp_attach = lsp_attach,
capabilities = require('cmp_nvim_lsp').default_capabilities()
})
-- Configure diagnostic signs natively for Neovim v0.11+
vim.diagnostic.config({
signs = {
text = {
[vim.diagnostic.severity.ERROR] = '',
[vim.diagnostic.severity.WARN] = '',
[vim.diagnostic.severity.HINT] = '',
[vim.diagnostic.severity.INFO] = '»'
}
}
})
require('mason').setup({})
require('mason-lspconfig').setup({
ensure_installed = {'lua_ls', 'ts_ls', 'eslint', 'gopls', 'rust_analyzer'},
handlers = {function(server_name)
-- Map legacy server names to their modern equivalents
if server_name == 'tsserver' then
server_name = 'ts_ls'
end
-- Verify the server configuration is accessible to prevent indexing errors
local has_config, _ = pcall(function()
return require('lspconfig')[server_name]
end)
if has_config then
require('lspconfig')[server_name].setup({})
else
vim.notify("LSP configuration not accessible for: " .. server_name, vim.log.levels.WARN)
end
end}
})
-11
View File
@@ -1,11 +0,0 @@
local cmp = require('cmp')
cmp.setup({
mapping = cmp.mapping.preset.insert({
['<CR>'] = cmp.mapping.confirm({select = false}),
}),
preselect = 'item',
completion = {
completeopt = 'menu,menuone,noinsert'
},
})