Compare commits

..

2 commits

Author SHA1 Message Date
fc70aa6d49 Some plugin updates + misc cleanup 2025-12-27 17:04:10 -05:00
a8136d4297 lsp: migrate away from lsp-zero 2025-06-18 20:10:11 +00:00
10 changed files with 58 additions and 48 deletions

View file

@ -1,5 +1,5 @@
{
"LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" },
"LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
"catppuccin": { "branch": "main", "commit": "ce8d176faa4643e026e597ae3c31db59b63cef09" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
@ -9,7 +9,6 @@
"gitsigns.nvim": { "branch": "main", "commit": "bf77caa5da671f5bab16e4792711d5aa288e8db0" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lsp-zero.nvim": { "branch": "v3.x", "commit": "77550f2f6cbf0959ef1583d845661af075f3442b" },
"lspkind.nvim": { "branch": "master", "commit": "3ddd1b4edefa425fda5a9f95a4f25578727c0bb3" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"mini.icons": { "branch": "main", "commit": "ff2e4f1d29f659cc2bad0f9256f2f6195c6b2428" },

View file

@ -1,6 +1,6 @@
return {
{
"VonHeikemen/lsp-zero.nvim",
"neovim/nvim-lspconfig",
opts = {
my_servers = {
bashls = {},

View file

@ -1,6 +1,6 @@
return {
{
"VonHeikemen/lsp-zero.nvim",
"neovim/nvim-lspconfig",
opts = {
my_servers = {
clangd = {

View file

@ -1,6 +1,6 @@
return {
{
"VonHeikemen/lsp-zero.nvim",
"neovim/nvim-lspconfig",
opts = {
my_servers = {
gopls = {},

View file

@ -1,6 +1,6 @@
return {
{
"VonHeikemen/lsp-zero.nvim",
"neovim/nvim-lspconfig",
opts = {
my_servers = {
pylsp = {},

View file

@ -1,6 +1,6 @@
return {
{
"VonHeikemen/lsp-zero.nvim",
"neovim/nvim-lspconfig",
opts = {
my_servers = {
racket_langserver = {},

View file

@ -1,6 +1,6 @@
return {
{
"VonHeikemen/lsp-zero.nvim",
"neovim/nvim-lspconfig",
opts = {
my_servers = {
rust_analyzer = {

View file

@ -1,6 +1,6 @@
return {
{
"VonHeikemen/lsp-zero.nvim",
"neovim/nvim-lspconfig",
opts = {
my_servers = {
texlab = {},

View file

@ -29,7 +29,7 @@ vim.api.nvim_create_autocmd("FileType", {
return {
{
"VonHeikemen/lsp-zero.nvim",
"neovim/nvim-lspconfig",
opts = {
my_servers = {
tinymist = {

View file

@ -1,21 +1,22 @@
return {
{
"VonHeikemen/lsp-zero.nvim",
branch = "v3.x",
dependencies = {
"neovim/nvim-lspconfig",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"SmiteshP/nvim-navic",
},
opts = {
-- Servers configured in my_servers will automatically have
-- require("lspconfig")[server].setup(server_opts) called on them
-- Servers configured in my_servers will be automatically configured
my_servers = {},
},
config = function(_, opts)
local lsp_zero = require("lsp-zero")
local lspconfig = require("lspconfig")
-- configure keybinds + navic at attach time
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args)
local client = assert(vim.lsp.get_client_by_id(args.data.client_id))
-- enable lsp-zero
lsp_zero.on_attach(function(client, buffnr)
-- set lsp keybinds
-- NOTE: this check is needed since crates.nvim will overwrite "K"
if not vim.fn.mapcheck("K", "n") then
@ -39,16 +40,21 @@ return {
-- Use navic for context hints
if client.supports_method("textDocument/documentSymbol") then
require("nvim-navic").attach(client, buffnr)
require("nvim-navic").attach(client, args.buf)
end
end)
end,
})
-- use pretty icons instead of 'W', 'E', ...
lsp_zero.set_sign_icons({
error = '',
warn = '',
hint = '',
info = '»'
vim.diagnostic.config({
signs = {
text = {
[vim.diagnostic.severity.ERROR] = '',
[vim.diagnostic.severity.WARN] = '',
[vim.diagnostic.severity.HINT] = '',
[vim.diagnostic.severity.INFO] = '»',
},
},
})
-- disable LSP logging
@ -58,7 +64,7 @@ return {
local servers = opts.my_servers
for server, server_opts in pairs(servers) do
vim.lsp.config(server, server_opts)
vim.lsp.enable({ server })
vim.lsp.enable(server)
end
end,
},
@ -122,6 +128,8 @@ return {
{ name = "buffer" },
}),
mapping = {
["<Up>"] = cmp.mapping.select_prev_item({}, {'i'}),
["<Down>"] = cmp.mapping.select_next_item({}, {'i'}),
-- Use "Enter" for auto completion
["<cr>"] = cmp.mapping.confirm({select = false}),
["<Tab>"] = tab_mapping,
@ -156,6 +164,9 @@ return {
event = "LspAttach",
opts = {
scope = "line",
-- don't show diagnostics in insert mode
toggle_event = { "InsertEnter" },
},
},