From 1fd0af14d592d612c2aaab7717c04c8806ba3daa Mon Sep 17 00:00:00 2001 From: Elvis Claros Castro Date: Thu, 11 Jul 2024 05:12:18 -0300 Subject: Feat: Todo actulizado --- after/queries/blade/injections.scm | 7 +- lazy-lock.json | 159 ++++++++++++--------- lua/alpha/completition/init.lua | 94 ++++++++++-- lua/alpha/dap/configs/dart.lua | 2 +- lua/alpha/dap/configs/elixir.lua | 52 +++++++ lua/alpha/dap/configs/javascript.lua | 103 +++++++------ lua/alpha/dap/init.lua | 4 +- lua/alpha/lsp/attach.lua | 2 +- lua/alpha/lsp/default.lua | 1 + lua/alpha/lsp/servers/kotlin.lua | 1 - lua/alpha/lsp/servers/vscode_smarty_langserver.lua | 25 ++++ lua/config/autocmds.lua | 12 ++ lua/config/keymaps.lua | 7 +- lua/plugins/buffer_manager.lua | 24 ++++ lua/plugins/colorscheme.lua | 47 ++++-- lua/plugins/completition.lua | 16 +-- lua/plugins/elixir.lua | 34 +++++ lua/plugins/indent-o-matic.lua | 5 + lua/plugins/lualine.lua | 148 ++++++++++++++----- lua/plugins/luarocks.lua | 5 + lua/plugins/nvim-bqf.lua | 10 ++ lua/plugins/smart-splits.lua | 8 +- lua/plugins/smooth-cursor.lua | 32 ----- lua/plugins/smooth-cursor.lua.n | 32 +++++ lua/plugins/telescope.lua | 2 + lua/plugins/treesitter-context.lua | 13 ++ lua/plugins/treesitter.lua | 40 +++++- lua/plugins/treesj.lua | 11 ++ lua/plugins/undotree.lua | 11 ++ lua/plugins/vim-illuminate.lua | 21 +++ lua/plugins/vim-lastplace.lua | 4 + lua/plugins/which-key.lua | 14 ++ queries/php/injections.scm | 2 +- queries/phpdoc/highlights.scm | 3 +- 34 files changed, 725 insertions(+), 226 deletions(-) create mode 100644 lua/alpha/dap/configs/elixir.lua delete mode 100644 lua/alpha/lsp/servers/kotlin.lua create mode 100644 lua/alpha/lsp/servers/vscode_smarty_langserver.lua create mode 100644 lua/plugins/buffer_manager.lua create mode 100644 lua/plugins/elixir.lua create mode 100644 lua/plugins/indent-o-matic.lua create mode 100644 lua/plugins/luarocks.lua create mode 100644 lua/plugins/nvim-bqf.lua delete mode 100644 lua/plugins/smooth-cursor.lua create mode 100644 lua/plugins/smooth-cursor.lua.n create mode 100644 lua/plugins/treesitter-context.lua create mode 100644 lua/plugins/treesj.lua create mode 100644 lua/plugins/undotree.lua create mode 100644 lua/plugins/vim-illuminate.lua create mode 100644 lua/plugins/vim-lastplace.lua create mode 100644 lua/plugins/which-key.lua diff --git a/after/queries/blade/injections.scm b/after/queries/blade/injections.scm index e16f739..b3156d0 100644 --- a/after/queries/blade/injections.scm +++ b/after/queries/blade/injections.scm @@ -1,6 +1,7 @@ -((php) @injection.content - (#set! injection.language "php") - (#set! injection.combined)) +((text) @injection.content + (#not-has-ancestor? @injection.content "envoy") + (#set! injection.combined) + (#set! injection.language php)) ((php_only) @injection.content (#set! injection.combined) (#set! injection.language php_only)) diff --git a/lazy-lock.json b/lazy-lock.json index be314ce..a248747 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,103 +1,120 @@ { - "CodeGPT.nvim": { "branch": "master", "commit": "6e3714e8d336aea4a205081d44ed8b2e3505dee2" }, - "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, + "CodeGPT.nvim": { "branch": "master", "commit": "6333509027c8dd66b646e0f70c0ea6b2c283abae" }, + "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "500981ff6cefc7343e3959ef0f939bd0bfd49ba9" }, "NeoColumn.nvim": { "branch": "main", "commit": "db7695c7c70fcacd290712deef659bca464634ee" }, - "SmoothCursor.nvim": { "branch": "main", "commit": "cc8780622a7b7c328f774762fa2d97d9f83be828" }, "animation.nvim": { "branch": "main", "commit": "fb77091ab72ec9971aee0562e7081182527aaa6a" }, - "baleia.nvim": { "branch": "main", "commit": "00bb4af31c8c3865b735d40ebefa6c3f07b2dd16" }, + "baleia.nvim": { "branch": "main", "commit": "4d3b27dbec65a44ceecd9306f605a980bcf4e9b1" }, + "buffer_manager.nvim": { "branch": "main", "commit": "fd36131b2b3e0f03fd6353ae2ffc88cf920b3bbb" }, + "catppuccin": { "branch": "main", "commit": "47bd419c0cb776cb0a67ebb525891eca44020b59" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, + "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" }, - "cmp-dictionary": { "branch": "main", "commit": "363ce91a198ea255d847a189c723c6d4e3bc4a91" }, + "cmp-dictionary": { "branch": "main", "commit": "e6e3ec979b586a75c53e72f2d6a035f28bb3979c" }, "cmp-git": { "branch": "main", "commit": "169202582f900b0e189eed5153b291383bfbba47" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "color-picker.nvim": { "branch": "master", "commit": "06cb5f853535dea529a523e9a0e8884cdf9eba4d" }, "composer.nvim": { "branch": "main", "commit": "ec9537969adc7fc128cfe9c3a9925850455896c8" }, - "copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" }, - "copilot.lua": { "branch": "master", "commit": "38a41d0d78f8823cc144c99784528b9a68bdd608" }, + "copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" }, + "copilot.lua": { "branch": "master", "commit": "86537b286f18783f8b67bccd78a4ef4345679625" }, "direnv.vim": { "branch": "master", "commit": "ab2a7e08dd630060cd81d7946739ac7442a4f269" }, - "dressing.nvim": { "branch": "master", "commit": "8b7ae53d7f04f33be3439a441db8071c96092d19" }, - "duck.nvim": { "branch": "main", "commit": "977b4aa4004726ed3d87b2437f543cef2153b8ea" }, - "firenvim": { "branch": "master", "commit": "8c6c00aae7e5762cbcb4cd0df5848e959c4a9572" }, - "flutter-tools.nvim": { "branch": "main", "commit": "7350750d46fbeb4d2bb4878157b658d435935299" }, - "fzf": { "branch": "master", "commit": "82954258c1c9f61bb6bb764c51470ffbcee01b6c" }, - "fzf.vim": { "branch": "master", "commit": "1e054c1d075d87903647db9320116d360eb8b024" }, + "dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" }, + "duck.nvim": { "branch": "main", "commit": "d8a6b08af440e5a0e2b3b357e2f78bb1883272cd" }, + "elixir-tools.nvim": { "branch": "main", "commit": "5e7596be469be0800e9cbe3415de971f7286c3d0" }, + "firenvim": { "branch": "master", "commit": "c6e37476ab3b58cf01ababfe80ec9335798e70e5" }, + "flutter-tools.nvim": { "branch": "main", "commit": "5aa227fa083fd740184b55b5220dfabc24a25cc7" }, + "fzf": { "branch": "master", "commit": "9e92b6f11e0f59272de410f56493893334071e6e" }, + "fzf.vim": { "branch": "master", "commit": "279e1ec068f526e985ee7e3f62a71f083bbe0196" }, "git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" }, - "gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" }, - "harpoon": { "branch": "master", "commit": "867e212ac153e793f95b316d1731f3ca1894625e" }, + "gitsigns.nvim": { "branch": "main", "commit": "375c44bdfdde25585466a966f00c2e291db74f2d" }, + "harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" }, "hydra.nvim": { "branch": "master", "commit": "3ced42c0b6a6c85583ff0f221635a7f4c1ab0dd0" }, - "icon-picker.nvim": { "branch": "master", "commit": "8e89c06411584e02a928b3baaee056eab24466b3" }, - "image.nvim": { "branch": "main", "commit": "dcabdf47b0b974b61d08eeafa2c519927e37cf27" }, - "indent-blankline.nvim": { "branch": "master", "commit": "7206c77cb931f79885fc47f88ae18f99148392eb" }, - "laravel.nvim": { "branch": "main", "commit": "8f8a0eab84191b1867b2f188cf475e6a05203908" }, - "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, - "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, - "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, + "icon-picker.nvim": { "branch": "master", "commit": "3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3" }, + "image.nvim": { "branch": "main", "commit": "acbd1d7d64ac0643021a6146eb0557e7c2e793d0" }, + "indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" }, + "indent-o-matic": { "branch": "master", "commit": "4d11e98f523d3c4500b1dc33f0d1a248a4f69719" }, + "laravel.nvim": { "branch": "main", "commit": "8aaf614b5c8fc045f75ebc2ba69d68e33847b06d" }, + "lazy.nvim": { "branch": "main", "commit": "d1de92dffab5a862332fdd1892889d362369c12f" }, + "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, + "lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" }, + "lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" }, + "lualine.nvim": { "branch": "master", "commit": "6a40b530539d2209f7dc0492f3681c8c126647ad" }, + "luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" }, "markdown-preview.nvim": { "branch": "main", "commit": "cc05a30393e2bf9f12e2d59fc35a1aa928ed1727" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "8b70e7f1e0a4119c1234c3bde4a01c241cabcc74" }, - "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, + "mason.nvim": { "branch": "main", "commit": "f96a31855fa8aea55599cea412fe611b85a874ed" }, "middleclass": { "branch": "master", "commit": "9fab4d5bca67262614960960ca35c4740eb2be2c" }, - "neodev.nvim": { "branch": "main", "commit": "c4ce017bd4bacf60bf59330cec9e93c5d5e104a6" }, - "neogen": { "branch": "main", "commit": "70127baaff25611deaf1a29d801fc054ad9d2dc1" }, - "neorg": { "branch": "main", "commit": "baaf13a3145534144b795ad37db22bfffd2ad343" }, - "neotest": { "branch": "master", "commit": "8782d83869c64700fa419bd5278f4f62c80a2c1a" }, - "neotest-go": { "branch": "main", "commit": "d29d20d912aca81a07c50022d880cc66f0d26542" }, + "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, + "neogen": { "branch": "main", "commit": "6de0add4805165317ab7d3d36b5cef48b1b865f3" }, + "neorg": { "branch": "main", "commit": "db75bb60ba5e565051cf7bb18c8b1a519ed58d3a" }, + "neotest": { "branch": "master", "commit": "26ed90509c377d10dbdebd25b7094a886323b32b" }, + "neotest-go": { "branch": "main", "commit": "92950ad7be2ca02a41abca5c6600ff6ffaf5b5d6" }, "neotest-plenary": { "branch": "master", "commit": "dcaf5ed67a9e28a246e9783319e5aa6c9ea1c584" }, - "neotest-rust": { "branch": "main", "commit": "48c1e146ed0eb775fef6aca75903baf3cedadc01" }, + "neotest-rust": { "branch": "main", "commit": "0418811e1e3499b2501593f2e131d02f5e6823d4" }, "neotest-vim-test": { "branch": "master", "commit": "75c4228882ae4883b11bfce9b8383e637eb44192" }, - "noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" }, - "nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" }, + "noice.nvim": { "branch": "main", "commit": "04ff1defa257db569a687ec16051a27fbaeb0e2f" }, + "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, "numb.nvim": { "branch": "master", "commit": "3f7d4a74bd456e747a1278ea1672b26116e0824d" }, - "nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" }, - "nvim-cmp": { "branch": "main", "commit": "41d7633e4146dce1072de32cea31ee31b056a131" }, - "nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" }, - "nvim-dap": { "branch": "master", "commit": "bbe2c6f3438542a37cc2141a8e385f7dfe07d87d" }, - "nvim-dap-go": { "branch": "main", "commit": "a5cc8dcad43f0732585d4793deb02a25c4afb766" }, - "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, + "nvim-autopairs": { "branch": "master", "commit": "78a4507bb9ffc9b00f11ae0ac48243d00cb9194d" }, + "nvim-bqf": { "branch": "main", "commit": "1b24dc6050c34e8cd377b6b4cd6abe40509e0187" }, + "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, + "nvim-dap": { "branch": "master", "commit": "6f79b822997f2e8a789c6034e147d42bc6706770" }, + "nvim-dap-go": { "branch": "main", "commit": "3999f0744e80d2dba5775189fc7c7a5e9846053e" }, + "nvim-dap-ui": { "branch": "master", "commit": "b7267003ba4dd860350be86f75b9d9ea287cedca" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "484995d573c0f0563f6a66ebdd6c67b649489615" }, "nvim-dap-vscode-js": { "branch": "main", "commit": "03bd29672d7fab5e515fc8469b7d07cc5994bbf6" }, - "nvim-lspconfig": { "branch": "master", "commit": "f451052bd6804e9e5ccd0ac874d7df8d3d4c55b9" }, - "nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" }, - "nvim-python-repl": { "branch": "main", "commit": "9ed71cc744643171307445b1e4eca5ed48f822e1" }, - "nvim-spectre": { "branch": "master", "commit": "a18a58015b46f02b4fe537ebfffd82e46110ff24" }, + "nvim-lspconfig": { "branch": "master", "commit": "cf97d2485fc3f6d4df1b79a3ea183e24c272215e" }, + "nvim-nio": { "branch": "master", "commit": "7969e0a8ffabdf210edd7978ec954a47a737bbcc" }, + "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, + "nvim-python-repl": { "branch": "main", "commit": "3d63e4f298233cb97e0fb2d8360857120235112f" }, + "nvim-spectre": { "branch": "master", "commit": "9a28f926d3371b7ef02243cbbb653a0478d06e31" }, "nvim-transparent": { "branch": "main", "commit": "fd35a46f4b7c1b244249266bdcb2da3814f01724" }, - "nvim-treesitter": { "branch": "master", "commit": "78d75bce03f218ee30aedb6e24e3ec1189a3e9ff" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, - "nvim-web-devicons": { "branch": "master", "commit": "8b2e5ef9eb8a717221bd96cb8422686d65a09ed5" }, - "oil.nvim": { "branch": "master", "commit": "24027ed8d7f3ee5c38cfd713915e2e16d89e79b3" }, + "nvim-treesitter": { "branch": "master", "commit": "4068e1c0966eee10bc8937b54f8cf8f68b76961f" }, + "nvim-treesitter-context": { "branch": "master", "commit": "f56a1430f21334868a86eb980b12e0af55690e98" }, + "nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" }, + "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" }, + "oil.nvim": { "branch": "master", "commit": "10fbfdd37b6904c0776c5db1a27ab47eecba335e" }, + "pathlib.nvim": { "branch": "main", "commit": "7a5a6facd29e306bc73a37719fa67c0d2226f852" }, "phpactor.nvim": { "branch": "main", "commit": "0aa4ad09c2024e24d630c0ec616d65396caa39e0" }, - "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, + "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, + "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, - "refactoring.nvim": { "branch": "master", "commit": "156532476deb10b1b2a32cb38e1078b3f9951c42" }, - "rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" }, - "smart-splits.nvim": { "branch": "master", "commit": "f0003bf9c3f11b8b9209264f865b8864453ca926" }, - "telescope-dap.nvim": { "branch": "master", "commit": "4e2d5efb92062f0b865fe59b200b5ed7793833bf" }, - "telescope-file-browser.nvim": { "branch": "master", "commit": "8e0543365fe5781c9babea7db89ef06bcff3716d" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, + "refactoring.nvim": { "branch": "master", "commit": "d07218748c48e756c27aa6859bfa6e62a3d271af" }, + "rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" }, + "smart-splits.nvim": { "branch": "master", "commit": "95833675cd92538bf9cded1d2d58d1fc271c5428" }, + "telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "a7ab9a957b17199183388c6f357d614fcaa508e5" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" }, + "telescope-live-grep-args.nvim": { "branch": "master", "commit": "8ad632f793fd437865f99af5684f78300dac93fb" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "6213322ab56eb27356fdc09a5078e41e3ea7f3bc" }, - "todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" }, - "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, - "twilight.nvim": { "branch": "main", "commit": "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" }, - "vim-dadbod": { "branch": "master", "commit": "738cfc2ea6a1510fe23cba9006fef9291be70f7b" }, - "vim-dadbod-completion": { "branch": "master", "commit": "c920cb0ba3dff4b1b0ed373e1c0b3007dec696c2" }, - "vim-dadbod-ui": { "branch": "master", "commit": "9ddb0623e69d696b7a8355b93e3950a8dc6e00a0" }, - "vim-dispatch": { "branch": "master", "commit": "6cc2691576f97d43f8751664d1a1a908b99927e5" }, + "telescope.nvim": { "branch": "master", "commit": "bfcc7d5c6f12209139f175e6123a7b7de6d9c18a" }, + "todo-comments.nvim": { "branch": "main", "commit": "313b04e5b02d29ab9275c9295ff5e2b73921b0eb" }, + "treesj": { "branch": "main", "commit": "6e8bd008bacd5ad001c3953017c1dca20709e915" }, + "trouble.nvim": { "branch": "main", "commit": "4453fea6bb597830fbd58d2c484612f37b97bd8c" }, + "twilight.nvim": { "branch": "main", "commit": "da4fe0a9e1397ecd9b012c52fb34313fbd3b862f" }, + "undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" }, + "vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" }, + "vim-dadbod-completion": { "branch": "master", "commit": "8c9051c1cfc73fcf5bfe9a84db7097e4f7c0180d" }, + "vim-dadbod-ui": { "branch": "master", "commit": "acfb660447f41634b6a299039e034abac126653a" }, + "vim-dispatch": { "branch": "master", "commit": "4c695bc052cad2ae6b980aebbe48d046466e27ae" }, "vim-dotenv": { "branch": "master", "commit": "5c51cfcf8d87280d6414e03cd6b253eb70ecb800" }, - "vim-easy-align": { "branch": "master", "commit": "12dd6316974f71ce333e360c0260b4e1f81169c3" }, - "vim-enfocado": { "branch": "main", "commit": "2a8fffdff1a20473f0fbacef10f2fb356e039b31" }, - "vim-eunuch": { "branch": "master", "commit": "67f3dd32b4dcd1c427085f42ff5f29c7adc645c6" }, - "vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" }, - "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, + "vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" }, + "vim-eunuch": { "branch": "master", "commit": "8fb3904be27b6b60d086f87c2570085902414069" }, + "vim-fugitive": { "branch": "master", "commit": "8c8cdf4405cb8bdb70dd9812a33bb52363a87dbc" }, + "vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, + "vim-lastplace": { "branch": "master", "commit": "e58cb0df716d3c88605ae49db5c4741db8b48aa9" }, + "vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" }, "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, - "vim-test": { "branch": "master", "commit": "84373ffca386edd667e09f2bf1024b1de7bdfdf1" } + "vim-test": { "branch": "master", "commit": "34aab77f7a63f20a623df45684156915f6182a55" }, + "which-key.nvim": { "branch": "main", "commit": "af4ded85542d40e190014c732fa051bdbf88be3d" } } \ No newline at end of file diff --git a/lua/alpha/completition/init.lua b/lua/alpha/completition/init.lua index 9933971..667e30b 100644 --- a/lua/alpha/completition/init.lua +++ b/lua/alpha/completition/init.lua @@ -7,6 +7,24 @@ 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), @@ -68,18 +86,70 @@ cmp.setup { }, formatting = { - format = lspkind.cmp_format { - with_text = true, - menu = { - buffer = "[buf]", - nvim_lsp = "[ ]", - nvim_lua = "[api]", - path = "[path]", - luasnip = "[snip]", - copilot = "[ﮧ ]", - ["vim-dadbod-completion"] = "[DB]", - }, - }, + format = function (entry, vim_item) + lspkind.cmp_format { + with_text = true, + menu = { + buffer = "[buf]", + nvim_lsp = "[ ]", + nvim_lua = "[api]", + path = "[path]", + luasnip = "[snip]", + copilot = "[ﮧ ]", + ["vim-dadbod-completion"] = "[DB]", + }, + } + local KIND_ICONS = { + Tailwind = '󰹞󰹞󰹞󰹞󰹞󰹞󰹞󰹞', + Color = ' ', + -- Class = 7, + -- Constant = '󰚞', + -- Constructor = 4, + -- Enum = 13, + -- EnumMember = 20, + -- Event = 23, + -- Field = 5, + -- File = 17, + -- Folder = 19, + -- Function = 3, + -- Interface = 8, + -- Keyword = 14, + -- Method = 2, + -- Module = 9, + -- Operator = 24, + -- Property = 10, + -- Reference = 18, + Snippet = " ", + -- Struct = 22, + -- Text = "", + -- TypeParameter = 25, + -- Unit = 11, + -- Value = 12, + -- Variable = 6 + } + 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 + return vim_item + end }, sorting = { diff --git a/lua/alpha/dap/configs/dart.lua b/lua/alpha/dap/configs/dart.lua index cdb7a47..a23c118 100644 --- a/lua/alpha/dap/configs/dart.lua +++ b/lua/alpha/dap/configs/dart.lua @@ -27,6 +27,6 @@ dap.configurations.dart = { -- The nvim-dap plugin populates this variable with the editor's current working directory cwd = "${workspaceFolder}", -- This gets forwarded to the Flutter CLI tool, substitute `linux` for whatever device you wish to launch - toolArgs = {"-d", "192.168.0.15:5555"} + toolArgs = {"-d", "192.168.0.33:5555"} } } diff --git a/lua/alpha/dap/configs/elixir.lua b/lua/alpha/dap/configs/elixir.lua new file mode 100644 index 0000000..bf732ce --- /dev/null +++ b/lua/alpha/dap/configs/elixir.lua @@ -0,0 +1,52 @@ +local dap = require('dap') + +dap.adapters.mix_task = { + type = 'executable', + command = 'elixir-ls-debugger', -- El comando 'elixir-ls' está en $PATH + args = {} +} + +dap.configurations.elixir = { + { + type = "mix_task", + name = "mix (Default task)", + request = "launch", + projectDir = "${workspaceRoot}" + }, + { + type = "mix_task", + name = "mix test", + request = "launch", + task = 'test', + env = { + MIX_ENV = "test", + MIX_TARGET = "host", + HEX_UNSAFE_HTTPS = 1 + }, + taskArgs = {"--trace"}, + startApps = true, -- for Phoenix projects + projectDir = "${workspaceFolder}", + requireFiles = { + "test/**/test_helper.exs", + "test/**/*_test.exs" + } + }, + { + type = "mix_task", + name = "phx server", + request = "launch", + stackTraceMode = "all", + task = 'phx.server', + debugAutoInterpretAllModules = true, + noDebug = false, + exitAfterTaskReturns = false, + env = { + MIX_ENV = "dev", + MIX_TARGET = "host", + HEX_UNSAFE_HTTPS = 1 + }, + startApps = false, -- for Phoenix projects + taskArgs = {"--no-halt", "--open"}, + projectDir = "${workspaceFolder}", + }, +} diff --git a/lua/alpha/dap/configs/javascript.lua b/lua/alpha/dap/configs/javascript.lua index b910f30..03173ba 100644 --- a/lua/alpha/dap/configs/javascript.lua +++ b/lua/alpha/dap/configs/javascript.lua @@ -1,45 +1,62 @@ -require("dap-vscode-js").setup { - debugger_cmd = { "js-debug-adapter" }, - adapters = { "pwa-node", "pwa-chrome", "node-terminal" }, +local dap = require('dap') +dap.adapters.firefox = { + type = 'executable', + command = 'firefox-debug-adapter', } -for _, language in ipairs { "typescript", "javascript" } do - require("dap").configurations[language] = { - { - type = "pwa-node", - request = "launch", - name = "Launch file", - program = "${file}", - cwd = "${workspaceFolder}", - }, - { - type = "pwa-node", - request = "attach", - name = "Attach", - processId = require("dap.utils").pick_process, - cwd = "${workspaceFolder}", - }, - } -end - -for _, language in ipairs { "typescriptreact", "javascriptreact" } do - require("dap").configurations[language] = { - { - type = "pwa-chrome", - name = "Attach - Remote Debugging", - request = "attach", - program = "${file}", - cwd = vim.fn.getcwd(), - sourceMaps = true, - protocol = "inspector", - port = 9222, - webRoot = "${workspaceFolder}", - }, - { - type = "pwa-chrome", - name = "Launch Chrome", - request = "launch", - url = "http://localhost:3000", - }, - } -end +dap.configurations.typescript = { + { + name = 'Debug with Firefox', + type = 'firefox', + request = 'launch', + reAttach = true, + url = 'http://localhost:3010', + webRoot = '${workspaceFolder}', + firefoxExecutable = '/home/elvis/.local/bin/firefox' + }, +} +-- require("dap-vscode-js").setup { +-- debugger_cmd = { "js-debug-adapter" }, +-- adapters = { "pwa-node", "pwa-chrome", "node-terminal" }, +-- } +-- +-- for _, language in ipairs { "typescript", "javascript" } do +-- require("dap").configurations[language] = { +-- { +-- type = "pwa-node", +-- request = "launch", +-- name = "Launch file", +-- program = "${file}", +-- cwd = "${workspaceFolder}", +-- }, +-- { +-- type = "pwa-node", +-- request = "attach", +-- name = "Attach", +-- processId = require("dap.utils").pick_process, +-- cwd = "${workspaceFolder}", +-- }, +-- } +-- end +-- +-- for _, language in ipairs { "typescriptreact", "javascriptreact" } do +-- require("dap").configurations[language] = { +-- { +-- type = "pwa-chrome", +-- name = "Attach - Remote Debugging", +-- request = "attach", +-- program = "${file}", +-- cwd = vim.fn.getcwd(), +-- sourceMaps = true, +-- protocol = "inspector", +-- port = 9222, +-- webRoot = "${workspaceFolder}", +-- }, +-- { +-- type = "pwa-chrome", +-- name = "Launch Chrome", +-- request = "launch", +-- url = "http://localhost:3000", +-- }, +-- } +-- end diff --git a/lua/alpha/dap/init.lua b/lua/alpha/dap/init.lua index 44b3e50..12ea352 100644 --- a/lua/alpha/dap/init.lua +++ b/lua/alpha/dap/init.lua @@ -1,5 +1,7 @@ local dap, dapui, hydra = require "dap", require "dapui", require "hydra" +dap.set_log_level('TRACE') + -- Setup Virtual Text require("nvim-dap-virtual-text").setup {} @@ -15,7 +17,7 @@ vim.fn.sign_define("DapBreakpointCondition", { text = "❓", texthl = "", linehl vim.fn.sign_define("DapLogPoint", { text = "💬", texthl = "", linehl = "", numhl = "" }) -- UI structure -dapui.setup { +dapui.setup { icons = { expanded = "▾", collapsed = "▸" }, layouts = { { diff --git a/lua/alpha/lsp/attach.lua b/lua/alpha/lsp/attach.lua index e71cb75..7c7413c 100644 --- a/lua/alpha/lsp/attach.lua +++ b/lua/alpha/lsp/attach.lua @@ -24,6 +24,6 @@ return function(client, bufnr) vim.bo.omnifunc = "v:lua.vim.lsp.omnifunc" if client.server_capabilities.inlayHintProvider then - vim.lsp.inlay_hint(bufnr, true) + vim.lsp.inlay_hint.enable(bufnr) end end diff --git a/lua/alpha/lsp/default.lua b/lua/alpha/lsp/default.lua index e4bf24e..61e1b28 100644 --- a/lua/alpha/lsp/default.lua +++ b/lua/alpha/lsp/default.lua @@ -19,6 +19,7 @@ return { texlab = { enable = true, filetypes = {"tex", "bib"} }, pyright = { enable = true, filetypes = {"python"} }, kotlin_language_server = { enable = true, filetypes = {"kotlin"}, root_dir = require("lspconfig.util").root_pattern("build.gradle.kts", "pom.xml", ".git") }, + smarty_ls = { enable = true, filetypes = {"smarty"}, root_dir = require("lspconfig.util").root_pattern("composer.json", ".git") }, }, default_options = function (options) return vim.tbl_deep_extend("force", { diff --git a/lua/alpha/lsp/servers/kotlin.lua b/lua/alpha/lsp/servers/kotlin.lua deleted file mode 100644 index 39cdd0d..0000000 --- a/lua/alpha/lsp/servers/kotlin.lua +++ /dev/null @@ -1 +0,0 @@ -- diff --git a/lua/alpha/lsp/servers/vscode_smarty_langserver.lua b/lua/alpha/lsp/servers/vscode_smarty_langserver.lua new file mode 100644 index 0000000..e404698 --- /dev/null +++ b/lua/alpha/lsp/servers/vscode_smarty_langserver.lua @@ -0,0 +1,25 @@ +local lsp_attach = require "alpha.lsp.attach" +local lsp_flags = require "alpha.lsp.flags" + +return function(ops) + return vim.tbl_extend("force", { + on_attach = lsp_attach, + flags = lsp_flags, + settings = { + css = { + validate = true + }, + smarty = { + pluginDirs = {} + }, + ["smarty_ls"] = { + checkOnSave = { + overrideCommand = { + "smarty-language-server", + "--stdio", + }, + }, + }, + }, + }, ops) +end diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua index c178f44..b62150e 100644 --- a/lua/config/autocmds.lua +++ b/lua/config/autocmds.lua @@ -37,3 +37,15 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, { vim.cmd [[%s/\s\+$//e]] end, }) + +if vim.fn.has("persistent_undo") then + local target_path = vim.fn.expand('~/.cache/undodir') + -- crear el directorio y cualquier directorio padre + -- si la ubicación no existe. + if not vim.fn.isdirectory(target_path) then + vim.fn.mkdir(target_path, "p", 0700) + end + + vim.o.undodir = target_path + vim.o.undofile = true +end diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index cf70ef0..d56b536 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -32,6 +32,8 @@ map("n", "", ":cprevzz", { desc = "Goes to the previous item in the qui -- map("n", "o", ":lprevzz") map("n", "cc", ":cclose", { desc = "Close the quick fix list" }) +map("n", "tc", ":TSContextToggle", { desc = "Toggle treesitter context" }) + -- tabulation map("v", "<", "", ">gv", { desc = "Indent in and keeps the selection" }) @@ -72,7 +74,9 @@ map("n", "vp", vim.diagnostic.goto_prev, { desc = "Goes to prev diagnost map("v", "q", require('alpha.select_to_quickfix').handle) map('n', '99', ':set invspell', { noremap = true }) -map("n", "ss", function() require('nvim-python-repl').send_statement_definition() end, { desc = "Send semantic unit to REPL"}) +-- map("n", "ss", function() require('nvim-python-repl').send_statement_definition() end, { desc = "Send semantic unit to REPL"}) +vim.api.nvim_set_keymap('n', '', [[:lua require('nvim-python-repl').send_statement_definition()j]], {noremap = true, silent = true}) +vim.api.nvim_set_keymap('i', '', [[:lua require('nvim-python-repl').send_statement_definition()i]], {noremap = true, silent = true}) map("n", "sl", function() require('nvim-python-repl').send_visual_to_repl() end, { desc = "Send visual selection to REPL"}) map("v", "sl", function() require('nvim-python-repl').send_visual_to_repl() end, { desc = "Send visual selection to REPL"}) map("n", "MReturn", function() require('nvim-python-repl').send_buffer_to_repl() end, { desc = "Send entire buffer to REPL"}) @@ -82,3 +86,4 @@ map("n", "rl",function() require('rust-tools').inlay_hints.enable() end, map("n", "rdl",function() require('rust-tools').inlay_hints.disable() end, {desc = "Disable inlay hints auto update and unset them for all buffers"}) map("n", "rrn", function () require('rust-tools').runnables.runnables() end, {desc = "run rust"}) map("n", "-", "Oil", { desc = "Open parent directory" }) +map("n", "fg", function() require('telescope').extensions.live_grep_args.live_grep_args() end, {desc = "run grep"}) diff --git a/lua/plugins/buffer_manager.lua b/lua/plugins/buffer_manager.lua new file mode 100644 index 0000000..794e178 --- /dev/null +++ b/lua/plugins/buffer_manager.lua @@ -0,0 +1,24 @@ +return { + 'j-morano/buffer_manager.nvim', + dependencies = { 'nvim-lua/plenary.nvim' }, + keys = { + { + desc = 'Buffer Manager', + 'o', + function() require('buffer_manager.ui').toggle_quick_menu() end, + }, + { + desc = 'Next buffer', + ']b', + function() require('buffer_manager.ui').nav_next() end, + }, + { + desc = 'Previous buffer', + '[b', + function() require('buffer_manager.ui').nav_prev() end, + }, + }, + opts = { + width = 0.9, + }, + } diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index 0b90faf..b72b76f 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -1,11 +1,40 @@ return { - "wuelnerdotexe/vim-enfocado", - lazy = false, - priority = 1000, - init = function() - vim.g.enfocado_style = "neon" - end, - config = function() - vim.cmd.colorscheme "enfocado" - end, + { + 'catppuccin/nvim', + name = 'catppuccin', + lazy = false, + priority = 1000, + opts = { + flavour = 'frappe', + transparent_background = true, + integrations = { + mason = true, + mini = true, + native_lsp = { + underlines = { + errors = { 'undercurl' }, + hints = { 'undercurl' }, + warnings = { 'undercurl' }, + information = { 'undercurl' }, + }, + }, + treesitter_context = true, + which_key = true, + }, + }, + config = function(_, opts) + require('catppuccin').setup(opts) + vim.cmd.colorscheme 'catppuccin' + end, + }, + { + 'stevearc/dressing.nvim', + event = 'VeryLazy', + opts = { + input = { + insert_only = false, + start_in_insert = false, + }, + }, + }, } diff --git a/lua/plugins/completition.lua b/lua/plugins/completition.lua index b659fb7..0037c40 100644 --- a/lua/plugins/completition.lua +++ b/lua/plugins/completition.lua @@ -31,21 +31,21 @@ return { dict.setup({ -- The following are default values. - exact = 2, + exact_length = 2, first_case_insensitive = false, document = false, document_command = "wn %s -over", sqlite = false, - max_items = -1, - capacity = 5, + max_number_items = -1, + -- capacity = 5, debug = false, }) - dict.switcher({ - spelllang = { - es = "./../../spell/dic_es.dict", - }, - }) + -- dict.switcher({ + -- spelllang = { + -- es = "./../../spell/dic_es.dict", + -- }, + -- }) end, }, diff --git a/lua/plugins/elixir.lua b/lua/plugins/elixir.lua new file mode 100644 index 0000000..6aabb08 --- /dev/null +++ b/lua/plugins/elixir.lua @@ -0,0 +1,34 @@ +return { + "elixir-tools/elixir-tools.nvim", + version = "*", + event = { "BufReadPre", "BufNewFile" }, + filetypes = { "elixir" }, + config = function() + local elixir = require("elixir") + local elixirls = require("elixir.elixirls") + + elixir.setup { + nextls = {enable = false}, + credo = {enable = false}, + elixirls = { + enable = true, + cmd = "elixir-ls", + settings = elixirls.settings { + incrementalDialyzer = true, + dialyzerEnabled = true, + fetchDeps = true, + enableTestLenses = true, + suggestSpecs = true, + }, + on_attach = function(client, bufnr) + vim.keymap.set("n", "fp", ":ElixirFromPipe", { buffer = true, noremap = true }) + vim.keymap.set("n", "tp", ":ElixirToPipe", { buffer = true, noremap = true }) + vim.keymap.set("v", "em", ":ElixirExpandMacro", { buffer = true, noremap = true }) + end, + } + } + end, + dependencies = { + "nvim-lua/plenary.nvim", + }, +} diff --git a/lua/plugins/indent-o-matic.lua b/lua/plugins/indent-o-matic.lua new file mode 100644 index 0000000..39b53d3 --- /dev/null +++ b/lua/plugins/indent-o-matic.lua @@ -0,0 +1,5 @@ +return { + 'Darazaki/indent-o-matic', + event = 'BufReadPre', + opts = {}, + } diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index e4c3b4a..8406d42 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -1,19 +1,40 @@ return { - "nvim-lualine/lualine.nvim", - dependencies = { "kyazdani42/nvim-web-devicons" }, - config = function() - require("lualine").setup { - options = { - theme = "auto", - icons_enabled = true, - globalstatus = true, - }, - extensions = { "quickfix", "fugitive" }, - sections = { - lualine_a = { { "mode", upper = true } }, - lualine_b = { { "branch", icon = "" }, "db_ui#statusline" }, - lualine_c = { { "filename", file_status = true, path = 1 } }, - lualine_x = { + { + 'nvim-lualine/lualine.nvim', + dependencies = { + 'kyazdani42/nvim-web-devicons', + 'arkav/lualine-lsp-progress', + }, + opts = function() + local function winnr() return ' ' .. vim.fn.winnr() end + local function bufnr() return '󱔗 ' .. vim.fn.bufnr() end + + local function lualine_c(filename_opts) + filename_opts = filename_opts or {} + + return { + { + 'filetype', + icon_only = true, + separator = '', + padding = { left = 1, right = 0 }, + }, + { + 'filename', + file_status = filename_opts.file_status, + padding = 0, + path = filename_opts.fullpath and 1, + separator = '', + }, + } + end + + local sections = { + lualine_a = { winnr }, + lualine_b = { bufnr }, + lualine_d = lualine_c { fullpath = true }, + lualine_x = { 'searchcount' }, + lualine_y = { "diagnostics", "diff", { @@ -27,25 +48,80 @@ return { color = { fg = "ff9e64" }, }, }, - lualine_y = { "filetype" }, - lualine_z = { "location" }, - }, - winbar = { - lualine_a = {}, - lualine_b = {}, - lualine_c = {}, - lualine_x = {}, - lualine_y = {}, - lualine_z = {}, - }, - inactive_winbar = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { {"filename", file_status = true, path = 1} }, - lualine_x = {}, - lualine_y = {}, - lualine_z = {}, - }, - } - end, + lualine_z = { 'progress' }, + } + + return { + options = { + disabled_filetypes = { 'alpha', 'dbui', 'fugitiveblame' }, + theme = 'catppuccin', + }, + tabline = { + lualine_a = { + 'mode', + 'selectioncount', + function() return vim.fn.fnamemodify(vim.fn.getcwd(), ':p:~:h') end, + }, + lualine_b = { + function() + local dap_status = require('dap').status() + + return dap_status ~= '' and '󰃤 ' .. dap_status or '' + end, + }, + lualine_x = { 'lsp_progress' }, + lualine_y = { { "branch", icon = "" }, "db_ui#statusline" }, + lualine_z = { + { + 'tabs', + show_modified_status = false, + use_mode_colors = true, + }, + }, + }, + sections = sections, + inactive_sections = sections, + extensions = { + { + filetypes = { 'fugitive', 'git' }, + sections = vim.tbl_extend('force', sections, { + lualine_c = { { 'FugitiveHead', icon = '' } }, + }), + }, + { + filetypes = { 'help', 'man' }, + sections = vim.tbl_extend('force', sections, { + lualine_c = lualine_c { file_status = false }, + }), + }, + { + filetypes = { 'oil' }, + sections = vim.tbl_extend('force', sections, { + lualine_c = { + { + function() + local dir = require('oil').get_current_dir() + + return dir and vim.fn.fnamemodify(dir, ':p:~:.') + end, + icon = { + '', + color = { + fg = require('catppuccin.palettes').get_palette('frappe').maroon, + }, + }, + }, + }, + }), + }, + { + filetypes = { 'qf' }, + sections = vim.tbl_extend('force', sections, { + lualine_c = { 'w:quickfix_title' }, + }), + }, + }, + } + end, + }, } diff --git a/lua/plugins/luarocks.lua b/lua/plugins/luarocks.lua new file mode 100644 index 0000000..c8dfe6c --- /dev/null +++ b/lua/plugins/luarocks.lua @@ -0,0 +1,5 @@ +return { + "vhyrro/luarocks.nvim", + priority = 1000, -- Very high priority is required, luarocks.nvim should run as the first plugin in your config. + config = true, +} diff --git a/lua/plugins/nvim-bqf.lua b/lua/plugins/nvim-bqf.lua new file mode 100644 index 0000000..5de7214 --- /dev/null +++ b/lua/plugins/nvim-bqf.lua @@ -0,0 +1,10 @@ +return { + 'kevinhwang91/nvim-bqf', + ft = 'qf', + opts = { + auto_resize_height = true, + preview = { + wrap = true, + }, + }, + } diff --git a/lua/plugins/smart-splits.lua b/lua/plugins/smart-splits.lua index 57faedb..29cccb7 100644 --- a/lua/plugins/smart-splits.lua +++ b/lua/plugins/smart-splits.lua @@ -3,28 +3,28 @@ return { config = true, keys = { { - "", + "", function() require("smart-splits").resize_left() end, desc = "Resize window left +10", }, { - "", + "", function() require("smart-splits").resize_down() end, desc = "Resize window down +10", }, { - "", + "", function() require("smart-splits").resize_up() end, desc = "Resize window up +10", }, { - "", + "", function() require("smart-splits").resize_right() end, diff --git a/lua/plugins/smooth-cursor.lua b/lua/plugins/smooth-cursor.lua deleted file mode 100644 index 71fe431..0000000 --- a/lua/plugins/smooth-cursor.lua +++ /dev/null @@ -1,32 +0,0 @@ -return { - "gen740/SmoothCursor.nvim", - config = function() - require("smoothcursor").setup { cursor = "󰀫" } - - vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#8a9baa" }) - - local autocmd = vim.api.nvim_create_autocmd - - autocmd({ "ModeChanged" }, { - callback = function() - local current_mode = vim.fn.mode() - if current_mode == "n" then - vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#8a9baa" }) - vim.fn.sign_define("smoothcursor", { text = "󰀫" }) - elseif current_mode == "v" then - vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#bf616a" }) - vim.fn.sign_define("smoothcursor", { text = "" }) - elseif current_mode == "V" then - vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#bf616a" }) - vim.fn.sign_define("smoothcursor", { text = "" }) - elseif current_mode == "\22" then - vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#bf616a" }) - vim.fn.sign_define("smoothcursor", { text = "" }) - elseif current_mode == "i" then - vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#668aab" }) - vim.fn.sign_define("smoothcursor", { text = "" }) - end - end, - }) - end, -} diff --git a/lua/plugins/smooth-cursor.lua.n b/lua/plugins/smooth-cursor.lua.n new file mode 100644 index 0000000..71fe431 --- /dev/null +++ b/lua/plugins/smooth-cursor.lua.n @@ -0,0 +1,32 @@ +return { + "gen740/SmoothCursor.nvim", + config = function() + require("smoothcursor").setup { cursor = "󰀫" } + + vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#8a9baa" }) + + local autocmd = vim.api.nvim_create_autocmd + + autocmd({ "ModeChanged" }, { + callback = function() + local current_mode = vim.fn.mode() + if current_mode == "n" then + vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#8a9baa" }) + vim.fn.sign_define("smoothcursor", { text = "󰀫" }) + elseif current_mode == "v" then + vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#bf616a" }) + vim.fn.sign_define("smoothcursor", { text = "" }) + elseif current_mode == "V" then + vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#bf616a" }) + vim.fn.sign_define("smoothcursor", { text = "" }) + elseif current_mode == "\22" then + vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#bf616a" }) + vim.fn.sign_define("smoothcursor", { text = "" }) + elseif current_mode == "i" then + vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#668aab" }) + vim.fn.sign_define("smoothcursor", { text = "" }) + end + end, + }) + end, +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 4f5b59d..291f777 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -7,6 +7,7 @@ return { { "kyazdani42/nvim-web-devicons" }, { "nvim-telescope/telescope-file-browser.nvim" }, { "nvim-telescope/telescope-ui-select.nvim" }, + { "nvim-telescope/telescope-live-grep-args.nvim" }, { "nvim-telescope/telescope-fzf-native.nvim", build = "make", @@ -29,5 +30,6 @@ return { config = function() require "alpha.telescope.setup" require "alpha.telescope.mappings" + require("telescope").load_extension("live_grep_args") end, } diff --git a/lua/plugins/treesitter-context.lua b/lua/plugins/treesitter-context.lua new file mode 100644 index 0000000..0f68d08 --- /dev/null +++ b/lua/plugins/treesitter-context.lua @@ -0,0 +1,13 @@ +return { + 'nvim-treesitter/nvim-treesitter-context', + dependencies = { 'nvim-treesitter/nvim-treesitter' }, + event = { 'BufReadPre', 'BufNew', 'BufNewFile' }, + cmd = { + 'TSContextDisable', + 'TSContextEnable', + 'TSContextToggle', + }, + opts = { + max_lines = 8, + }, + } diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 9bbcde2..363f081 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -2,11 +2,35 @@ return { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", dependencies = { + 'RRethy/nvim-treesitter-endwise', "nvim-treesitter/nvim-treesitter-textobjects", + 'nvim-treesitter/playground', }, - event = "VeryLazy", + event = { 'BufReadPre', 'BufNew', 'BufNewFile' }, main = "nvim-treesitter.configs", + cmd = { + 'TSBufDisable', + 'TSBufEnable', + 'TSBufToggle', + 'TSConfigInfo', + 'TSDisable', + 'TSEditQuery', + 'TSEditQueryUserAfter', + 'TSEnable', + 'TSInstall', + 'TSInstallFromGrammar', + 'TSInstallInfo', + 'TSInstallSync', + 'TSModuleInfo', + 'TSToggle', + 'TSUninstall', + 'TSUpdate', + 'TSUpdateSync', + 'TSPlaygroundToggle', + }, opts = { + endwise = { enable = true }, + auto_install = true, ensure_installed = { "bash", "blade", @@ -23,6 +47,7 @@ return { "nix", "org", "php", + "php_only", "phpdoc", "query", "rust", @@ -37,11 +62,24 @@ return { "python", "dockerfile", "cpp", + "elixir", + "erlang", }, highlight = { enable = true, additional_vim_regex_highlighting = { "org" }, }, + playground = { + enable = true, + disable = {}, + updatetime = 25, -- Tiempo de actualización en milisegundos para la consulta del árbol. + persist_queries = false, -- Si se debe persistir las consultas entre sesiones. + }, + query_linter = { + enable = true, + use_virtual_text = true, + lint_events = {"BufWrite", "CursorHold"}, + }, indent = { enable = true, }, diff --git a/lua/plugins/treesj.lua b/lua/plugins/treesj.lua new file mode 100644 index 0000000..c6b3e4a --- /dev/null +++ b/lua/plugins/treesj.lua @@ -0,0 +1,11 @@ +return { + 'Wansmer/treesj', + dependencies = { 'nvim-treesitter/nvim-treesitter' }, + keys = { + { desc = 'Split/Join', 'j', 'TSJToggle' }, + }, + opts = { + max_join_length = 500, + use_default_keymaps = false, + }, + } diff --git a/lua/plugins/undotree.lua b/lua/plugins/undotree.lua new file mode 100644 index 0000000..3f96d83 --- /dev/null +++ b/lua/plugins/undotree.lua @@ -0,0 +1,11 @@ +return { + "mbbill/undotree", + lazy = false, -- needs to be explicitly set, because of the keys property + keys = { + { + "u", + vim.cmd.UndotreeToggle, + desc = "Toggle undotree", + }, + }, +} diff --git a/lua/plugins/vim-illuminate.lua b/lua/plugins/vim-illuminate.lua new file mode 100644 index 0000000..9ed467e --- /dev/null +++ b/lua/plugins/vim-illuminate.lua @@ -0,0 +1,21 @@ +return + { + 'RRethy/vim-illuminate', + event = 'LspAttach', + keys = { + { + desc = 'Next Reference', + ']r', + function() require('illuminate').goto_next_reference() end, + }, + { + desc = 'Previous Reference', + '[r', + function() require('illuminate').goto_prev_reference() end, + }, + }, + opts = { + providers = { 'lsp' }, + }, + config = function(_, opts) require('illuminate').configure(opts) end, + } diff --git a/lua/plugins/vim-lastplace.lua b/lua/plugins/vim-lastplace.lua new file mode 100644 index 0000000..3de39ec --- /dev/null +++ b/lua/plugins/vim-lastplace.lua @@ -0,0 +1,4 @@ +return { + 'farmergreg/vim-lastplace', + event = 'BufReadPre', + } diff --git a/lua/plugins/which-key.lua b/lua/plugins/which-key.lua new file mode 100644 index 0000000..50cd483 --- /dev/null +++ b/lua/plugins/which-key.lua @@ -0,0 +1,14 @@ +return { + 'folke/which-key.nvim', + event = 'VeryLazy', + keys = { + { + -- See: https://github.com/folke/which-key.nvim/issues/476 + desc = 'Workaround for which-key not showing up on ', + '', + function() require('which-key').show(vim.g.maplocalleader) end, + }, + }, + opts = {}, + init = function() vim.opt.timeoutlen = 300 end, + } diff --git a/queries/php/injections.scm b/queries/php/injections.scm index 365bcf5..1858933 100644 --- a/queries/php/injections.scm +++ b/queries/php/injections.scm @@ -2,7 +2,7 @@ (function_call_expression ( (name) @_function (#eq? @_function "json_decode") - (arguments (argument (string (string_value) @json ))) + (arguments (argument (string (string_content) @json ))) ) ) diff --git a/queries/phpdoc/highlights.scm b/queries/phpdoc/highlights.scm index ff014dc..4c46c0a 100644 --- a/queries/phpdoc/highlights.scm +++ b/queries/phpdoc/highlights.scm @@ -1,10 +1,11 @@ ;;extends (tag - (type_list + (intersection_type (named_type (name) @typeName (#eq? @typeName "Promise") ) ) (description) @type ) + -- cgit v1.2.3