From c9b61be4fc132cc2abb39e1a628950f18e1b53fb Mon Sep 17 00:00:00 2001 From: Dmitri Date: Fri, 13 Jun 2025 14:06:47 +0200 Subject: [PATCH] commandline brokwn --- nvim/lua/kanopo/plugins/cmp.lua | 58 ++++++------------------- nvim/lua/kanopo/plugins/commandline.lua | 12 ----- nvim/lua/kanopo/plugins/lsp.lua | 2 +- 3 files changed, 14 insertions(+), 58 deletions(-) delete mode 100644 nvim/lua/kanopo/plugins/commandline.lua diff --git a/nvim/lua/kanopo/plugins/cmp.lua b/nvim/lua/kanopo/plugins/cmp.lua index 61593b5..058a2e3 100644 --- a/nvim/lua/kanopo/plugins/cmp.lua +++ b/nvim/lua/kanopo/plugins/cmp.lua @@ -1,54 +1,18 @@ return { "hrsh7th/nvim-cmp", - event = "InsertEnter", + event = { "InsertEnter" }, dependencies = { - { - "hrsh7th/cmp-nvim-lsp", - event = "InsertEnter", - }, - { - "hrsh7th/cmp-buffer", - event = "InsertEnter", - }, - { - "hrsh7th/cmp-path", - event = "InsertEnter", - }, - { - "saadparwaiz1/cmp_luasnip", - event = "InsertEnter", - }, + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "saadparwaiz1/cmp_luasnip", { "L3MON4D3/LuaSnip", - event = "InsertEnter", dependencies = { "rafamadriz/friendly-snippets", }, }, - { - "onsails/lspkind-nvim", - event = "InsertEnter", - }, - -- { - -- "zbirenbaum/copilot.lua", - -- cmd = "Copilot", - -- event = "InsertEnter", - -- config = function() - -- require("copilot").setup({ - -- suggestion = { enabled = false }, - -- panel = { enabled = false }, - -- }) - -- end, - -- }, - -- { - -- "zbirenbaum/copilot-cmp", - -- config = function() - -- require("copilot_cmp").setup({ - -- event = { "InsertEnter", "LspAttach" }, - -- fix_pairs = true, - -- }) - -- end - -- } + "onsails/lspkind-nvim", }, config = function() local cmp = require("cmp") @@ -61,14 +25,20 @@ return { return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") end + -- La tua configurazione esistente per la INSERT MODE rimane invariata cmp.setup({ performance = { debounce = 10, throttle = 10, + max_view_entries = 10, + async_budget = 500, + fetching_timeout = 1000, + confirm_resolve_timeout = 2000, + filtering_context_budget = 200, }, snippet = { expand = function(args) - luasnip.lsp_expand(args.body) -- For `luasnip` users. + luasnip.lsp_expand(args.body) end, }, mapping = cmp.mapping.preset.insert({ @@ -118,11 +88,9 @@ return { maxwidth = 50, ellipsis = "...", show_labelDetails = true, - symbol_map = { Copilot = "" } }), }, sources = { - -- { name = "copilot", group_index = 2 }, { name = "nvim_lsp" }, { name = "luasnip" }, { name = "buffer" }, diff --git a/nvim/lua/kanopo/plugins/commandline.lua b/nvim/lua/kanopo/plugins/commandline.lua deleted file mode 100644 index f70ab79..0000000 --- a/nvim/lua/kanopo/plugins/commandline.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - "VonHeikemen/fine-cmdline.nvim", - dependencies = { - { "MunifTanjim/nui.nvim" }, - }, - - config = function() - vim.o.cmdheight = 0 - vim.api.nvim_set_keymap("n", ":", "FineCmdline", { noremap = true }) - require("fine-cmdline").setup({}) - end, -} diff --git a/nvim/lua/kanopo/plugins/lsp.lua b/nvim/lua/kanopo/plugins/lsp.lua index de31026..c29268b 100644 --- a/nvim/lua/kanopo/plugins/lsp.lua +++ b/nvim/lua/kanopo/plugins/lsp.lua @@ -28,7 +28,7 @@ local on_attach = function(_, bufnr) map("rn", "lua vim.lsp.buf.rename()", "[R]ename Symbol") map("ca", "lua vim.lsp.buf.code_action()", "[C]ode [A]ction") map("K", "lua vim.lsp.buf.hover()", "[K] Hover") - map("e", "lua vim.diagnostic.open_float()", "[E]xplain Diagnostic") + map("d", "lua vim.diagnostic.open_float()", "[E]xplain Diagnostic") map("gd", telescope.lsp_definitions, "[G]o [D]efinition") map("gr", telescope.lsp_references, "[G]o [R]eferences") map("gI", telescope.lsp_implementations, "[G]o [I]mplementations")