aboutsummaryrefslogtreecommitdiffstats
path: root/lua/plugins/completition.lua
diff options
context:
space:
mode:
authorElvis Claros Castro <elvis@claros.ar>2026-04-23 23:15:45 -0300
committerElvis Claros Castro <elvis@claros.ar>2026-04-23 23:15:45 -0300
commit2895ac732dce0eece5ab2586f5d4d76ee0fab710 (patch)
tree16735209162d1b3e3118de8cea23e8541d087ba9 /lua/plugins/completition.lua
parent7a32abb7c07c320cdeae19897d9daaea48acb1bb (diff)
downloadnvim-conf-2895ac732dce0eece5ab2586f5d4d76ee0fab710.tar.gz
nvim-conf-2895ac732dce0eece5ab2586f5d4d76ee0fab710.zip
feat(neovim): integrar CodeCompanion/MCPHub, añadir autocompletado AI y actualizar plugins
- Añadir integración completa de CodeCompanion (mcphub, adaptadores, UI, herramientas, historial, paleta de acciones) - Configuración de build/portado de `mcphub` y opciones de tiempo de ejecución - Configurar adaptadores, herramientas por defecto y múltiples adaptadores para `chat`/`inline`/`cmd` - Añadir autocomandos de CodeCompanion para mostrar/ocultar el spinner - Añadir keymaps relacionados con CodeCompanion - Añadir proveedor de autocompletado AI `minuet-ai` y cambiar la fuente de completado por defecto a `minuet` - Eliminar el archivo de configuración antiguo de Copilot y varios archivos de configuración de plugins obsoletos (`lua/config/copilot.lua`, `lua/plugins/foatterm.lua`, `lua/plugins/img-clip.lua`, `lua/plugins/markdown-preview.lua`, `lua/plugins/markview.lua`) - Actualizar muchos pines de plugins en `lazy-lock.json` (bump/reemplazo de commits) - Comentar los `autocmd` de trim de espacios en blanco y `clang-format` (deshabilita comportamiento de autoformateo/auto-guardar) - Establecer opciones globales: - desactivar el autoformateo global de LazyVim: `vim.g.autoformat = false` - evitar que `:w` agregue automáticamente un salto de línea final: `opt.fixeol = false` - Ajustes de UI: - agregar resaltados `FloatBorder`/`FloatTitle` y hacer `PmenuSel` en negrita - Añadir keymap específico para Rust: sobrescribir `K` para invocar las acciones de hover de `rustaceanvim` - Actualizar/limpiar muchas configuraciones de plugins: - reescritura amplia de `lua/plugins/codecompanion.lua` - añadir/modificar opciones de `lua/plugins/image.lua` (`image.nvim`) - ajustar UI, pickers y keymaps de `lua/plugins/snacks.lua` - actualizar versión de `rustaceanvim` y desactivar `format_on_save` en `navigator` - varias correcciones de formato y consistencia en archivos de plugins - Actualizar `lua/config/keymaps.lua` para incluir bindings de CodeCompanion Notas: - Estos cambios modifican el comportamiento de formateo/autoformateo (autoformateo desactivado y algunos `autocmd` `BufWritePre` comentados). Revisa si quieres reactivar el formateo automático al guardar.
Diffstat (limited to 'lua/plugins/completition.lua')
-rw-r--r--lua/plugins/completition.lua82
1 files changed, 68 insertions, 14 deletions
diff --git a/lua/plugins/completition.lua b/lua/plugins/completition.lua
index 91a7b89..071c16c 100644
--- a/lua/plugins/completition.lua
+++ b/lua/plugins/completition.lua
@@ -5,16 +5,63 @@ return {
"rafamadriz/friendly-snippets",
{ "L3MON4D3/LuaSnip", version = "v1.*" },
"windwp/nvim-autopairs",
- {
- "zbirenbaum/copilot.lua",
- cmd = { "Copilot" },
- event = { "VeryLazy" },
- opts = { suggestion = { enabled = false }, panel = { enabled = false } },
- },
- -- Add blink.cmp copilot source
- "giuxtaposition/blink-cmp-copilot",
+ -- {
+ -- "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",
+ -- Add minuet-ai for AI completions with llama-server
+ {
+ "milanglacier/minuet-ai.nvim",
+ config = function()
+ require('minuet').setup {
+ provider = 'openai_fim_compatible',
+ n_completions = 1, -- recommend for local model for resource saving
+ -- I recommend beginning with a small context window size and incrementally
+ -- expanding it, depending on your local computing power. A context window
+ -- of 512, serves as an good starting point to estimate your computing
+ -- power. Once you have a reliable estimate of your local computing power,
+ -- you should adjust the context window to a larger value.
+ context_window = 512,
+ provider_options = {
+ openai_fim_compatible = {
+ -- For Windows users, TERM may not be present in environment variables.
+ -- Consider using APPDATA instead.
+ api_key = 'TERM',
+ name = 'Qwen',
+ end_point = 'http://localhost:8012/v1/completions',
+ -- The model is set by the llama-cpp server and cannot be altered
+ -- post-launch.
+ model = 'PLACEHOLDER',
+ optional = {
+ max_tokens = 56,
+ top_p = 0.9,
+ },
+ -- Llama.cpp does not support the `suffix` option in FIM completion.
+ -- Therefore, we must disable it and manually populate the special
+ -- tokens required for FIM completion.
+ template = {
+ prompt = function(context_before_cursor, context_after_cursor, _)
+ return '<|fim_prefix|>'
+ .. context_before_cursor
+ .. '<|fim_suffix|>'
+ .. context_after_cursor
+ .. '<|fim_middle|>'
+ end,
+ suffix = false,
+ },
+ },
+ },
+ }
+ end,
+ },
},
-- use a release tag to download pre-built binaries
@@ -60,7 +107,7 @@ return {
border = "rounded",
draw = {
columns = {
- { "label", "label_description", gap = 1 },
+ { "label", "label_description", gap = 1 },
{ "kind_icon", "kind" },
},
},
@@ -70,19 +117,26 @@ return {
-- Default list of enabled providers
sources = {
- default = { "lsp", "path", "snippets", "buffer", "copilot" },
+ default = { "lsp", "path", "snippets", "buffer", "minuet" },
+ -- default = { "lsp", "path", "snippets", "buffer", "copilot", "minuet" },
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,
+ minuet = {
+ name = "minuet",
+ module = "minuet.blink",
+ score_offset = 101,
async = true,
},
+ -- copilot = {
+ -- name = "copilot",
+ -- module = "blink-cmp-copilot",
+ -- score_offset = 100,
+ -- async = true,
+ -- },
latex = {
name = "latex",
module = "blink-cmp-latex",