From d3e325db8631e05ee6d302475b960bf4c8af54f4 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 7 Feb 2025 16:27:50 +0100 Subject: [PATCH] nvim: Fix small lsp issues --- nvim/.config/nvim/lua/plugins/lsp.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins/lsp.lua b/nvim/.config/nvim/lua/plugins/lsp.lua index 0618215..b34336f 100644 --- a/nvim/.config/nvim/lua/plugins/lsp.lua +++ b/nvim/.config/nvim/lua/plugins/lsp.lua @@ -112,7 +112,7 @@ local lsp = { lspconfig.marksman.setup({ filetypes = { "markdown", "quarto" }, - on_attach = function(client, bufnr) + on_attach = function(client, _) -- TODO: for some reason this stays true even after rootdir switch? if client.config.in_zk_notebook then local default_handler = vim.diagnostic.handlers.virtual_text @@ -132,7 +132,7 @@ local lsp = { default_handler.hide(...) end, } - local default_handler = vim.diagnostic.handlers.signs + default_handler = vim.diagnostic.handlers.signs vim.diagnostic.handlers.signs = { show = function(namespace, bufnrr, diagnostics, opts) for i, diagnostic in ipairs(diagnostics) do @@ -164,7 +164,7 @@ local lsp = { -- ensure python virtualenv is determined automatically on lsp start -- we primarily use pyright for cmp lsp completion & hover info lspconfig.basedpyright.setup({ - on_attach = function(client, bufnr) + on_attach = function(client, _) require("core.util").set_python_env() if python_path == nil then python_path, _ = vim.fn.expand(require("core.util").get_python_venv_bin(client.config.root_dir)) @@ -186,7 +186,7 @@ local lsp = { }, }) lspconfig.ruff.setup({ - on_attach = function(client, bufnr) + on_attach = function(client, _) require("core.util").set_python_env() client.server_capabilities.hoverProvider = false -- we use pyright for hover info if python_path == nil then @@ -209,7 +209,7 @@ local lsp = { pattern = "SpellEnable", callback = function() lspconfig.ltex.setup({ - on_attach = function(client, bufnr) + on_attach = function(_, _) if require("core.util").is_available("ltex_extra") then require("ltex_extra").setup() end