1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2025-07-03 03:09:26 +00:00

[neovim] Replace lsp-cmp by blink

This commit is contained in:
2025-02-02 19:28:41 +01:00
parent b40fa30e54
commit 302db332f9
10 changed files with 97 additions and 121 deletions

View File

@ -1,8 +1,48 @@
require("plugins.lsp.mason")
require("plugins.lsp.handlers").setup()
require("plugins.lsp.none-ls")
require("plugins.lsp.conform")
require("plugins.lsp.lsp-saga")
local win = require("lspconfig.ui.windows")
win.default_options.border = "rounded"
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",
})
vim.diagnostic.config(config)

View File

@ -38,8 +38,7 @@ local lspconfig = require("lspconfig")
for _, server in pairs(servers) do
if server ~= "yamlls" then
local opts = {
on_attach = require("plugins.lsp.handlers").on_attach,
capabilities = require("plugins.lsp.handlers").capabilities,
capabilities = require("blink.cmp").get_lsp_capabilities(),
}
server = vim.split(server, "@")[1]