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. --- MIGRACION_BLINK.md | 0 after/ftplugin/dbout.vim | 1 - lazy-lock.json | 100 +++++++-------- lua/menus/colors.lua | 17 +++ lua/menus/oil.lua | 101 +++++++++++++++ lua/pi/completition/blink.lua | 0 lua/pi/completition/init.lua | 240 +---------------------------------- lua/pi/completition/init_new.lua | 0 lua/pi/dap/configs/javascript.lua | 28 ++-- lua/pi/lsp/default.lua | 1 + lua/pi/lsp/servers/clangd.lua | 2 +- lua/pi/lsp/servers/emmet_ls.lua | 2 +- 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 +-- 28 files changed, 700 insertions(+), 782 deletions(-) create mode 100644 MIGRACION_BLINK.md create mode 100644 lua/menus/colors.lua create mode 100644 lua/menus/oil.lua create mode 100644 lua/pi/completition/blink.lua create mode 100644 lua/pi/completition/init_new.lua 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 diff --git a/MIGRACION_BLINK.md b/MIGRACION_BLINK.md new file mode 100644 index 0000000..e69de29 diff --git a/after/ftplugin/dbout.vim b/after/ftplugin/dbout.vim index e181ecc..07f5afb 100644 --- a/after/ftplugin/dbout.vim +++ b/after/ftplugin/dbout.vim @@ -1,2 +1 @@ set nofoldenable -set colorcolumn= diff --git a/lazy-lock.json b/lazy-lock.json index d29eb3f..0666b2a 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,73 +1,66 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "CopilotChat.nvim": { "branch": "main", "commit": "294bcb620ff66183e142cd8a43a7c77d5bc77a16" }, + "CopilotChat.nvim": { "branch": "main", "commit": "ae2f5932983f42d54bee9ff803b5ab157b145787" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LazyVim": { "branch": "main", "commit": "25abbf546d564dc484cf903804661ba12de45507" }, "LuaSnip": { "branch": "master", "commit": "500981ff6cefc7343e3959ef0f939bd0bfd49ba9" }, "NeoColumn.nvim": { "branch": "main", "commit": "db7695c7c70fcacd290712deef659bca464634ee" }, "SmoothCursor.nvim": { "branch": "main", "commit": "12518b284e1e3f7c6c703b346815968e1620bee2" }, - "aerial.nvim": { "branch": "master", "commit": "5c0df1679bf7c814c924dc6646cc5291daca8363" }, + "aerial.nvim": { "branch": "master", "commit": "c7cbbad40c2065fccfd1f1863bb2c08180c0533d" }, "animation.nvim": { "branch": "main", "commit": "fb77091ab72ec9971aee0562e7081182527aaa6a" }, "baleia.nvim": { "branch": "main", "commit": "1b25eac3ac03659c3d3af75c7455e179e5f197f7" }, + "blink-cmp-copilot": { "branch": "main", "commit": "439cff78780c033aa23cf061d7315314b347e3c1" }, + "blink-cmp-latex": { "branch": "main", "commit": "3a958361e275bb5996e8393e7b2595b2f40c15ca" }, + "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, "buffer_manager.nvim": { "branch": "main", "commit": "4ae0b2de328ef1a7effad830d716c231fe9a6af2" }, - "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, - "cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" }, - "cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" }, - "cmp-dictionary": { "branch": "main", "commit": "fecc3ef2435c2be35818f8fcac4a6c5655f3a8f0" }, - "cmp-git": { "branch": "main", "commit": "169202582f900b0e189eed5153b291383bfbba47" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, - "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, - "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, - "cmp-vimtex": { "branch": "master", "commit": "5283bf9108ef33d41e704027b9ef22437ce7a15b" }, - "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "codecompanion.nvim": { "branch": "main", "commit": "bc861d6d7893c79fa3d7b570e8c924b83fb50523" }, + "codecompanion.nvim": { "branch": "main", "commit": "c88385d626c2e03f109cd12084b9f6b015a0238c" }, "color-picker.nvim": { "branch": "master", "commit": "06cb5f853535dea529a523e9a0e8884cdf9eba4d" }, "composer.nvim": { "branch": "main", "commit": "ec9537969adc7fc128cfe9c3a9925850455896c8" }, - "copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" }, - "copilot.lua": { "branch": "master", "commit": "55e43020dcd59c6da41cc773971380a003100844" }, + "copilot.lua": { "branch": "master", "commit": "e73fe7c43c68aeb84fbeed12ee6cc60a29e78fbb" }, "direnv.vim": { "branch": "master", "commit": "ab2a7e08dd630060cd81d7946739ac7442a4f269" }, "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, - "duck.nvim": { "branch": "main", "commit": "d8a6b08af440e5a0e2b3b357e2f78bb1883272cd" }, "elixir-tools.nvim": { "branch": "main", "commit": "f7e18753f5587b422aac628249fa46c66ed24af3" }, - "firenvim": { "branch": "master", "commit": "c927486daff6d1eb8a0d61fd9e264bc1bf5f2c36" }, + "firenvim": { "branch": "master", "commit": "0c3b81444944ed51e9eb50b158b71ee26b611575" }, "flutter-tools.nvim": { "branch": "main", "commit": "65b7399804315a1160933b64292d3c5330aa4e9f" }, - "fzf": { "branch": "master", "commit": "04c4269db3f8058d2afc301dfba49d497249eb5c" }, - "fzf-lua": { "branch": "main", "commit": "c6efab0fd1d8548a760e837629b84e400ac76c79" }, + "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, + "fzf": { "branch": "master", "commit": "5546c65491a26c7cd01e08d4ecc65eaab89b3363" }, + "fzf-lua": { "branch": "main", "commit": "fc180744df16aa04534971a13236e1c0b15949d1" }, "fzf.vim": { "branch": "master", "commit": "3725f364ccd25b85a91970720ba9bc2931861910" }, "git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" }, - "gitsigns.nvim": { "branch": "main", "commit": "b01433169be710d6c69f7b4ee264d9670698b831" }, + "gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" }, "guihua.lua": { "branch": "master", "commit": "87bea7b98429405caf2a0ce4d029b027bb017c70" }, "harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" }, "hurl.nvim": { "branch": "main", "commit": "33ff81c0027c1d0071174eb40257010c7ce61e62" }, "hydra.nvim": { "branch": "master", "commit": "3ced42c0b6a6c85583ff0f221635a7f4c1ab0dd0" }, "icon-picker.nvim": { "branch": "master", "commit": "3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3" }, "image.nvim": { "branch": "main", "commit": "acbd1d7d64ac0643021a6146eb0557e7c2e793d0" }, - "img-clip.nvim": { "branch": "main", "commit": "d8b6b030672f9f551a0e3526347699985a779d93" }, + "img-clip.nvim": { "branch": "main", "commit": "f33f3af9ba50f99d70f8fcb1a8575750ada4ea4a" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "indent-o-matic": { "branch": "master", "commit": "4d11e98f523d3c4500b1dc33f0d1a248a4f69719" }, "json-nvim": { "branch": "master", "commit": "beb76a5ffa0a936677695bc82cc868654aad4398" }, "laravel.nvim": { "branch": "main", "commit": "ea41c6d46bfff2fab0a78b7370fdbc335a0a8101" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "lspkind-nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, "lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" }, - "lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" }, + "lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" }, "luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" }, "markdown-preview.nvim": { "branch": "main", "commit": "cc05a30393e2bf9f12e2d59fc35a1aa928ed1727" }, - "markview.nvim": { "branch": "main", "commit": "ec33f2aa333ca1d76f51847922578434d7aeadf7" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "f2fa60409630ec2d24acf84494fb55e1d28d593c" }, + "markview.nvim": { "branch": "main", "commit": "4e5f93e054b1c3dce026731dfcea1e44b0941137" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "5e085efe67fccb13372d54331d849219662a7e93" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, - "mason.nvim": { "branch": "main", "commit": "3671ab0d40aa5bd24b1686562bd0a23391ecf76a" }, - "mcphub.nvim": { "branch": "main", "commit": "601fd364f329b2558e811e23942002c3516161d0" }, + "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, + "mcphub.nvim": { "branch": "main", "commit": "bd3dc1cf39812691c197989327cd36c41d5a1fb6" }, + "menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" }, "middleclass": { "branch": "master", "commit": "9fab4d5bca67262614960960ca35c4740eb2be2c" }, - "mini.diff": { "branch": "main", "commit": "f573bd2ae2eb225ea2f125126b8869e04bcaf231" }, - "mini.icons": { "branch": "main", "commit": "b8f6fa6f5a3fd0c56936252edcd691184e5aac0c" }, - "mini.nvim": { "branch": "main", "commit": "c122e852517adaf7257688e435369c050da113b1" }, + "mini.diff": { "branch": "main", "commit": "7077b636d642fcd5cd48554e187a251883239660" }, + "mini.icons": { "branch": "main", "commit": "f9a177c11daa7829389b7b6eaaec8b8a5c47052d" }, + "mini.nvim": { "branch": "main", "commit": "b5bae7dd5802b47bb03babfb374fdfdab02b9d8b" }, + "minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" }, "my-note.nvim": { "branch": "main", "commit": "bce15c38514df229eb446a6b6bef2fcbb1993e80" }, - "navigator.lua": { "branch": "master", "commit": "17ed4fafd213c5dc821dc6a7051b2b7f156410e4" }, + "navigator.lua": { "branch": "master", "commit": "f5dad314dadfa742127d820ed233265d71670ee9" }, "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, "neogen": { "branch": "main", "commit": "d7f9461727751fb07f82011051338a9aba07581d" }, "neorg": { "branch": "main", "commit": "790b0444c0c654131a722817dc893332e06c72b9" }, - "neotest": { "branch": "master", "commit": "3c81345c28cd639fcc02843ed3653be462f47024" }, + "neotest": { "branch": "master", "commit": "35a59c1f59dbb954d92b74ab64a966a668cea495" }, "neotest-go": { "branch": "main", "commit": "92950ad7be2ca02a41abca5c6600ff6ffaf5b5d6" }, "neotest-plenary": { "branch": "master", "commit": "3523adcf9ffaad1911960c5813b0136c1b63a2ec" }, "neotest-python": { "branch": "master", "commit": "ed9b4d794b89044cc32e5476e637936331473c6e" }, @@ -76,36 +69,34 @@ "none-ls-extras.nvim": { "branch": "main", "commit": "924fe88a9983c7d90dbb31fc4e3129a583ea0a90" }, "none-ls-luacheck.nvim": { "branch": "main", "commit": "a1dfea0d4c40c4023829c8b9a7ab0a26135985ca" }, "none-ls-shellcheck.nvim": { "branch": "main", "commit": "0f84461241e76e376a95fb7391deac82dc3efdbf" }, - "none-ls.nvim": { "branch": "main", "commit": "3ce66bc62eb363f19cceeb1fae2e71ea2bede56d" }, + "none-ls.nvim": { "branch": "main", "commit": "53ec77181d96494b9dc9457110dd62dc623cc78d" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "numb.nvim": { "branch": "master", "commit": "7f564e638d3ba367abf1ec91181965b9882dd509" }, "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, - "nvim-bqf": { "branch": "main", "commit": "dd17c73912487dccb372deff85d4262d2b89bc2b" }, - "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, + "nvim-bqf": { "branch": "main", "commit": "17680cda3538913e88dd4c6456c837db9ace40ae" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, - "nvim-dap": { "branch": "master", "commit": "5dd4d50f2e6a2eaf9e57fad023d294ef371bda35" }, + "nvim-dap": { "branch": "master", "commit": "7891b01beedc37cef4eaf2e92563bd0a5b6e9c58" }, "nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" }, - "nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" }, + "nvim-dap-python": { "branch": "master", "commit": "030385d03363988370adaa5cf21fa465daddb088" }, "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" }, "nvim-dap-vscode-js": { "branch": "main", "commit": "03bd29672d7fab5e515fc8469b7d07cc5994bbf6" }, - "nvim-early-retirement": { "branch": "main", "commit": "d9ffd8f70ed6d466cecd3e7e2dd1425b0010932f" }, - "nvim-html-css": { "branch": "main", "commit": "ee974cd3e72dc7b80876ec8b6d2a509e39e6fcdf" }, - "nvim-lspconfig": { "branch": "master", "commit": "3db16ceeea947517f0dc1404c24dcb5ab0c91d26" }, + "nvim-early-retirement": { "branch": "main", "commit": "1a5b09db3874f9e2c5b3f332b372c8cc972370f8" }, + "nvim-lspconfig": { "branch": "master", "commit": "408cf07b97535825cca6f1afa908d98348712ba6" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-notify": { "branch": "master", "commit": "397c7c1184745fca649e5104de659e6392ef5a4d" }, - "nvim-python-repl": { "branch": "main", "commit": "8642a06e68c468c98b5412258b81aab0f317cb18" }, + "nvim-python-repl": { "branch": "main", "commit": "952a4e26f0492ceea0054f274bde2702e506b87d" }, "nvim-spectre": { "branch": "master", "commit": "72f56f7585903cd7bf92c665351aa585e150af0f" }, "nvim-transparent": { "branch": "main", "commit": "8ac59883de84e9cd1850ea25cf087031c5ba7d54" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-treesitter-context": { "branch": "master", "commit": "02fd97c803962108d129cf42e05adc5eff7f89c1" }, - "nvim-treesitter-endwise": { "branch": "master", "commit": "d6cbb83307d516ec076d17c9a33d704ef626ee8c" }, + "nvim-treesitter-context": { "branch": "master", "commit": "dca8726fea2c14e1ce6adbaa76a04816fbfaff61" }, + "nvim-treesitter-endwise": { "branch": "master", "commit": "a61a9de7965324d4019fb1637b66bfacdcb01f51" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" }, "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, - "nvim-web-devicons": { "branch": "master", "commit": "4a8369f4c78ef6f6f895f0cec349e48f74330574" }, + "nvim-web-devicons": { "branch": "master", "commit": "f66cdfef5e84112045b9ebc3119fee9bddb3c687" }, "oil-git-status.nvim": { "branch": "main", "commit": "4b5cf53842c17a09420919e655a6a559da3112d7" }, "oil-image-preview.nvim": { "branch": "master", "commit": "a71eacc879e1264339a62019ee3c2ff376f2cc39" }, - "oil.nvim": { "branch": "master", "commit": "bbad9a76b2617ce1221d49619e4e4b659b3c61fc" }, + "oil.nvim": { "branch": "master", "commit": "07f80ad645895af849a597d1cac897059d89b686" }, "pathlib.nvim": { "branch": "main", "commit": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1" }, "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, @@ -113,28 +104,24 @@ "rayso.nvim": { "branch": "main", "commit": "4a94c6fa2410e3800cf47a03b8f5e5315595ba99" }, "refactoring.nvim": { "branch": "master", "commit": "74b608dfee827c2372250519d433cc21cb083407" }, "rustaceanvim": { "branch": "master", "commit": "e9c5aaba16fead831379d5f44617547a90b913c7" }, - "rustowl": { "branch": "main", "commit": "bc7f62f44896bad5682d6dee81f5aa9162d9b62a" }, - "smart-splits.nvim": { "branch": "master", "commit": "825073e87de5fae98b0c107917e15977d100323b" }, + "rustowl": { "branch": "main", "commit": "d95b4c5de6a373cf5030794dca1b0bbd83185ce8" }, + "smart-splits.nvim": { "branch": "master", "commit": "1ac316e6ea719843fd80716d1105613c98632af1" }, "solarized-osaka.nvim": { "branch": "main", "commit": "f796014c14b1910e08d42cc2077fef34f08e0295" }, "spinner.nvim": { "branch": "main", "commit": "67ae7f64a6a7940be10c226301413521da26ea72" }, "telescope-dap.nvim": { "branch": "master", "commit": "783366bd6c1e7fa0a5c59c07db37f49c805a28df" }, - "telescope-file-browser.nvim": { "branch": "master", "commit": "7bf55ed0ff5be182ad3301cff266581fc1c56cce" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "3610dc7dc91f06aa98b11dca5cc30dfa98626b7e" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" }, "telescope-live-grep-args.nvim": { "branch": "master", "commit": "b80ec2c70ec4f32571478b501218c8979fab5201" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, - "treesj": { "branch": "main", "commit": "3b4a2bc42738a63de17e7485d4cc5e49970ddbcc" }, + "treesj": { "branch": "main", "commit": "150a65052563e002acc1e7b46bc9f5f7a368a046" }, "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, "twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" }, - "undotree": { "branch": "master", "commit": "28f2f54a34baff90ea6f4a735ef1813ad875c743" }, - "vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" }, - "vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" }, - "vim-dadbod-ui": { "branch": "master", "commit": "2900a1617b3df1a48683d872eadbe1101146a49a" }, + "undotree": { "branch": "master", "commit": "fe9a9d0645f0f5532360b5e5f5c550d7bb4f1869" }, "vim-dispatch": { "branch": "master", "commit": "a2ff28abdb2d89725192db5b8562977d392a4d3f" }, "vim-dotenv": { "branch": "master", "commit": "5c51cfcf8d87280d6414e03cd6b253eb70ecb800" }, - "vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" }, "vim-eunuch": { "branch": "master", "commit": "e86bb794a1c10a2edac130feb0ea590a00d03f1e" }, "vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }, "vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" }, @@ -143,8 +130,9 @@ "vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" }, "vim-rhubarb": { "branch": "master", "commit": "5496d7c94581c4c9ad7430357449bb57fc59f501" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, - "vim-test": { "branch": "master", "commit": "fba18e168565f055d4061408ada0f6abd9ea8bbd" }, - "vimtex": { "branch": "master", "commit": "7f2633027c8f496a85284de0c11aa32f1e07e049" }, + "vim-test": { "branch": "master", "commit": "8c76f6c0953edaa13a37c29ac9c6a7bb56ddce89" }, + "vimtex": { "branch": "master", "commit": "dc90feacb86f7b85b0b791d8073eefc769a23725" }, + "volt": { "branch": "main", "commit": "7b8c5e790120d9f08c8487dcb80692db6d2087a1" }, "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } } diff --git a/lua/menus/colors.lua b/lua/menus/colors.lua new file mode 100644 index 0000000..a2f5553 --- /dev/null +++ b/lua/menus/colors.lua @@ -0,0 +1,17 @@ +return { + { + name = "Shades (explorar paletas)", + cmd = function() + vim.cmd("Shades") + end, + rtxt = "Shades", + }, + + { + name = "Huefy (selector de color)", + cmd = function() + require("minty.huefy").open() + end, + rtxt = "Huefy", + }, +} diff --git a/lua/menus/oil.lua b/lua/menus/oil.lua new file mode 100644 index 0000000..5c7594c --- /dev/null +++ b/lua/menus/oil.lua @@ -0,0 +1,101 @@ +return { + { + name = "Abrir Oil en cwd", + cmd = function() + vim.cmd.Oil() + end, + rtxt = ":Oil", + }, + + { + name = "Abrir Oil flotante", + cmd = function() + local oil = require("oil") + oil.open_float() + end, + rtxt = "float", + }, + + { name = "separator" }, + + { + name = "Refrescar", + cmd = function() + require("oil.actions").refresh.callback() + end, + rtxt = "gr", + }, + + { + name = "Padre (-)", + cmd = function() + require("oil.actions").parent.callback() + end, + rtxt = "-", + }, + + { + name = "Toggle ocultos", + cmd = function() + require("oil.actions").toggle_hidden.callback() + end, + rtxt = "g.", + }, + + { name = "separator" }, + + { + name = "Nueva carpeta", + cmd = function() + require("oil.actions").create.callback() + end, + rtxt = "+d", + }, + { + name = "Renombrar", + cmd = function() + require("oil.actions").rename.callback() + end, + rtxt = "rn", + }, + { + name = "Eliminar", + cmd = function() + require("oil.actions").delete.callback() + end, + rtxt = "dd", + }, + + { name = "separator" }, + + { + name = "Abrir en split", + cmd = function() + require("oil.actions").select_split.callback() + end, + rtxt = "", + }, + { + name = "Abrir en vsplit", + cmd = function() + require("oil.actions").select_vsplit.callback() + end, + rtxt = "", + }, + { + name = "Abrir en tab", + cmd = function() + require("oil.actions").select_tab.callback() + end, + rtxt = "", + }, + + { name = "separator" }, + + { + name = "Terminal aquí", + cmd = function() + require("oil.actions").open_terminal.callback() + end, + }, +} diff --git a/lua/pi/completition/blink.lua b/lua/pi/completition/blink.lua new file mode 100644 index 0000000..e69de29 diff --git a/lua/pi/completition/init.lua b/lua/pi/completition/init.lua index 73f13d1..4f93269 100644 --- a/lua/pi/completition/init.lua +++ b/lua/pi/completition/init.lua @@ -1,238 +1,2 @@ -local cmp = require "cmp" -local lspkind = require "lspkind" -local luasnip = require "luasnip" -local cmp_autopairs = require "nvim-autopairs.completion.cmp" -local compare = require "cmp.config.compare" - -cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done { map_char = { tex = "" } }) - -cmp.setup { - window = { - completion = { - border = "rounded", - -- winhighlight = 'Normal:Pmenu,FloatBorder:Pmenu,CursorLine:PmenuSel,Search:None', - -- winblend = vim.o.pumblend, - -- scrolloff = 0, - -- col_offset = 0, - -- side_padding = 1, - -- scrollbar = true, - }, - documentation = { - -- max_height = math.floor(WIDE_HEIGHT * (WIDE_HEIGHT / vim.o.lines)), - -- max_width = math.floor((WIDE_HEIGHT * 2) * (vim.o.columns / (WIDE_HEIGHT * 2 * 16 / 9))), - border = "rounded", - -- winhighlight = 'FloatBorder:NormalFloat', - -- winblend = vim.o.pumblend, - }, - }, - mapping = { - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.close() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - else - fallback() - end - end, { "i", "s" }), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.choice_active() then - luasnip.change_choice(1) - else - fallback() - end - end, { "i", "s" }), - [""] = cmp.mapping.select_prev_item(), - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Insert, - select = true, - }, - [""] = cmp.mapping.complete(), - }, - sources = { - { name = "dictionary", keyword_length = 2 }, - { name = "nvim_lua" }, - { name = "nvim_lsp" }, - { name = "path" }, - { name = "luasnip" }, - { name = "copilot" }, - { name = "vimtex" }, - -- { name = 'cmp_ai' }, - { - name = "html-css", - option = { - spa = { - enable = false, -- SPA mode is disabled by default - entry_file = "index.html", -- if entry_file is omitted, it defaults to index.html in root dir - }, - max_count = {}, -- not ready yet - enable_on = { "html", "css" }, -- set the file types you want the plugin to work on - file_extensions = { "css", "sass", "less" }, -- set the local filetypes from which you want to derive classes - style_sheets = { - -- example of remote styles, only css no js for now - "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css", - "https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css", - }, - }, - }, - { - name = "buffer", - keyword_length = 4, - option = { - get_bufnrs = function() - local bufs = {} - for _, win in ipairs(vim.api.nvim_list_wins()) do - local bufnr = vim.api.nvim_win_get_buf(win) - local buftype = vim.api.nvim_get_option_value("buftype", { buf = bufnr }) - if buftype ~= "terminal" then - bufs[bufnr] = true - end - end - return vim.tbl_keys(bufs) - end, - }, - }, - }, - - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - - formatting = { - format = function(entry, vim_item) - if entry.source.name == "html-css" then - source_mapping["html-css"] = "[" .. entry.completion_item.provider .. "]" or "[html-css]" - end - local KIND_ICONS = { - Tailwind = "󰹞󰹞󰹞󰹞󰹞󰹞󰹞󰹞", - Copilot = "", - CodeCompanion = "", - Ollama = "", - Text = "󰉿", - Method = "󰆧", - Function = "󰊕", - Constructor = "", - Field = "󰜢", - Variable = "󰀫", - Class = "󰠱", - Interface = "", - Module = "", - Property = "󰜢", - Unit = "󰑭", - Value = "󰎠", - Enum = "", - Keyword = "󰌋", - Snippet = "", - Color = "󰏘", - File = "󰈙", - Reference = "󰈇", - Folder = "󰉋", - EnumMember = "", - Constant = "󰏿", - Struct = "󰙅", - Event = "", - Operator = "󰆕", - Codeium = "", - TypeParameter = "󰜅", - OpenAI = "", - TinyLlama = "󱝊", - LlamaCPP = "", - } - - if vim_item.kind == "Color" and entry.completion_item.documentation then - local _, _, r, g, b = - ---@diagnostic disable-next-line: param-type-mismatch - string.find(entry.completion_item.documentation, "^rgb%((%d+), (%d+), (%d+)") - - if r and g and b then - local color = string.format("%02x", r) .. string.format("%02x", g) .. string.format("%02x", b) - local group = "Tw_" .. color - - if vim.api.nvim_call_function("hlID", { group }) < 1 then - vim.api.nvim_command("highlight" .. " " .. group .. " " .. "guifg=#" .. color) - end - - vim_item.kind = KIND_ICONS.Tailwind - vim_item.kind_hl_group = group - - return vim_item - end - end - - vim_item.kind = KIND_ICONS[vim_item.kind] or vim_item.kind - -- Add maxwidth and ellipsis_char in the middle - local maxwidth = 50 - local ellipsis_char = "..." - if #vim_item.abbr > maxwidth then - local half_width = math.floor((maxwidth - #ellipsis_char) / 2) - vim_item.abbr = string.sub(vim_item.abbr, 1, half_width) - .. ellipsis_char - .. string.sub(vim_item.abbr, -half_width) - end - return vim_item - end, - }, - - sorting = { - priority_weight = 2, - comparators = { - compare.kind, - compare.sort_text, - }, - }, - - experimental = { - native_menu = false, - - ghost_text = false, - }, -} - -vim.api.nvim_set_hl(0, "CmpItemKindCopilot", { fg = "#3426C3" }) -vim.api.nvim_set_hl(0, "CmpItemKindCodeium", { fg = "#2ACDBA" }) -vim.api.nvim_set_hl(0, "CmpItemKindOllama", { fg = "#FDFEFF" }) -vim.api.nvim_set_hl(0, "CmpItemKindOpenAI", { fg = "#080808" }) -vim.api.nvim_set_hl(0, "CmpItemKindTinyLlama", { fg = "#DF468C" }) -vim.api.nvim_set_hl(0, "CmpItemKindLlamaCPP", { fg = "#FF8235" }) - --- Set configuration for specific filetype. -cmp.setup.filetype("gitcommit", { - sources = cmp.config.sources({ - { name = "cmp_git" }, -- You can specify the `cmp_git` source if you were installed it. - }, { - { name = "buffer" }, - }), -}) - --- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline("/", { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = "buffer" }, - }, -}) - --- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline(":", { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = "path" }, - }, { - { name = "cmdline" }, - }), -}) - -cmp.setup.filetype({ "sql", "mysql", "plsql" }, { - sources = cmp.config.sources({ - { name = "vim-dadbod-completion" }, - }, { - { name = "buffer" }, - }), -}) +-- Load blink.cmp configuration +require "pi.completition.blink" diff --git a/lua/pi/completition/init_new.lua b/lua/pi/completition/init_new.lua new file mode 100644 index 0000000..e69de29 diff --git a/lua/pi/dap/configs/javascript.lua b/lua/pi/dap/configs/javascript.lua index ef616f1..30388ac 100644 --- a/lua/pi/dap/configs/javascript.lua +++ b/lua/pi/dap/configs/javascript.lua @@ -1,22 +1,22 @@ -local dap = require('dap') +local dap = require "dap" dap.adapters.firefox = { - type = 'executable', - command = 'firefox-debug-adapter', + type = "executable", + command = "firefox-debug-adapter", } -for _, language in ipairs({ "typescript", "javascript", "javascriptreact", "typescriptreact" }) do +for _, language in ipairs { "typescript", "javascript", "javascriptreact", "typescriptreact" } do dap.configurations[language] = { { - name = 'Debug with Firefox', - type = 'firefox', - request = 'launch', - reAttach = true, - url = 'http://localhost:5173', - webRoot = '${workspaceFolder}', - firefoxExecutable = '/home/elvis/.local/bin/firefox', - -- firefoxArgs = {'-start-debugger-server', '--new-instance'}, - enableCRAWorkaround = true, - liftAccessorsFromPrototypes = 3, + name = "Debug with Firefox", + type = "firefox", + request = "launch", + reAttach = true, + url = "http://localhost:3000", + webRoot = "${workspaceFolder}", + firefoxExecutable = "/home/elvis/App/firefox/firefox", + -- firefoxArgs = {'-start-debugger-server', '--new-instance'}, + enableCRAWorkaround = true, + liftAccessorsFromPrototypes = 3, }, } end diff --git a/lua/pi/lsp/default.lua b/lua/pi/lsp/default.lua index b2020db..01e4d73 100644 --- a/lua/pi/lsp/default.lua +++ b/lua/pi/lsp/default.lua @@ -38,6 +38,7 @@ return { return vim.tbl_deep_extend("force", { on_attach = require"pi.lsp.attach", flags = require "pi.lsp.flags", + capabilities = require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities()), }, options) end, } diff --git a/lua/pi/lsp/servers/clangd.lua b/lua/pi/lsp/servers/clangd.lua index 87633cd..e989cf6 100644 --- a/lua/pi/lsp/servers/clangd.lua +++ b/lua/pi/lsp/servers/clangd.lua @@ -2,7 +2,7 @@ local lsp_attach = require "pi.lsp.attach" local lsp_flags = require "pi.lsp.flags" return function(ops) - local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()) + local capabilities = require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities()) local config = { on_attach = lsp_attach, flags = lsp_flags, diff --git a/lua/pi/lsp/servers/emmet_ls.lua b/lua/pi/lsp/servers/emmet_ls.lua index 717edf8..e79a052 100644 --- a/lua/pi/lsp/servers/emmet_ls.lua +++ b/lua/pi/lsp/servers/emmet_ls.lua @@ -2,7 +2,7 @@ local lsp_attach = require "pi.lsp.attach" local lsp_flags = require "pi.lsp.flags" return function(ops) - local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()) + local capabilities = require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities()) return vim.tbl_extend("force", { on_attach = lsp_attach, flags = lsp_flags, 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 = { "─", "│", "─",