From 5fa2563ae18c7126653e254fca3db800a0c42910 Mon Sep 17 00:00:00 2001 From: Daniel Carrillo Date: Sat, 8 Feb 2025 18:11:33 +0100 Subject: [PATCH] [neovim] Remove unused file --- .config/nvim/lua/plugins/lsp/handlers.lua | 75 ----------------------- 1 file changed, 75 deletions(-) delete mode 100644 .config/nvim/lua/plugins/lsp/handlers.lua diff --git a/.config/nvim/lua/plugins/lsp/handlers.lua b/.config/nvim/lua/plugins/lsp/handlers.lua deleted file mode 100644 index 8e19c79..0000000 --- a/.config/nvim/lua/plugins/lsp/handlers.lua +++ /dev/null @@ -1,75 +0,0 @@ -local M = {} - -local cmp_nvim_lsp = require("cmp_nvim_lsp") - -M.capabilities = cmp_nvim_lsp.default_capabilities() -M.capabilities.textDocument.completion.completionItem.snippetSupport = true - -M.setup = function() - local signs = { - { name = "DiagnosticSignError", text = "" }, - { name = "DiagnosticSignWarn", text = "" }, - { name = "DiagnosticSignHint", text = "" }, - { name = "DiagnosticSignInfo", text = "" }, - } - - for _, sign in ipairs(signs) do - vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" }) - end - - local config = { - virtual_text = false, - signs = { - active = signs, - }, - update_in_insert = true, - underline = true, - severity_sort = true, - float = { - focusable = true, - style = "minimal", - border = "rounded", - source = "always", - header = "", - prefix = "", - }, - } - - vim.diagnostic.config(config) - - vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { - border = "rounded", - }) - - vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { - border = "rounded", - }) -end - -M.on_attach = function(client) - if client.name == "lua_ls" then - client.server_capabilities.document_formatting = false - end - - if client.name == "ruff-lsp" then - client.server_capabilities.hover = false - end - - if client.name == "gopls" then - if not client.server_capabilities.semanticTokensProvider then - local semantic = client.config.capabilities.textDocument.semanticTokens - client.server_capabilities.semanticTokensProvider = { - full = true, - legend = { - tokenTypes = semantic.tokenTypes, - tokenModifiers = semantic.tokenModifiers, - }, - range = true, - } - end - end - - require("illuminate").on_attach(client) -end - -return M