From 22b43c6ddfbe8e5002bb1bb6cb4af2570c86536d Mon Sep 17 00:00:00 2001 From: sudacode Date: Fri, 22 Aug 2025 18:31:58 -0700 Subject: [PATCH] update cmp --- .config/nvim/lua/plugins/lspconfig.lua | 19 +++++-------------- .config/nvim/lua/plugins/nvim-cmp.lua | 4 +--- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/.config/nvim/lua/plugins/lspconfig.lua b/.config/nvim/lua/plugins/lspconfig.lua index efc6358..63a4efa 100644 --- a/.config/nvim/lua/plugins/lspconfig.lua +++ b/.config/nvim/lua/plugins/lspconfig.lua @@ -4,7 +4,6 @@ return { vim.notify = require("notify") local servers = { "bashls", - -- "jedi_language_server", "basedpyright", "jsonls", -- "yamlls", @@ -23,22 +22,11 @@ return { "gopls", "ruff", } - -- Define the highlight color for float border - vim.api.nvim_set_hl(0, "FloatBorder", { fg = "#89b4fa", bold = true }) - local border = { - { "╭", "FloatBorder" }, - { "─", "FloatBorder" }, - { "╮", "FloatBorder" }, - { "│", "FloatBorder" }, - { "╯", "FloatBorder" }, - { "─", "FloatBorder" }, - { "╰", "FloatBorder" }, - { "│", "FloatBorder" }, - } - + local capabilities = require("cmp_nvim_lsp").default_capabilities() for _, lsp in ipairs(servers) do if lsp == "lua_ls" then vim.lsp.config("lua_ls", { + capabilities = capabilities, on_init = function(client) if client.workspace_folders then local path = client.workspace_folders[1].name @@ -84,6 +72,7 @@ return { vim.lsp.enable(lsp) elseif lsp == "basedpyright" then vim.lsp.config(lsp, { + capabilities = capabilities, settings = { basedpyright = { analysis = { @@ -125,6 +114,7 @@ return { desc = "LSP: Disable hover capability from Ruff", }) vim.lsp.config(lsp, { + capabilities = capabilities, init_options = { settings = { configuration = vim.fn.stdpath("config") .. "lua/utils/ruff.toml", @@ -132,6 +122,7 @@ return { }, }) end + vim.lsp.config(lsp, { capabilities = capabilities }) vim.lsp.enable(lsp) end end, diff --git a/.config/nvim/lua/plugins/nvim-cmp.lua b/.config/nvim/lua/plugins/nvim-cmp.lua index 31c05e6..df40695 100644 --- a/.config/nvim/lua/plugins/nvim-cmp.lua +++ b/.config/nvim/lua/plugins/nvim-cmp.lua @@ -6,7 +6,7 @@ return { "hrsh7th/cmp-cmdline", "hrsh7th/cmp-nvim-lsp-signature-help", "hrsh7th/cmp-nvim-lsp-document-symbol", - -- "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-nvim-lsp", -- "hrsh7th/cmp-path", "rafamadriz/friendly-snippets", "Jezda1337/nvim-html-css", @@ -175,8 +175,6 @@ return { { name = "copilot", group_index = 1 }, { name = "codecompanion", 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 = "luasnip", group_index = 2 }, -- For luasnip users. { name = "render-markdown", group_index = 2 },