From 9082f3926ac469fce8e11cd9ff51eae546508154 Mon Sep 17 00:00:00 2001 From: Daniel Heras Quesada Date: Sun, 13 Jul 2025 19:00:23 +0200 Subject: [PATCH] fix: tabs + cmp fixed --- lazy-lock.json | 6 ++- lua/config/remap.lua | 13 +------ lua/plugins/code-utils.lua | 59 +++++++++++------------------- lua/plugins/collections.lua | 39 -------------------- lua/plugins/help.lua | 34 +++++++++-------- lua/plugins/opts/conformFormat.lua | 9 ++--- 6 files changed, 50 insertions(+), 110 deletions(-) delete mode 100644 lua/plugins/collections.lua diff --git a/lazy-lock.json b/lazy-lock.json index 1ca5b7e..d24e96e 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -8,6 +8,7 @@ "conform.nvim": { "branch": "master", "commit": "8132ec733eed3bf415b97b76797ca41b59f51d7d" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, + "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, "gitsigns.nvim": { "branch": "main", "commit": "d0f90ef51d4be86b824b012ec52ed715b5622e51" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, @@ -19,6 +20,7 @@ "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, "nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" }, "nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, @@ -28,6 +30,6 @@ "telescope-git-file-history.nvim": { "branch": "master", "commit": "e7d495319f2a04df96402057a6992ea970f8914d" }, "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, - "vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" }, - "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } + "vim-be-good": { "branch": "master", "commit": "0ae3de14eb8efc6effe7704b5e46495e91931cc5" }, + "vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" } } diff --git a/lua/config/remap.lua b/lua/config/remap.lua index 4963b35..3389355 100644 --- a/lua/config/remap.lua +++ b/lua/config/remap.lua @@ -15,17 +15,8 @@ map("n", "", "BufferLineMovePrev", { desc = "Move buffer to left" map("n", "", "BufferLineMoveNext", { desc = "Move buffer to right" }) map("n", "[b", "bprevious", { desc = "Prev Buffer" }) map("n", "]b", "bnext", { desc = "Next Buffer" }) -map("n", "bd", function() - -- Snacks.bufdelete() -end, { desc = "Delete Buffer" }) --- cant have C-w to delete buffer since in being used to navigate windows --- map("n", "", function() --- Snacks.bufdelete() --- end, { desc = "Go to Left Window", remap = true }) -map("n", "", function() - -- Snacks.bufdelete() -end, { desc = "Delete Buffer" }) -map("n", "bD", ":bd", { desc = "Delete Buffer and Window" }) +map("n", "bd", "bdelete", { desc = "Delete Buffer" }) +map("n", "x", "bdelete", { desc = "Delete Buffer" }) -- tabpages map("n", "]", ":+tabnext", { desc = "Goes to the next tabpage" }) map("n", "[", ":-tabnext", { desc = "Goes to the previous tabpage" }) diff --git a/lua/plugins/code-utils.lua b/lua/plugins/code-utils.lua index feb8ac4..3b08737 100644 --- a/lua/plugins/code-utils.lua +++ b/lua/plugins/code-utils.lua @@ -24,58 +24,43 @@ return { -- │ Completion │ { 'saghen/blink.cmp', - -- dependencies = { 'rafamadriz/friendly-snippets' }, + dependencies = { 'rafamadriz/friendly-snippets' }, version = '1.*', opts = { - -- All presets have the following mappings: - -- C-space: Open menu or open docs if already open - -- C-n/C-p or Up/Down: Select next/previous item -- C-e: Hide menu -- C-k: Toggle signature help (if signature.enabled = true) - keymap = { preset = 'default' }, + keymap = { + preset = 'default', + [''] = { 'accept', 'fallback' }, + [''] = { 'select_next', 'fallback' }, + [''] = { 'select_prev', 'fallback' }, + }, appearance = { nerd_font_variant = 'mono' }, - -- (Default) Only show the documentation popup when manually triggered completion = { documentation = { auto_show = false } }, - -- Default list of enabled providers defined so that you can extend it - -- elsewhere in your config, without redefining it, due to `opts_extend` sources = { + }, default = { 'lsp', 'path', 'snippets', 'buffer' }, - }, fuzzy = { implementation = "prefer_rust_with_warning" } }, opts_extend = { "sources.default" } }, - -- { - -- "L3MON4D3/LuaSnip", - -- build = "make install_jsregexp", - -- dependencies = { "rafamadriz/friendly-snippets" }, - -- }, - -- + -- -- │ Auto close │ - -- { - -- "m4xshen/autoclose.nvim", - -- }, - -- - -- { - -- "windwp/nvim-ts-autotag", - -- config = function(_, opts) - -- require('nvim-ts-autotag').setup({ - -- opts = { - -- enable_close = true, -- Auto close tags - -- enable_rename = true, -- Auto rename pairs of tags - -- enable_close_on_slash = false -- Auto close on trailing ?", --- function() --- require("which-key").show({ global = false }) --- end, --- desc = "Buffer Local Keymaps (which-key)", --- }, --- }, --- } + -- Breaks LSP attach + -- { + -- "folke/which-key.nvim", + -- event = "VeryLazy", + -- opts = function() + -- return require("plugins.opts.whichKey") + -- end, + -- keys = { + -- { + -- "?", + -- function() + -- require("which-key").show({ global = false }) + -- end, + -- desc = "Buffer Local Keymaps (which-key)", + -- }, + -- }, + -- } + { 'ThePrimeagen/vim-be-good' } } diff --git a/lua/plugins/opts/conformFormat.lua b/lua/plugins/opts/conformFormat.lua index e07d940..faa10fa 100644 --- a/lua/plugins/opts/conformFormat.lua +++ b/lua/plugins/opts/conformFormat.lua @@ -20,11 +20,10 @@ local config = { ["_"] = { "trim_whitespace" }, -- run only on filetypes without formater -- ["*"] = { "trim_whitespace" }, -- run in all filetypes }, - -- Managed by lazyvim - -- format_on_save = { - -- timeout_ms = 500, - -- lsp_format = "fallback", - -- }, + format_on_save = { + timeout_ms = 500, + lsp_format = "fallback", + }, -- Customize formatters formatters = { shfmt = {