update cmp

This commit is contained in:
2025-08-22 18:31:58 -07:00
parent eed75769df
commit 22b43c6ddf
2 changed files with 6 additions and 17 deletions

View File

@@ -4,7 +4,6 @@ return {
vim.notify = require("notify") vim.notify = require("notify")
local servers = { local servers = {
"bashls", "bashls",
-- "jedi_language_server",
"basedpyright", "basedpyright",
"jsonls", "jsonls",
-- "yamlls", -- "yamlls",
@@ -23,22 +22,11 @@ return {
"gopls", "gopls",
"ruff", "ruff",
} }
-- Define the highlight color for float border local capabilities = require("cmp_nvim_lsp").default_capabilities()
vim.api.nvim_set_hl(0, "FloatBorder", { fg = "#89b4fa", bold = true })
local border = {
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
}
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
if lsp == "lua_ls" then if lsp == "lua_ls" then
vim.lsp.config("lua_ls", { vim.lsp.config("lua_ls", {
capabilities = capabilities,
on_init = function(client) on_init = function(client)
if client.workspace_folders then if client.workspace_folders then
local path = client.workspace_folders[1].name local path = client.workspace_folders[1].name
@@ -84,6 +72,7 @@ return {
vim.lsp.enable(lsp) vim.lsp.enable(lsp)
elseif lsp == "basedpyright" then elseif lsp == "basedpyright" then
vim.lsp.config(lsp, { vim.lsp.config(lsp, {
capabilities = capabilities,
settings = { settings = {
basedpyright = { basedpyright = {
analysis = { analysis = {
@@ -125,6 +114,7 @@ return {
desc = "LSP: Disable hover capability from Ruff", desc = "LSP: Disable hover capability from Ruff",
}) })
vim.lsp.config(lsp, { vim.lsp.config(lsp, {
capabilities = capabilities,
init_options = { init_options = {
settings = { settings = {
configuration = vim.fn.stdpath("config") .. "lua/utils/ruff.toml", configuration = vim.fn.stdpath("config") .. "lua/utils/ruff.toml",
@@ -132,6 +122,7 @@ return {
}, },
}) })
end end
vim.lsp.config(lsp, { capabilities = capabilities })
vim.lsp.enable(lsp) vim.lsp.enable(lsp)
end end
end, end,

View File

@@ -6,7 +6,7 @@ return {
"hrsh7th/cmp-cmdline", "hrsh7th/cmp-cmdline",
"hrsh7th/cmp-nvim-lsp-signature-help", "hrsh7th/cmp-nvim-lsp-signature-help",
"hrsh7th/cmp-nvim-lsp-document-symbol", "hrsh7th/cmp-nvim-lsp-document-symbol",
-- "hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-nvim-lsp",
-- "hrsh7th/cmp-path", -- "hrsh7th/cmp-path",
"rafamadriz/friendly-snippets", "rafamadriz/friendly-snippets",
"Jezda1337/nvim-html-css", "Jezda1337/nvim-html-css",
@@ -175,8 +175,6 @@ return {
{ name = "copilot", group_index = 1 }, { name = "copilot", group_index = 1 },
{ name = "codecompanion", group_index = 2 }, { name = "codecompanion", group_index = 2 },
{ name = "async_path", group_index = 2 }, { name = "async_path", group_index = 2 },
-- { name = "path", group_index = 2 },
-- { name = "cmdline", option = { ignore_cmds = { "Man", "!" } } },
{ name = "nvim_lsp_document_symbol", group_index = 2 }, { name = "nvim_lsp_document_symbol", group_index = 2 },
{ name = "luasnip", group_index = 2 }, -- For luasnip users. { name = "luasnip", group_index = 2 }, -- For luasnip users.
{ name = "render-markdown", group_index = 2 }, { name = "render-markdown", group_index = 2 },