From 703b88587bf5bfa7468edffe35be956fe0a06f35 Mon Sep 17 00:00:00 2001 From: Elvis Claros Castro Date: Sat, 30 Aug 2025 14:26:57 -0300 Subject: =?UTF-8?q?feat(completion):=20migraci=C3=B3n=20a=20blink.cmp=20pa?= =?UTF-8?q?ra=20completado=20m=C3=A1s=20r=C3=A1pido=20e=20inteligente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Se reemplazó nvim-cmp y fuentes relacionadas por blink.cmp, incluyendo soporte para Copilot y LaTeX. Se actualizó la configuración de completado para mejorar el rendimiento, resistencia a errores tipográficos y mejor interfaz. Las completaciones DAP ahora se gestionan automáticamente. Se eliminaron cmp-dap y dependencias de plugins no utilizados. feat(ui): agrega nvzone/menu y minty para menús y selección de colores mejorados Se incorporó nvzone/menu para menús contextuales (Oil, Colores) y minty para paletas y selector de color avanzados. Se añadieron nuevas definiciones de menú y atajos para acceso rápido. refactor(lsp): actualiza capacidades LSP para integración con blink.cmp Se modificaron las capacidades del cliente LSP para usar blink.cmp y mejorar la experiencia de completado en todos los servidores. fix(dap): actualiza configuración del adaptador de Firefox para desarrollo local Se cambiaron los parámetros del adaptador de depuración de Firefox para ajustarse al entorno y puerto local. chore: elimina plugins no utilizados (vim-dadbod, deadcolumn, duck, easy-align, orgmode, llm) Se limpió la lista de plugins eliminando los no utilizados o deshabilitados para una configuración más ligera. style(colorscheme): mejora configuración de Solarized Osaka para mejor UI Se mejoró la configuración del esquema de colores con resaltados más legibles, mejores estilos para barras laterales/ventanas flotantes y retroalimentación visual mejorada. docs: agrega MIGRACION_BLINK.md con notas de migración Se añadió archivo de documentación para registrar los pasos y razones de la migración a blink.cmp. --- lua/plugins/close-buffer.lua | 2 +- lua/plugins/codecompanion.lua | 260 +++++++++++++++++------------------------- lua/plugins/colorscheme.lua | 176 +++++++++++++++++++--------- lua/plugins/completition.lua | 115 ++++++++++++++----- lua/plugins/dap.lua | 15 +-- lua/plugins/database.lua | 26 ----- lua/plugins/deadcolumn.lua | 5 - lua/plugins/dressing.lua | 228 ++++++++++++++++++++++-------------- lua/plugins/duck.lua | 12 -- lua/plugins/easy-align.lua | 4 - lua/plugins/llm.lua | 55 --------- lua/plugins/markview.lua | 3 + lua/plugins/menu.lua | 45 ++++++++ lua/plugins/minty.lua | 10 ++ lua/plugins/orgmode.lua | 17 --- lua/plugins/vimtex.lua | 17 +-- 16 files changed, 519 insertions(+), 471 deletions(-) delete mode 100644 lua/plugins/database.lua delete mode 100644 lua/plugins/deadcolumn.lua delete mode 100644 lua/plugins/duck.lua delete mode 100644 lua/plugins/easy-align.lua delete mode 100644 lua/plugins/llm.lua create mode 100644 lua/plugins/menu.lua create mode 100644 lua/plugins/minty.lua delete mode 100644 lua/plugins/orgmode.lua (limited to 'lua/plugins') diff --git a/lua/plugins/close-buffer.lua b/lua/plugins/close-buffer.lua index 947f31a..64a6a82 100644 --- a/lua/plugins/close-buffer.lua +++ b/lua/plugins/close-buffer.lua @@ -6,7 +6,7 @@ return { event = "VeryLazy", opts = { -- if a buffer has been inactive for this many minutes, close it - retirementAgeMins = 30, + retirementAgeMins = 120, }, }, } diff --git a/lua/plugins/codecompanion.lua b/lua/plugins/codecompanion.lua index e5f087f..ddd209b 100644 --- a/lua/plugins/codecompanion.lua +++ b/lua/plugins/codecompanion.lua @@ -1,27 +1,3 @@ --- Choose default model from a list of preferred models. Fall back to first --- available. -local function preferred_model_picker(preferred) - return function(self) - if self == nil then - -- Debug:render() calls Adapter.schema.model.default() but doesn't pass - -- in `self`. Just return an empty string in this case. - return "" - end - - local choices = self.schema.model.choices(self) - - for _, best in ipairs(preferred) do - for _, choice in ipairs(choices) do - if choice:find(best, 1, true) then - return choice - end - end - end - - return choices[1] - end -end - local IS_DEV = false return { { @@ -53,148 +29,112 @@ return { opts = { log_level = "TRACE", -- or "DEBUG" adapters = { - ollama = function() - return require("codecompanion.adapters").extend("ollama", { - name = "tinyllama", - env = { - url = "http://127.0.0.1:11434", - -- api_key = "", - }, - headers = { - ["Content-Type"] = "application/json", - -- ["Authorization"] = "Bearer ${api_key}", - }, - parameters = { - sync = true, - }, - schema = { - model = { - default = preferred_model_picker { - "qwen2.5-coder:14b", - "qwen2.5-coder:7b", - "qwen2.5-coder:3b", - "qwen2.5-coder:1.5b", - "qwen2.5-coder:0.5b", + http = { + ollama = function() + return require("codecompanion.adapters").extend("ollama", { + name = "tinyllama", + env = { + url = "http://127.0.0.1:11434", + -- api_key = "", + }, + headers = { + ["Content-Type"] = "application/json", + -- ["Authorization"] = "Bearer ${api_key}", + }, + parameters = { + sync = true, + }, + schema = { + model = { + default = "qwen2.5-coder:0.5b", }, }, - }, - }) - end, - anthropic = function() - return require("codecompanion.adapters").extend("anthropic", { - env = { - api_key = "cmd:echo $ANTHROPIC_API_KEY", - }, - schema = { - model = { - default = "claude-3-opus-20240229", + }) + end, + anthropic = function() + return require("codecompanion.adapters").extend("anthropic", { + env = { + api_key = "cmd:echo $ANTHROPIC_API_KEY", }, - }, - }) - end, - copilot = function() - return require("codecompanion.adapters").extend("copilot", { - schema = { - model = { - default = "gpt-4.1", + schema = { + model = { + default = "claude-3-opus-20240229", + }, }, - }, - }) - end, - gemini = function() - return require("codecompanion.adapters").extend("gemini", { - env = { - api_key = "cmd:op read op://personal/Gemini_API/credential --no-newline", - }, - }) - end, - openai = function() - return require("codecompanion.adapters").extend("openai", { - env = { - api_key = "cmd:echo $OPENAI_API_KEY", - chat_url = "/v1/chat/completions", - url = "https://api.openai.com", - }, - schema = { - model = { - default = function() - return "gpt-4o-mini" - end, + }) + end, + copilot = function() + return require("codecompanion.adapters").extend("copilot", { + schema = { + model = { + default = "gpt-4.1", + }, }, - }, - }) - end, - openai_compatible = function() - return require("codecompanion.adapters").extend("openai_compatible", { - env = { - api_key = "cmd:echo $OPENAI_API_KEY", - chat_url = "/v1/chat/completions", - url = "http://127.0.0.1:8012", - }, - headers = { - ["Content-Type"] = "application/json", - }, - schema = { - model = { - default = function() - return "davinci" - end, + }) + end, + gemini = function() + return require("codecompanion.adapters").extend("gemini", { + env = { + api_key = "cmd:op read op://personal/Gemini_API/credential --no-newline", }, - }, - }) - end, - xai = function() - return require("codecompanion.adapters").extend("xai", { - env = { - api_key = "cmd:op read op://personal/xAI_API/credential --no-newline", - }, - }) - end, - deepseek = function() - return require("codecompanion.adapters").extend("openai_compatible", { - env = { - api_key = "cmd:echo $AZ_DS_API_KEY", - url = "https://DeepSeek-R1-ajfsk.eastus2.models.ai.azure.com", - }, - schema = { - model = { - default = "deepseek-chat", + }) + end, + openai = function() + return require("codecompanion.adapters").extend("openai", { + env = { + api_key = "cmd:echo $OPENAI_API_KEY", + chat_url = "/v1/chat/completions", + url = "https://api.openai.com", }, - }, - }) - end, - -- deepseek = function() - -- return require("codecompanion.adapters").extend("deepseek", { - -- env = { - -- api_key = "cmd:echo $OPENAI_API_KEY", - -- chat_url = "/v1/chat/completions", - -- url = "http://127.0.0.1:8012", - -- }, - -- headers = { - -- ["Content-Type"] = "application/json", - -- }, - -- schema = { - -- model = { - -- default = function() - -- return "davinci" - -- end, - -- }, - -- }, - -- }) - -- end, - azure_openai = function() - return require("codecompanion.adapters").extend("azure_openai", { - env = { - api_key = "cmd:echo $AZ_DS_API_KEY", - endpoint = "https://DeepSeek-R1-nphob.eastus2.models.ai.azure.com", - }, - schema = { - model = { - default = "DeepSeek-R1-nphob", + schema = { + model = { + default = function() + return "gpt-4o-mini" + end, + }, }, - }, - }) - end, + }) + end, + openai_compatible = function() + return require("codecompanion.adapters").extend("openai_compatible", { + env = { + api_key = "cmd:echo $OPENAI_API_KEY", + chat_url = "/v1/chat/completions", + url = "http://127.0.0.1:8012", + }, + headers = { + ["Content-Type"] = "application/json", + }, + schema = { + model = { + default = function() + return "davinci" + end, + }, + }, + }) + end, + xai = function() + return require("codecompanion.adapters").extend("xai", { + env = { + api_key = "cmd:op read op://personal/xAI_API/credential --no-newline", + }, + }) + end, + azure_openai = function() + return require("codecompanion.adapters").extend("azure_openai", { + env = { + api_key = "cmd:echo $AZ_DS_API_KEY", + endpoint = "https://DeepSeek-R1-nphob.eastus2.models.ai.azure.com", + }, + schema = { + model = { + default = "DeepSeek-R1-nphob", + }, + }, + }) + end, + }, }, display = { diff = { @@ -208,11 +148,15 @@ return { }, inline = { adapter = "copilot" }, agent = { adapter = "copilot" }, + cmd = { adapter = "copilot" }, }, }, config = function(_, options) require("codecompanion").setup(options) require("codecompanion").setup { + opts = { + language = "English", + }, extensions = { mcphub = { callback = "mcphub.extensions.codecompanion", diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index 376feee..aaae1db 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -4,78 +4,142 @@ return { priority = 1000, opts = {}, config = function() - - -- Colorscheme Solarized Osaka by Takuya Matsuyama (https://github.com/craftzdog/solarized-osaka.nvim) + -- ===================================================== + -- Solarized Osaka Colorscheme Configuration + -- Enhanced setup with better customization + -- ===================================================== + require("solarized-osaka").setup({ - -- your configuration comes here - -- or leave it empty to use the default settings - transparent = true, -- Enable this to disable setting the background color - terminal_colors = true, -- Configure the colors used when opening a `:terminal` in [Neovim](https://github.com/neovim/neovim) + -- ========== Core Settings ========== + transparent = true, -- Enable transparent background + terminal_colors = true, -- Configure terminal colors + + -- ========== Syntax Highlighting Styles ========== styles = { - -- Style to be applied to different syntax groups - -- Value is any valid attr-list value for `:help nvim_set_hl` comments = { italic = true }, - keywords = { italic = true }, - functions = { italic = true }, - variables = { bold = true}, - -- Background styles. Can be "dark", "transparent" or "normal" - sidebars = "dark", -- style for sidebars, see below - floats = "dark", -- style for floating windows + keywords = { italic = true, bold = false }, + functions = { italic = false, bold = true }, + variables = { bold = false }, + conditionals = { italic = true }, + loops = { italic = true }, + constants = { bold = true }, + strings = { italic = false }, + types = { bold = true }, + + -- ========== UI Element Styles ========== + sidebars = "dark", -- Sidebar style: "dark", "transparent", "normal" + floats = "dark", -- Floating window style + }, + + -- ========== UI Configuration ========== + sidebars = { + "qf", "help", "vista_kind", "terminal", + "packer", "spectre_panel", "toggleterm", + "Trouble", "NvimTree", "neo-tree" }, - sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]` - day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors - hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**. - dim_inactive = false, -- dims inactive windows - lualine_bold = true, -- When `true`, section headers in the lualine theme will be bold + day_brightness = 0.4, -- Better brightness for day variant + hide_inactive_statusline = false, + dim_inactive = true, -- Dim inactive windows for better focus + lualine_bold = true, - --- You can override specific color groups to use other groups or a hex color - --- function will be called with a ColorScheme table + -- ========== Color Customization ========== ---@param colors ColorScheme - on_colors = function(colors) end, + on_colors = function(colors) + -- Enhance base colors for better readability + colors.bg_dark = "#16161e" + colors.bg_float = "#1a1a23" + colors.border = "#27a1b9" + colors.comment = "#565f89" + colors.gitSigns = { + add = "#449dab", + change = "#6183bb", + delete = "#f7768e", + } + end, - --- You can override specific highlights to use other groups or a hex color - --- function will be called with a Highlights and ColorScheme table + -- ========== Highlight Customization ========== ---@param highlights Highlights ---@param colors ColorScheme on_highlights = function(hl, c) + -- ========== Indent Guides ========== hl.IblIndent = { fg = c.base03, nocombine = true } hl.IndentBlanklineChar = { fg = c.blue, nocombine = true } hl.IndentBlanklineContextChar = { fg = c.orange500, nocombine = true } - + + -- ========== Telescope Enhanced Styling ========== local prompt = "#2d3149" - hl.TelescopeNormal = { - bg = c.bg_dark, - fg = c.fg_dark, - } - hl.TelescopeBorder = { - bg = c.bg_dark, - fg = c.bg_dark, - } - hl.TelescopePromptNormal = { - bg = prompt, - } - hl.TelescopePromptBorder = { - bg = prompt, - fg = prompt, - } - hl.TelescopePromptTitle = { - bg = prompt, - fg = prompt, - } - hl.TelescopePreviewTitle = { - bg = c.bg_dark, - fg = c.bg_dark, - } - hl.TelescopeResultsTitle = { - bg = c.bg_dark, - fg = c.bg_dark, - } + local results = "#1f2335" + local preview = "#24283b" + + hl.TelescopeNormal = { bg = c.bg_dark, fg = c.fg_dark } + hl.TelescopeBorder = { bg = c.bg_dark, fg = c.border } + hl.TelescopePromptNormal = { bg = prompt } + hl.TelescopePromptBorder = { bg = prompt, fg = c.border } + hl.TelescopePromptTitle = { bg = c.blue, fg = c.bg_dark, bold = true } + hl.TelescopePreviewTitle = { bg = c.green, fg = c.bg_dark, bold = true } + hl.TelescopeResultsTitle = { bg = c.purple, fg = c.bg_dark, bold = true } + hl.TelescopeSelection = { bg = "#364A82", fg = c.fg } + hl.TelescopeSelectionCaret = { fg = c.red } + + -- ========== Enhanced UI Elements ========== + -- Better cursor line + hl.CursorLine = { bg = "#1e202a" } + hl.CursorLineNr = { fg = c.orange, bold = true } + + -- Improved visual selection + hl.Visual = { bg = "#33467c" } + + -- Better search highlights + hl.Search = { bg = c.yellow, fg = c.bg_dark } + hl.IncSearch = { bg = c.orange, fg = c.bg_dark } + + -- Enhanced diagnostics + hl.DiagnosticError = { fg = c.red } + hl.DiagnosticWarn = { fg = c.yellow } + hl.DiagnosticInfo = { fg = c.blue } + hl.DiagnosticHint = { fg = c.cyan } + + -- ========== Plugin-specific Highlights ========== + -- Neo-tree + hl.NeoTreeNormal = { bg = c.bg_dark } + hl.NeoTreeNormalNC = { bg = c.bg_dark } + + -- Which-key + hl.WhichKey = { fg = c.blue } + hl.WhichKeyGroup = { fg = c.purple } + hl.WhichKeyDesc = { fg = c.fg } + + -- Notify + hl.NotifyBackground = { bg = c.bg_dark } + + -- GitSigns + hl.GitSignsAdd = { fg = c.green } + hl.GitSignsChange = { fg = c.yellow } + hl.GitSignsDelete = { fg = c.red } end, }) + -- ===================================================== + -- Apply Colorscheme + -- ===================================================== + vim.cmd.colorscheme("solarized-osaka") + + -- ===================================================== + -- Additional UI Enhancements + -- ===================================================== + -- Better cursor visibility + vim.opt.guicursor = "n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50" + + -- Enhanced visual feedback + vim.opt.cursorline = true + vim.opt.number = true + vim.opt.relativenumber = true + vim.opt.signcolumn = "yes" + + -- Better terminal colors + if vim.fn.has("termguicolors") == 1 then + vim.opt.termguicolors = true + end - -- setup must be called before loading - vim.cmd.colorscheme "solarized-osaka" - - end + end, } diff --git a/lua/plugins/completition.lua b/lua/plugins/completition.lua index 173cb54..bfe51d5 100644 --- a/lua/plugins/completition.lua +++ b/lua/plugins/completition.lua @@ -1,38 +1,97 @@ return { - "hrsh7th/nvim-cmp", + "saghen/blink.cmp", + -- optional: provides snippets for the snippet source dependencies = { - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-nvim-lua", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-cmdline", - "hrsh7th/cmp-git", - "saadparwaiz1/cmp_luasnip", - "onsails/lspkind-nvim", + "rafamadriz/friendly-snippets", { "L3MON4D3/LuaSnip", version = "v1.*" }, "windwp/nvim-autopairs", { - "zbirenbaum/copilot-cmp", - dependencies = { - "zbirenbaum/copilot.lua", - cmd = { "Copilot" }, - event = { "VeryLazy" }, - opts = { suggestion = { enabled = false }, panel = { enabled = false } }, + "zbirenbaum/copilot.lua", + cmd = { "Copilot" }, + event = { "VeryLazy" }, + opts = { suggestion = { enabled = false }, panel = { enabled = false } }, + }, + -- Add blink.cmp copilot source + "giuxtaposition/blink-cmp-copilot", + -- Add blink.cmp latex source for LaTeX/VimTeX support + "erooke/blink-cmp-latex", + }, + + -- use a release tag to download pre-built binaries + version = "1.*", + -- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust + -- build = 'cargo build --release', + + event = "VeryLazy", + + ---@module 'blink.cmp' + ---@type blink.cmp.Config + opts = { + -- Opciones de keymap disponibles: + -- 'default' (actual) - Ctrl+y para aceptar, similar a built-in completions + -- 'super-tab' - Tab para aceptar, similar a VSCode + -- 'enter' - Enter para aceptar + -- 'none' - Sin atajos automáticos (defines los tuyos) + keymap = { preset = "default" }, + + -- Todas las configuraciones de preset 'default' incluyen: + -- Ctrl+space: Abrir menú o mostrar docs si ya está abierto + -- Ctrl+n/Ctrl+p o ↑/↓: Seleccionar siguiente/anterior + -- Ctrl+e: Ocultar menú + -- Ctrl+k: Toggle signature help (si signature.enabled = true) + + appearance = { + -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' + nerd_font_variant = "mono", + }, + + completion = { + documentation = { + auto_show = true, + auto_show_delay_ms = 500, + window = { border = "rounded" }, + }, + menu = { + border = "rounded", + draw = { + columns = { + { "label", "label_description", gap = 1 }, + { "kind_icon", "kind" }, + }, + }, }, - config = true, + ghost_text = { enabled = false }, }, - { - "uga-rosa/cmp-dictionary", - config = function() - local dict_fl = { ["*"] = { "/usr/share/dict/words" }, ft = { foo = { "./../../spell/dict_es_en.dict" } } } - local dict = require "cmp_dictionary" - dict.setup { paths = dict_fl["*"], exact_length = 3, first_case_insensitive = false } - end, + + -- Default list of enabled providers + sources = { + default = { "lsp", "path", "snippets", "buffer", "copilot" }, + per_filetype = { + tex = { "lsp", "path", "snippets", "buffer", "latex" }, + bib = { "lsp", "path", "snippets", "buffer", "latex" }, + codecompanion = { "codecompanion" }, + }, + providers = { + copilot = { + name = "copilot", + module = "blink-cmp-copilot", + score_offset = 100, + async = true, + }, + latex = { + name = "latex", + module = "blink-cmp-latex", + }, + }, }, - { "Jezda1337/nvim-html-css" }, + + snippets = { preset = "luasnip" }, + + -- Experimental signature help support + signature = { enabled = true }, + + -- (Default) Rust fuzzy matcher for typo resistance and significantly better performance + fuzzy = { implementation = "prefer_rust_with_warning" }, }, - event = "VeryLazy", - config = function() - require "pi.completition" - end, + opts_extend = { "sources.default" }, } diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 921c560..01e6567 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -7,7 +7,8 @@ return { "mxsdev/nvim-dap-vscode-js", "anuvyklack/hydra.nvim", "nvim-telescope/telescope-dap.nvim", - "rcarriga/cmp-dap", + -- Note: cmp-dap removed due to migration to blink.cmp + -- blink.cmp handles DAP completions automatically }, keys = { { "d", desc = "Open Debug menu" } }, config = function() @@ -17,15 +18,7 @@ return { telescope.load_extension "dap" end - local ok_cmp, cmp = pcall(require, "cmp") - if ok_cmp then - cmp.setup.filetype({ "dap-repl", "dapui_watches" }, { - sources = cmp.config.sources({ - { name = "dap" }, - }, { - { name = "buffer" }, - }), - }) - end + -- Note: DAP completions are handled automatically by blink.cmp + -- No additional configuration needed end, } diff --git a/lua/plugins/database.lua b/lua/plugins/database.lua deleted file mode 100644 index e156510..0000000 --- a/lua/plugins/database.lua +++ /dev/null @@ -1,26 +0,0 @@ -return { - "kristijanhusak/vim-dadbod-ui", - dependencies = { - "tpope/vim-dadbod", - "kristijanhusak/vim-dadbod-completion", - "tpope/vim-dotenv", - }, - keys = { { "db", ":tab DBUI", desc = "Open Database client" } }, - init = function() - vim.g.db_ui_use_nerd_fonts = 1 - vim.g.db_ui_show_database_icon = 1 - vim.g.db_ui_force_echo_notifications = 1 - vim.g.db_ui_win_position = "left" - vim.g.db_ui_winwidth = 80 - - vim.g.db_ui_table_helpers = { - mysql = { - Count = "select count(1) from {optional_schema}{table}", - Explain = "EXPLAIN {last_query}", - }, - sqlite = { - Describe = "PRAGMA table_info({table})", - }, - } - end, -} diff --git a/lua/plugins/deadcolumn.lua b/lua/plugins/deadcolumn.lua deleted file mode 100644 index 26457c2..0000000 --- a/lua/plugins/deadcolumn.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "Bekaboo/deadcolumn.nvim", - enabled = false, - event = { "VeryLazy" }, -} diff --git a/lua/plugins/dressing.lua b/lua/plugins/dressing.lua index 5cfb6cf..edf6806 100644 --- a/lua/plugins/dressing.lua +++ b/lua/plugins/dressing.lua @@ -2,159 +2,213 @@ return { "stevearc/dressing.nvim", event = "VeryLazy", opts = { + -- ===================================================== + -- Input Configuration - Enhanced vim.ui.input + -- ===================================================== input = { - -- Set to false to disable the vim.ui.input implementation enabled = true, - - -- Default prompt string - default_prompt = "Input:", - - -- Can be 'left', 'right', or 'center' + default_prompt = "󰘳 Input:", prompt_align = "center", - - -- When true, will close the modal insert_only = true, - - -- When true, input will start in insert mode. start_in_insert = true, - - -- These are passed to nvim_open_win - -- anchor = "SW", + + -- ========== Window Styling ========== border = "rounded", - -- 'editor' and 'win' will default to being centered relative = "editor", - - -- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) - prefer_width = 40, + + -- ========== Size Configuration ========== + prefer_width = 50, width = nil, - -- min_width and max_width can be a list of mixed types. - -- min_width = {20, 0.2} means "the greater of 20 columns or 20% of total" - max_width = { 140, 0.9 }, - min_width = { 20, 0.2 }, + max_width = { 140, 0.8 }, + min_width = { 30, 0.3 }, + + -- ========== Window Options ========== win_options = { - -- Window transparency (0-100) - winblend = 10, - -- Disable line wrapping + winblend = 0, -- No transparency for better readability wrap = false, + cursorline = true, + cursorlineopt = "both", + -- Better highlighting + winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:PmenuSel", }, - -- Set to `false` to disable + -- ========== Enhanced Key Mappings ========== mappings = { n = { [""] = "Close", [""] = "Confirm", + ["q"] = "Close", + [""] = "Close", }, i = { [""] = "Close", [""] = "Confirm", [""] = "HistoryPrev", [""] = "HistoryNext", + [""] = "HistoryPrev", + [""] = "HistoryNext", + [""] = function() vim.api.nvim_del_current_line() end, + [""] = "Close", }, }, - - override = function(conf) - -- This is the config that will be passed to nvim_open_win. - -- Change values here to customize the layout - return conf + + -- ========== Custom Configuration Function ========== + get_config = function(opts) + -- Customize based on prompt type + if opts.prompt and opts.prompt:find("rename", 1, true) then + return { + relative = "cursor", + row = 1, + col = 0, + } + end + -- For file operations, make window larger + if opts.prompt and (opts.prompt:find("file", 1, true) or opts.prompt:find("path", 1, true)) then + return { + prefer_width = 80, + } + end end, - - -- see :help dressing_get_config - get_config = nil, }, + + -- ===================================================== + -- Select Configuration - Enhanced vim.ui.select + -- ===================================================== select = { - -- Set to false to disable the vim.ui.select implementation - enabled = false, - - -- Priority list of preferred vim.select implementations - backend = { "telescope", "fzf_lua", "fzf", "builtin", "nui" }, - - -- Trim trailing `:` from prompt + enabled = true, -- Enable for better selection UI + + -- ========== Backend Priority ========== + backend = { "telescope", "fzf_lua", "builtin", "nui" }, trim_prompt = true, + + -- ========== Telescope Integration ========== + telescope = require('telescope.themes').get_dropdown({ + layout_config = { + width = 0.6, + height = 0.6, + }, + borderchars = { + prompt = { "─", "│", " ", "│", "┌", "┐", "│", "│" }, + results = { "─", "│", "─", "│", "├", "┤", "┘", "└" }, + preview = { "─", "│", "─", "│", "┌", "┐", "┘", "└" }, + }, + }), - -- Options for telescope selector - -- These are passed into the telescope picker directly. Can be used like: - -- telescope = require('telescope.themes').get_ivy({...}) - telescope = nil, - - -- Options for fzf selector + -- ========== FZF Configuration ========== fzf = { window = { - width = 0.5, - height = 0.4, + width = 0.7, + height = 0.6, }, }, - - -- Options for fzf_lua selector + + -- ========== FZF Lua Configuration ========== fzf_lua = { winopts = { - width = 0.5, - height = 0.4, + width = 0.7, + height = 0.6, + border = "rounded", }, }, - - -- Options for nui Menu + + -- ========== NUI Configuration ========== nui = { position = "50%", size = nil, relative = "editor", border = { style = "rounded", + text = { + top = " Select ", + top_align = "center", + }, }, buf_options = { swapfile = false, filetype = "DressingSelect", }, win_options = { - winblend = 10, + winblend = 0, + winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:PmenuSel", }, - max_width = 80, - max_height = 40, - min_width = 40, - min_height = 10, + max_width = 100, + max_height = 50, + min_width = 50, + min_height = 15, }, - -- Options for built-in selector + -- ========== Built-in Selector Configuration ========== builtin = { - -- These are passed to nvim_open_win - -- anchor = "NW", border = "rounded", - -- 'editor' and 'win' will default to being centered relative = "editor", - + + -- ========== Enhanced Window Options ========== win_options = { - -- Window transparency (0-100) - winblend = 10, + winblend = 0, + cursorline = true, + winhighlight = "Normal:Normal,FloatBorder:FloatBorder,CursorLine:PmenuSel", }, - - -- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) - -- the min_ and max_ options can be a list of mixed types. - -- max_width = {140, 0.8} means "the lesser of 140 columns or 80% of total" + + -- ========== Size Configuration ========== width = nil, - max_width = { 140, 0.8 }, - min_width = { 40, 0.2 }, + max_width = { 120, 0.8 }, + min_width = { 50, 0.4 }, height = nil, - max_height = 0.9, - min_height = { 10, 0.2 }, - - -- Set to `false` to disable + max_height = 0.8, + min_height = { 15, 0.3 }, + + -- ========== Enhanced Key Mappings ========== mappings = { [""] = "Close", [""] = "Close", [""] = "Confirm", + ["q"] = "Close", + ["j"] = "Next", + ["k"] = "Prev", + [""] = "Next", + [""] = "Prev", + [""] = "Next", + [""] = "Prev", }, - - override = function(conf) - -- This is the config that will be passed to nvim_open_win. - -- Change values here to customize the layout - return conf + }, + + -- ========== Format Item Override ========== + format_item_override = { + -- Add icons for common items + codeaction = function(action_tuple) + local title = action_tuple[2].title:gsub("\r\n", "\\r\\n") + local client = action_tuple[1] + return string.format(" %s - %s", title, client) end, }, - - -- Used to override format_item. See :help dressing-format - format_item_override = {}, - - -- see :help dressing_get_config - get_config = nil, + + -- ========== Dynamic Configuration ========== + get_config = function(opts) + -- For code actions, use telescope if available + if opts.kind == "codeaction" then + return { + backend = { "telescope", "builtin" }, + telescope = require('telescope.themes').get_cursor({ + layout_config = { + width = 0.6, + height = 0.4, + }, + }), + } + end + + -- For LSP references/definitions, prefer telescope + if opts.kind == "references" or opts.kind == "definitions" then + return { + backend = { "telescope" }, + } + end + + -- For simple selections, use builtin + return { + backend = { "builtin", "telescope" }, + } + end, }, }, } diff --git a/lua/plugins/duck.lua b/lua/plugins/duck.lua deleted file mode 100644 index a8ff8c1..0000000 --- a/lua/plugins/duck.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - "tamton-aquib/duck.nvim", - keys = { - { - "hh", - function() - require("duck").hatch("🦖", 10) - end, - { desc = "Spawn dinasours" }, - }, - }, -} diff --git a/lua/plugins/easy-align.lua b/lua/plugins/easy-align.lua deleted file mode 100644 index 7d33478..0000000 --- a/lua/plugins/easy-align.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - "junegunn/vim-easy-align", - keys = { { "ga", "(EasyAlign)", mode = { "n", "v" }, desc = "EasyAlign" } }, -} diff --git a/lua/plugins/llm.lua b/lua/plugins/llm.lua deleted file mode 100644 index 20e23f0..0000000 --- a/lua/plugins/llm.lua +++ /dev/null @@ -1,55 +0,0 @@ --- return { --- 'huggingface/llm.nvim', --- config = function() --- require('llm').setup({ --- api_token = "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", -- cf Install paragraph --- -- parameters that are added to the request body --- query_params = { --- max_new_tokens = 60, --- temperature = 0.2, --- top_p = 0.95, --- -- stop_token = "<|endoftext|>", --- stop_token = nil, --- }, --- lsp = { --- enabled = false, --- bin_path = vim.api.nvim_call_function("stdpath", { "data" }) .. "/mason/bin/llm-ls", --- }, --- debounce_ms = 80, --- accept_keymap = "", --- dismiss_keymap = "", --- --- enable_suggestions_on_startup = true, --- enable_suggestions_on_files = "*", -- pattern matching syntax to enable suggestions on specific files, either a string or a list of strings --- -- model = "bigcode/starcoder", -- can be a model ID or an http(s) endpoint --- -- context_window = 8192, --- -- tokens_to_clear = { "<|endoftext|>" }, --- -- tokenizer = { --- -- path = "~/.config/tokenizer/starcoder/tokenizer.json" --- -- }, --- -- -- set this if the model supports fill in the middle --- -- fim = { --- -- enabled = true, --- -- prefix = "", --- -- middle = "", --- -- suffix = "", --- -- }, --- model = "codellama/CodeLlama-7b-hf", --- context_window = 4096, --- tokens_to_clear = { "" }, --- tokenizer = { --- path = "~/.config/tokenizer/codellama/tokenizer.json", --- }, --- fim = { --- enabled = true, --- prefix = "
 ",
---           middle = " ",
---           suffix = " ",
---         },
---       })
---     end
--- }
--- return {
---   'gsuuon/llm.nvim'
--- }
-return {}
diff --git a/lua/plugins/markview.lua b/lua/plugins/markview.lua
index 63d2be6..fb38eb8 100644
--- a/lua/plugins/markview.lua
+++ b/lua/plugins/markview.lua
@@ -6,5 +6,8 @@ return {
       filetypes = { "markdown", "codecompanion", "copilot-chat" },
       ignore_buftypes = {},
     },
+    experimental = {
+      check_rtp_message = false, -- Disable the runtime path warning message
+    },
   },
 }
diff --git a/lua/plugins/menu.lua b/lua/plugins/menu.lua
new file mode 100644
index 0000000..87c2517
--- /dev/null
+++ b/lua/plugins/menu.lua
@@ -0,0 +1,45 @@
+return {
+  -- Dependency required by nvzone/menu
+  { "nvzone/volt", lazy = true },
+
+  {
+    "nvzone/menu",
+    lazy = true,
+    keys = {
+      {
+        "om",
+        function()
+          local ok, menu = pcall(require, "menu")
+          if not ok then
+            vim.notify("menu.nvim no disponible", vim.log.levels.ERROR)
+            return
+          end
+          local ok_items, items = pcall(require, "menus.oil")
+          if not ok_items then
+            vim.notify("menus.oil no encontrado", vim.log.levels.ERROR)
+            return
+          end
+          menu.open(items)
+        end,
+        desc = "Abrir menú de Oil",
+      },
+      {
+        "cm",
+        function()
+          local ok, menu = pcall(require, "menu")
+          if not ok then
+            vim.notify("menu.nvim no disponible", vim.log.levels.ERROR)
+            return
+          end
+          local ok_items, items = pcall(require, "menus.colors")
+          if not ok_items then
+            vim.notify("menus.colors no encontrado", vim.log.levels.ERROR)
+            return
+          end
+          menu.open(items)
+        end,
+        desc = "Abrir menú de Colores (Minty)",
+      },
+    },
+  },
+}
diff --git a/lua/plugins/minty.lua b/lua/plugins/minty.lua
new file mode 100644
index 0000000..7cd879e
--- /dev/null
+++ b/lua/plugins/minty.lua
@@ -0,0 +1,10 @@
+return {
+  -- volt is required by minty
+  { "nvzone/volt", lazy = true },
+
+  {
+    "nvzone/minty",
+    cmd = { "Shades", "Huefy" },
+    -- You can add keymaps later if you want; commands are enough
+  },
+}
diff --git a/lua/plugins/orgmode.lua b/lua/plugins/orgmode.lua
deleted file mode 100644
index e9f8667..0000000
--- a/lua/plugins/orgmode.lua
+++ /dev/null
@@ -1,17 +0,0 @@
-return {
-  "nvim-orgmode/orgmode",
-  enabled = false,
-  keys = {
-    { "oa" },
-    { "oc" },
-  },
-  ft = { "org" },
-  config = function()
-    require("orgmode").setup_ts_grammar()
-    require("orgmode").setup {
-      org_agenda_files = { "~/my-orgs/**/*" },
-      org_default_notes_file = "~/my-orgs/refile.org",
-    }
-    require("cmp").setup { sources = { { name = "orgmode" } } }
-  end,
-}
diff --git a/lua/plugins/vimtex.lua b/lua/plugins/vimtex.lua
index 588b848..cd03716 100644
--- a/lua/plugins/vimtex.lua
+++ b/lua/plugins/vimtex.lua
@@ -1,13 +1,8 @@
 return {
-  {
-    "lervag/vimtex",
-    init = function()
-      vim.g.vimtex_view_method = "zathura" -- Integración con el visor PDF
-      vim.g.vimtex_compiler_method = "latexmk" -- Compilación automática
-      vim.g.vimtex_quickfix_mode = 0 -- Desactiva la ventana de quickfix automática
-    end,
-  },
-  {
-    "micangl/cmp-vimtex",
-  },
+  "lervag/vimtex",
+  init = function()
+    vim.g.vimtex_view_method = "zathura" -- Integración con el visor PDF
+    vim.g.vimtex_compiler_method = "latexmk" -- Compilación automática
+    vim.g.vimtex_quickfix_mode = 0 -- Desactiva la ventana de quickfix automática
+  end,
 }
-- 
cgit v1.2.3