aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElvis Claros Castro <elvis@claros.ar>2024-09-20 23:08:00 -0300
committerElvis Claros Castro <elvis@claros.ar>2024-09-20 23:08:00 -0300
commitfa3e94e60b9edc7c3620f43e207b915eae84bab0 (patch)
tree10617c9508c797ffb9bcf3bdb09c60ae69371662
parent6364400a98c93cdf6f2209670be1d2b6e31ee6ab (diff)
downloadnvim-conf-fa3e94e60b9edc7c3620f43e207b915eae84bab0.tar.gz
nvim-conf-fa3e94e60b9edc7c3620f43e207b915eae84bab0.zip
feat: solo dejo phpactor
-rw-r--r--lazy-lock.json89
-rw-r--r--lua/config/options.lua2
-rw-r--r--lua/pi/completition/init.lua18
-rw-r--r--lua/pi/dap/configs/cpp.lua10
-rw-r--r--lua/pi/lsp/default.lua2
-rw-r--r--lua/pi/lsp/null-ls.lua5
-rw-r--r--lua/pi/lsp/servers/ts_ls.lua (renamed from lua/pi/lsp/servers/tsserver.lua)0
-rw-r--r--lua/pi/php/gateway.lua137
-rw-r--r--lua/pi/php/lsp.lua151
-rw-r--r--lua/pi/php/servers.lua38
-rw-r--r--lua/plugins/animation.lua2
-rw-r--r--lua/plugins/noice.lua256
-rw-r--r--lua/plugins/none-ls.lua2
-rw-r--r--lua/plugins/phpactor.lua61
14 files changed, 255 insertions, 518 deletions
diff --git a/lazy-lock.json b/lazy-lock.json
index 5cec775..bb721ee 100644
--- a/lazy-lock.json
+++ b/lazy-lock.json
@@ -1,11 +1,11 @@
{
- "CodeGPT.nvim": { "branch": "master", "commit": "6333509027c8dd66b646e0f70c0ea6b2c283abae" },
+ "CodeGPT.nvim": { "branch": "master", "commit": "9d0a58a0bdc858f2e9729b8b5ac8b994c3453c8f" },
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
- "CopilotChat.nvim": { "branch": "canary", "commit": "43d033b68c8bede4cc87092c7db6bb3bbb2fe145" },
+ "CopilotChat.nvim": { "branch": "canary", "commit": "2352cd3e7e980cd73594be05f96b2dc4c0dd4a74" },
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"LuaSnip": { "branch": "master", "commit": "500981ff6cefc7343e3959ef0f939bd0bfd49ba9" },
"NeoColumn.nvim": { "branch": "main", "commit": "db7695c7c70fcacd290712deef659bca464634ee" },
- "SmoothCursor.nvim": { "branch": "main", "commit": "c082e1e943acec28d95aa05325097426e612047f" },
+ "SmoothCursor.nvim": { "branch": "main", "commit": "12518b284e1e3f7c6c703b346815968e1620bee2" },
"animation.nvim": { "branch": "main", "commit": "fb77091ab72ec9971aee0562e7081182527aaa6a" },
"baleia.nvim": { "branch": "main", "commit": "1b25eac3ac03659c3d3af75c7455e179e5f197f7" },
"buffer_manager.nvim": { "branch": "main", "commit": "fd36131b2b3e0f03fd6353ae2ffc88cf920b3bbb" },
@@ -19,113 +19,112 @@
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
- "codeium.nvim": { "branch": "main", "commit": "f6a2ef32a9e923cb0104a19d3e426b0e40e49505" },
+ "codeium.nvim": { "branch": "main", "commit": "937667b2cadc7905e6b9ba18ecf84694cf227567" },
"color-picker.nvim": { "branch": "master", "commit": "06cb5f853535dea529a523e9a0e8884cdf9eba4d" },
"composer.nvim": { "branch": "main", "commit": "ec9537969adc7fc128cfe9c3a9925850455896c8" },
"copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" },
- "copilot.lua": { "branch": "master", "commit": "86537b286f18783f8b67bccd78a4ef4345679625" },
+ "copilot.lua": { "branch": "master", "commit": "1a237cf50372830a61d92b0adf00d3b23882e0e1" },
"direnv.vim": { "branch": "master", "commit": "ab2a7e08dd630060cd81d7946739ac7442a4f269" },
- "dressing.nvim": { "branch": "master", "commit": "c5775a888adbc50652cb370073fcfec963eca93e" },
+ "dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" },
"duck.nvim": { "branch": "main", "commit": "d8a6b08af440e5a0e2b3b357e2f78bb1883272cd" },
"elixir-tools.nvim": { "branch": "main", "commit": "5e7596be469be0800e9cbe3415de971f7286c3d0" },
"firenvim": { "branch": "master", "commit": "bb70728c13c305ff35193586d5f6ce68668af063" },
- "flutter-tools.nvim": { "branch": "main", "commit": "99af5175096113185179194a7b3878c7bdec5b4e" },
- "fzf": { "branch": "master", "commit": "fc69308057cf8486d2753efd76682fd613471da6" },
+ "flutter-tools.nvim": { "branch": "main", "commit": "ea1d398f543a54ba95357c3b8bb9d6f68eaec36c" },
+ "fzf": { "branch": "master", "commit": "855f90727af7827d9934b7fa00ea5ed51f5e4e81" },
"fzf.vim": { "branch": "master", "commit": "c5ce7908ee86af7d4090d2007086444afb6ec1c9" },
"git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" },
- "gitsigns.nvim": { "branch": "main", "commit": "899e993850084ea33d001ec229d237bc020c19ae" },
+ "gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" },
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
"hydra.nvim": { "branch": "master", "commit": "3ced42c0b6a6c85583ff0f221635a7f4c1ab0dd0" },
"icon-picker.nvim": { "branch": "master", "commit": "3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3" },
"image.nvim": { "branch": "main", "commit": "acbd1d7d64ac0643021a6146eb0557e7c2e793d0" },
- "indent-blankline.nvim": { "branch": "master", "commit": "db926997af951da38e5004ec7b9fbdc480b48f5d" },
+ "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" },
"indent-o-matic": { "branch": "master", "commit": "4d11e98f523d3c4500b1dc33f0d1a248a4f69719" },
- "laravel.nvim": { "branch": "main", "commit": "e4f39d942352b03396a9df79896b0a8801675199" },
- "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
+ "laravel.nvim": { "branch": "main", "commit": "aabe7c59a7ec64baf3f2af3d56e6852955c065c3" },
+ "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" },
"lspkind-nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" },
"lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" },
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
"luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" },
"markdown-preview.nvim": { "branch": "main", "commit": "cc05a30393e2bf9f12e2d59fc35a1aa928ed1727" },
- "mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" },
+ "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"middleclass": { "branch": "master", "commit": "9fab4d5bca67262614960960ca35c4740eb2be2c" },
- "mini.icons": { "branch": "main", "commit": "12e7b5d47bfc1b4c5ba4278fb49ec9100138df14" },
- "mini.nvim": { "branch": "main", "commit": "57e47cf7a2923684e7413989ab267ed9730e7d03" },
+ "mini.icons": { "branch": "main", "commit": "2d89252993fec829b24720097a687412d10f6c85" },
+ "mini.nvim": { "branch": "main", "commit": "e50cf9de614500a20e47cfc50e30a100042f91c3" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"neogen": { "branch": "main", "commit": "e932ba918b56723436b77aa3efb844a11b2851ab" },
- "neorg": { "branch": "main", "commit": "85f15f033d8c56366ac1e6ae93c940db8ad067ca" },
+ "neorg": { "branch": "main", "commit": "ba35900b21921c439e676b063a79c8fad914eac9" },
"neotest": { "branch": "master", "commit": "6d6ad113f56edc7c3f2a77a0836ea8c1b955ebea" },
"neotest-go": { "branch": "main", "commit": "92950ad7be2ca02a41abca5c6600ff6ffaf5b5d6" },
- "neotest-plenary": { "branch": "master", "commit": "2cc925246d7e5324ddf9585fad891cec73c3947b" },
+ "neotest-plenary": { "branch": "master", "commit": "3523adcf9ffaad1911960c5813b0136c1b63a2ec" },
"neotest-rust": { "branch": "main", "commit": "0418811e1e3499b2501593f2e131d02f5e6823d4" },
"neotest-vim-test": { "branch": "master", "commit": "75c4228882ae4883b11bfce9b8383e637eb44192" },
- "noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" },
- "none-ls-extras.nvim": { "branch": "main", "commit": "dfdc998a8c7bb728abab156942bd43ed2345845a" },
+ "noice.nvim": { "branch": "main", "commit": "c1ba80ccf6b3bd8c7fc88fe2e61085131d44ad65" },
+ "none-ls-extras.nvim": { "branch": "main", "commit": "ebb09961f1c0a377f9ed1685740cdf87b5cd39a8" },
"none-ls-luacheck.nvim": { "branch": "main", "commit": "a1dfea0d4c40c4023829c8b9a7ab0a26135985ca" },
"none-ls-shellcheck.nvim": { "branch": "main", "commit": "0f84461241e76e376a95fb7391deac82dc3efdbf" },
- "none-ls.nvim": { "branch": "main", "commit": "203f5ebde4a1af48ba2eb146401b5be2e7866942" },
- "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
+ "none-ls.nvim": { "branch": "main", "commit": "9b98991e15dce8fc502993e23caac2528b8b667f" },
+ "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
"numb.nvim": { "branch": "master", "commit": "3f7d4a74bd456e747a1278ea1672b26116e0824d" },
- "nvim-autopairs": { "branch": "master", "commit": "19606af7c039271d5aa96bceff101e7523af3136" },
+ "nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" },
"nvim-bqf": { "branch": "main", "commit": "1b24dc6050c34e8cd377b6b4cd6abe40509e0187" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
- "nvim-dap": { "branch": "master", "commit": "281a2e4cd1e7a17cea7ecb1745d84a8ab1249925" },
+ "nvim-dap": { "branch": "master", "commit": "90616ae6ae40053103dc66872886fc26b94c70c8" },
"nvim-dap-go": { "branch": "main", "commit": "5511788255c92bdd845f8d9690f88e2e0f0ff9f2" },
"nvim-dap-ui": { "branch": "master", "commit": "1c351e4e417d4691da12948b6ecf966936a56d28" },
- "nvim-dap-virtual-text": { "branch": "master", "commit": "484995d573c0f0563f6a66ebdd6c67b649489615" },
+ "nvim-dap-virtual-text": { "branch": "master", "commit": "3497eb39bf413a57ab5b7e7e2e192683e462148c" },
"nvim-dap-vscode-js": { "branch": "main", "commit": "03bd29672d7fab5e515fc8469b7d07cc5994bbf6" },
"nvim-html-css": { "branch": "main", "commit": "c514bd27ad560636ed39dea3e370b3103754e244" },
- "nvim-lspconfig": { "branch": "master", "commit": "6bfd9210e312af6cfedba05d272e85618c93ab0d" },
+ "nvim-lspconfig": { "branch": "master", "commit": "b064131428f6bbbbc905f4451ba6779fda334a3a" },
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
- "nvim-python-repl": { "branch": "main", "commit": "3d63e4f298233cb97e0fb2d8360857120235112f" },
+ "nvim-python-repl": { "branch": "main", "commit": "c79254982e32f9d3abf2de0ce72e7bf48dbb9afd" },
"nvim-spectre": { "branch": "master", "commit": "ba7fb777edff6c1fbbeffd343e113af64c04e90a" },
"nvim-transparent": { "branch": "main", "commit": "8a2749a2fa74f97fe6557f61b89ac7fd873f3c21" },
- "nvim-treesitter": { "branch": "master", "commit": "585860a1865853d2c287c8ef534297da8115818e" },
- "nvim-treesitter-context": { "branch": "master", "commit": "0f3332788e0bd37716fbd25f39120dcfd557c90f" },
+ "nvim-treesitter": { "branch": "master", "commit": "b8ad0473f4d5d7b59e17a67ad0b68711b0232486" },
+ "nvim-treesitter-context": { "branch": "master", "commit": "7f7eeaa99e5a9beab518f502292871ae5f20de6f" },
"nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" },
- "nvim-treesitter-textobjects": { "branch": "master", "commit": "41e3abf6bfd9a9a681eb1f788bdeba91c9004b2b" },
- "nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" },
+ "nvim-treesitter-textobjects": { "branch": "master", "commit": "bf8d2ad35d1d1a687eae6c065c3d524f7ab61b23" },
+ "nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" },
"oil-git-status.nvim": { "branch": "main", "commit": "a7ea816bac0cc3b8b4c3605e2f2b87960be60a05" },
- "oil-image-preview.nvim": { "branch": "master", "commit": "6183f23ba094283c04f00ae060cc45e59a4c3441" },
- "oil.nvim": { "branch": "master", "commit": "0dc98d36b5450575e3af97fdfc6dcb72ba1fc80e" },
+ "oil-image-preview.nvim": { "branch": "master", "commit": "a71eacc879e1264339a62019ee3c2ff376f2cc39" },
+ "oil.nvim": { "branch": "master", "commit": "1360be5fda9c67338331abfcd80de2afbb395bcd" },
"pathlib.nvim": { "branch": "main", "commit": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1" },
- "phpactor.nvim": { "branch": "main", "commit": "0aa4ad09c2024e24d630c0ec616d65396caa39e0" },
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
- "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
+ "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"refactoring.nvim": { "branch": "master", "commit": "c406fc5fb4d7ba5fce7b668637075fad6e75e9f8" },
- "rustaceanvim": { "branch": "master", "commit": "d3a8b145f0b3db4de9a08fcbc604659f52ee4fbc" },
- "smart-splits.nvim": { "branch": "master", "commit": "e5209df1aa04ee2d4910a25a289efe5a978dba2f" },
+ "rustaceanvim": { "branch": "master", "commit": "f9ecc0c3084186a60513b83139a643a5cbf3bdf7" },
+ "smart-splits.nvim": { "branch": "master", "commit": "3737faa521d12a0c77d0d28bb15ad903a9e8cfe0" },
"solarized-osaka.nvim": { "branch": "main", "commit": "126d394c0c979a99206214a2b6b8c86e456c9c0f" },
"telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" },
- "telescope-file-browser.nvim": { "branch": "master", "commit": "a46780830b576049c675680650f773bedfa8677a" },
+ "telescope-file-browser.nvim": { "branch": "master", "commit": "dd9de68c08b6d678198a99f5ea13e0384a1f04cf" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "649b662a8f476fd2c0289570764459e95ebaa3f3" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
- "telescope.nvim": { "branch": "master", "commit": "5972437de807c3bc101565175da66a1aa4f8707a" },
- "todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" },
+ "telescope.nvim": { "branch": "master", "commit": "b5fd7f7ae0ea4537511077ed8ef4a6021cedba2f" },
+ "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
"treesj": { "branch": "main", "commit": "0d81326b5afd36babe7dd480aabbb0b05f33e688" },
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
"twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" },
- "undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
+ "undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
"vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" },
"vim-dadbod-completion": { "branch": "master", "commit": "880f7e9f2959e567c718d52550f9fae1aa07aa81" },
- "vim-dadbod-ui": { "branch": "master", "commit": "2f344874918a3ab6bbe68fb866b3f003a639a5d2" },
- "vim-dispatch": { "branch": "master", "commit": "4c695bc052cad2ae6b980aebbe48d046466e27ae" },
+ "vim-dadbod-ui": { "branch": "master", "commit": "a5ff8bd69fcaf53cd24827b54492c8ce87806d18" },
+ "vim-dispatch": { "branch": "master", "commit": "a2ff28abdb2d89725192db5b8562977d392a4d3f" },
"vim-dotenv": { "branch": "master", "commit": "5c51cfcf8d87280d6414e03cd6b253eb70ecb800" },
"vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" },
"vim-eunuch": { "branch": "master", "commit": "8fb3904be27b6b60d086f87c2570085902414069" },
- "vim-fugitive": { "branch": "master", "commit": "0444df68cd1cdabc7453d6bd84099458327e5513" },
+ "vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" },
"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": "2c9cef3f7605fc1b272b23765c5872607c1b6183" },
- "which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" }
+ "vim-test": { "branch": "master", "commit": "c090bfd93919888bb0b86e1ab707bc6a3095097f" },
+ "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" }
}
diff --git a/lua/config/options.lua b/lua/config/options.lua
index af53cb8..1400d03 100644
--- a/lua/config/options.lua
+++ b/lua/config/options.lua
@@ -26,7 +26,7 @@ opt.hidden = true
opt.expandtab = true
-- Configura el ancho de la tabulación y la indentación.
-opt.tabstop = 2
+opt.tabstop = 4
opt.softtabstop = 4
opt.shiftwidth = 4
diff --git a/lua/pi/completition/init.lua b/lua/pi/completition/init.lua
index 5b9fd18..418c6d2 100644
--- a/lua/pi/completition/init.lua
+++ b/lua/pi/completition/init.lua
@@ -55,14 +55,14 @@ cmp.setup {
["<c-space>"] = cmp.mapping.complete(),
},
sources = {
- -- { name = "dictionary", keyword_length = 2},
+ { name = "dictionary", keyword_length = 2},
{ name = "nvim_lua" },
{ name = "nvim_lsp" },
{ name = "path" },
{ name = "luasnip" },
{ name = "copilot" },
{name = "codeium"},
- { name = 'cmp_ai' },
+ -- { name = 'cmp_ai' },
{ name = 'html-css',
option = {
max_count = {}, -- not ready yet
@@ -86,7 +86,8 @@ cmp.setup {
local bufs = {}
for _, win in ipairs(vim.api.nvim_list_wins()) do
local bufnr = vim.api.nvim_win_get_buf(win)
- if vim.api.nvim_buf_get_option(bufnr, "buftype") ~= "terminal" then
+ local buftype = vim.api.nvim_get_option_value("buftype", { buf = bufnr })
+ if buftype ~= "terminal" then
bufs[bufnr] = true
end
end
@@ -163,6 +164,17 @@ cmp.setup {
end
vim_item.kind = KIND_ICONS[vim_item.kind] or vim_item.kind
+ -- Add maxwidth and ellipsis_char in the middle
+ local maxwidth = 20
+ 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
},
diff --git a/lua/pi/dap/configs/cpp.lua b/lua/pi/dap/configs/cpp.lua
index d51d6bd..a2718b0 100644
--- a/lua/pi/dap/configs/cpp.lua
+++ b/lua/pi/dap/configs/cpp.lua
@@ -3,7 +3,7 @@ local dap = require("dap")
dap.adapters.cppdbg = {
id = 'cppdbg',
type = 'executable',
- command = '~/.local/share/nvim/mason/packages/cpptools/extension/debugAdapters/bin/OpenDebugAD7',
+ command = '/home/elvis/.local/share/nvim/mason/packages/cpptools/extension/debugAdapters/bin/OpenDebugAD7',
}
dap.configurations.cpp = {
@@ -16,6 +16,9 @@ dap.configurations.cpp = {
end,
cwd = '${workspaceFolder}',
stopAtEntry = true,
+ args = function()
+ return vim.split(vim.fn.input('Program arguments: ', ''), " ")
+ end,
},
{
name = 'Attach to gdbserver :1234',
@@ -28,6 +31,11 @@ dap.configurations.cpp = {
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
+ args = function()
+ return vim.split(vim.fn.input('Program arguments: ', ''), " ")
+ end,
},
}
+
dap.configurations.c = dap.configurations.cpp
+
diff --git a/lua/pi/lsp/default.lua b/lua/pi/lsp/default.lua
index ff5c97e..b2be73e 100644
--- a/lua/pi/lsp/default.lua
+++ b/lua/pi/lsp/default.lua
@@ -14,7 +14,7 @@ return {
rust_analyzer = { enable = true },
svelte = { enable = true },
tailwindcss = { enable = true, filetypes = {"blade", "html", "svelte"} },
- tsserver = { enable = true },
+ ts_ls = { enable = true },
volar = { enable = true },
texlab = { enable = true, filetypes = {"tex", "bib"} },
pyright = { enable = true, filetypes = {"python"} },
diff --git a/lua/pi/lsp/null-ls.lua b/lua/pi/lsp/null-ls.lua
index 70693d9..a9c4412 100644
--- a/lua/pi/lsp/null-ls.lua
+++ b/lua/pi/lsp/null-ls.lua
@@ -38,7 +38,10 @@ null_ls.setup {
end,
},
null_ls.builtins.formatting.pint,
- null_ls.builtins.formatting.clang_format,
+ -- null_ls.builtins.formatting.clang_format,
+ null_ls.builtins.formatting.clang_format.with {
+ extra_args = { "--style={IndentWidth: 4}" },
+ },
},
}
diff --git a/lua/pi/lsp/servers/tsserver.lua b/lua/pi/lsp/servers/ts_ls.lua
index c68c894..c68c894 100644
--- a/lua/pi/lsp/servers/tsserver.lua
+++ b/lua/pi/lsp/servers/ts_ls.lua
diff --git a/lua/pi/php/gateway.lua b/lua/pi/php/gateway.lua
deleted file mode 100644
index 83c95e9..0000000
--- a/lua/pi/php/gateway.lua
+++ /dev/null
@@ -1,137 +0,0 @@
-local pickers = require "telescope.pickers"
-local finders = require "telescope.finders"
-local conf = require("telescope.config").values
-local action_state = require "telescope.actions.state"
-local action_set = require "telescope.actions.set"
-local actions = require "telescope.actions"
-local get_node_text = vim.treesitter.get_node_text
-
-local gateway = {}
-
-local get_definition_buffer = function(type)
- local uri = vim.uri_from_fname(vim.fn.getcwd() .. "/config/graphql/_" .. type .. ".yaml")
- local buff = vim.uri_to_bufnr(uri)
- vim.fn.bufload(buff)
-
- return buff
-end
-
-local get_all_definitions = function()
- local mutations_definitions = gateway.get_graphql_definitions(get_definition_buffer "mutation")
- local queries_definitions = gateway.get_graphql_definitions(get_definition_buffer "query")
- for _, definition in ipairs(queries_definitions) do
- table.insert(mutations_definitions, definition)
- end
-
- return mutations_definitions
-end
-
--- "'@=mutation(\"App\\\\GraphQL\\\\Mutations\\\\Mutation::action\", ...)'",
-local open_resolver = function(resolver)
- -- need to parse to get this values
- local args = string.match(resolver, "'@=mutation%((.+)%)'")
- if args == nil then
- args = string.match(resolver, "'@=query%((.+)%)'")
- end
- if args == nil then
- return
- end
-
- local args_tbl = vim.split(args, ", ")
- local fqn = string.match(args_tbl[1], '"(.+)"')
- fqn = string.gsub(fqn, "\\\\", "\\")
- -- P(fqn)
-
- require("pi.php.lsp").find(fqn, "phpactor")
-end
-
---- @param bufnr integer Buff id
-gateway.get_graphql_definitions = function(bufnr)
- vim.treesitter.query.set(
- "yaml",
- "GraphQL_endpoints",
- [[
- (document (block_node (block_mapping (block_mapping_pair
- value: (block_node (block_mapping (block_mapping_pair
- value: (block_node (block_mapping (block_mapping_pair
- value: (block_node (block_mapping (block_mapping_pair
- key: (flow_node) @mutation
- value: (block_node (block_mapping (block_mapping_pair
- key: (flow_node) @resolve (#eq? @resolve "resolve")
- value: (flow_node) @resolver
- )))
- )))
- )))
- )))
- ))))
- ]]
- )
-
- local query = vim.treesitter.query.get("yaml", "GraphQL_endpoints")
-
- local elements = {}
-
- local parsers = require "nvim-treesitter.parsers"
- local parser = parsers.get_parser(bufnr)
- local tree = parser:parse()[1]
-
- for id, node in query:iter_captures(tree:root(), bufnr) do
- if query.captures[id] == "mutation" then
- table.insert(elements, {
- value = get_node_text(node, bufnr),
- lnum = node:start() + 1,
- buffer = bufnr,
- })
- elseif query.captures[id] == "resolver" then
- elements[#elements].resolver = get_node_text(node, bufnr)
- end
- end
-
- return elements
-end
-
---- gets the graphql function defined on a given buffer
---- @param opts table: options to pass to the picker
-gateway.graphql_definitions = function(opts)
- opts = opts or {}
- pickers
- .new(opts, {
- promt_title = "Queries",
- finder = finders.new_table {
- results = get_all_definitions(),
- entry_maker = function(entry)
- -- buffer = 43,
- -- lnum = 82,
- -- resolver = "'@=mutation(\"App\\\\GraphQL\\\\Mutation\\\\Mutation::action\", ...)'",
- -- value = "deleteVehicleImage"
- return {
- value = entry,
- display = entry.value,
- ordinal = entry.value,
- path = vim.api.nvim_buf_get_name(entry.buffer),
- lnum = entry.lnum,
- resolver = entry.resolver,
- }
- end,
- },
- sorter = conf.generic_sorter(opts),
- previewer = conf.grep_previewer(opts),
- attach_mappings = function(prompt_bufnr, map)
- action_set.select:enhance {
- post = function()
- local selection = action_state.get_selected_entry()
- vim.api.nvim_win_set_cursor(0, { selection.lnum, 0 })
- end,
- }
- map("i", "<c-o>", function()
- actions.close(prompt_bufnr)
- local selection = action_state.get_selected_entry()
- open_resolver(selection.resolver)
- end)
- return true
- end,
- })
- :find()
-end
-
-return gateway
diff --git a/lua/pi/php/lsp.lua b/lua/pi/php/lsp.lua
deleted file mode 100644
index 24711a1..0000000
--- a/lua/pi/php/lsp.lua
+++ /dev/null
@@ -1,151 +0,0 @@
-local Path = require "plenary.path"
-
-local lsp = {}
-
-local open_filename = function(filename)
- if vim.api.nvim_buf_get_name(0) ~= filename then
- filename = Path:new(vim.fn.fnameescape(filename)):normalize(vim.loop.cwd())
- pcall(vim.cmd, string.format("%s %s", "edit", filename))
- end
-end
-
----@param server_name string
----@return table|nil, boolean
-local get_client = function(server_name)
- local clients = vim.lsp.get_clients { name = server_name }
- local client = clients[1] or nil
- local new_instance = false
-
- if not client then
- local server = require("lspconfig")[server_name]
- local config = server.make_config(vim.fn.getcwd())
- local client_id = vim.lsp.start(config)
- client = vim.lsp.get_client_by_id(client_id)
- new_instance = true
- end
-
- return client, new_instance
-end
-
-local function go_to(client, is_new_instance, full_class, method)
- local class_parts = vim.split(full_class, "\\")
- local class = class_parts[#class_parts]
-
- local resp = client.request_sync("workspace/symbol", { query = class }, nil)
-
- local locations = vim.lsp.util.symbols_to_items(resp.result or {}, nil) or {}
- if vim.tbl_isempty(locations) then
- vim.api.nvim_err_writeln("Empty response looking for class: " .. full_class)
- if is_new_instance then
- vim.lsp.stop_client(client.id)
- end
- return
- end
-
- local class_location = nil
- for idx, location in pairs(locations) do
- if location.text == string.format("[Class] %s", full_class) then
- class_location = locations[idx]
- break
- end
- end
-
- if class_location == nil then
- vim.api.nvim_err_writeln("Could not find class for : " .. full_class)
- if is_new_instance then
- vim.lsp.stop_client(client.id)
- end
- return
- end
-
- open_filename(class_location.filename)
-
- local params = vim.lsp.util.make_position_params(0)
- if is_new_instance then
- vim.lsp.buf_attach_client(0, client.id)
- end
-
- vim.lsp.buf_request(0, "textDocument/documentSymbol", params, function(method_err, method_server_result, _, _)
- if method_err then
- vim.api.nvim_err_writeln("Error when finding workspace symbols: " .. method_err.message)
- if is_new_instance then
- vim.lsp.stop_client(client.id)
- end
- return
- end
-
- local method_locations = vim.lsp.util.symbols_to_items(method_server_result or {}, 0) or {}
- if vim.tbl_isempty(method_locations) then
- vim.api.nvim_err_writeln(string.format("empty response looking for method: %s", method or "__invoke"))
- if is_new_instance then
- vim.lsp.stop_client(client.id)
- end
- return
- end
-
- local method_location = nil
- for _, value in ipairs(method_locations) do
- if value.text == string.format("[Method] %s", method or "__invoke") then
- method_location = value
- break
- end
- end
-
- if method_location == nil then
- if is_new_instance then
- vim.lsp.stop_client(client.id)
- end
- return
- end
-
- local row = method_location.lnum
- local col = method_location.col - 1
-
- if row and col then
- local ok, err_msg = pcall(vim.api.nvim_win_set_cursor, 0, { row, col })
- if not ok then
- vim.api.nvim_err_writeln("Erro setting row and col " .. err_msg)
- end
- vim.cmd "normal zt"
- end
- if is_new_instance then
- vim.lsp.stop_client(client.id)
- end
- end)
-end
-
----Return a buffer id for the given client
----@param server_name string
----@return integer|nil
-lsp.get_lsp_buffer = function(server_name)
- local clients = vim.lsp.get_clients { name = server_name }
- if #clients == 0 then
- return nil
- end
-
- local buffers = vim.lsp.get_buffers_by_client_id(clients[1].id)
-
- if #buffers == 0 then
- return nil
- end
-
- return buffers[1]
-end
-
---- @param fqn string: fully name to search Class::method
-lsp.find = function(fqn, server_name)
- local search = vim.split(fqn, "::")
- local fqn_class = search[1]
- local method = search[2]
-
- local client, is_new_instance = get_client(server_name)
-
- if not client then
- vim.api.nvim_err_writeln "Could not get lsp client"
- return
- end
-
- go_to(client, is_new_instance, fqn_class, method)
-end
-
-return lsp
diff --git a/lua/pi/php/servers.lua b/lua/pi/php/servers.lua
deleted file mode 100644
index 9450152..0000000
--- a/lua/pi/php/servers.lua
+++ /dev/null
@@ -1,38 +0,0 @@
-local phpactor = {}
-
--- TODO possible improvement look how it works underline
--- use the client directly to call, no need for the buffer
--- to find a class.
--- vim.lsp.start() should return the client
-
-function phpactor.findclass(buffer, fqn, callback)
- local class_parts = vim.split(fqn, "\\")
- local class = class_parts[#class_parts]
-
- vim.lsp.buf_request(buffer, "workspace/symbol", { query = class }, function(err, server_result, _, _)
- if err then
- callback(nil, "Error when finding workspace symbols: " .. err.message)
-
- return
- end
-
- local locations = vim.lsp.util.symbols_to_items(server_result or {}, buffer) or {}
- if vim.tbl_isempty(locations) then
- vim.api.nvim_err_writeln("Empty response looking for class: " .. fqn)
- return
- end
- end)
-end
-
--- getting the config I can re use the client
--- the next thing is to make the request with the client
-local config = require("lspconfig").phpactor
-config.root_dir = vim.fn.getcwd()
-local client_id = vim.lsp.start(config)
-
-vim.lsp.get_client_by_id(client_id)
--- use client.request or request_sync
--- look for the direct of the symbol
-return {
- phpactor = phpactor,
-}
diff --git a/lua/plugins/animation.lua b/lua/plugins/animation.lua
index 386c761..865287e 100644
--- a/lua/plugins/animation.lua
+++ b/lua/plugins/animation.lua
@@ -4,7 +4,7 @@ return {
"anuvyklack/middleclass",
},
keys = {
- {"<leader>aa", function ()
+ {"<leader>AA", function ()
require("pi.animations").redraw_buffer()
end}
},
diff --git a/lua/plugins/noice.lua b/lua/plugins/noice.lua
index 70e81e9..7cd5593 100644
--- a/lua/plugins/noice.lua
+++ b/lua/plugins/noice.lua
@@ -5,108 +5,208 @@ return {
},
event = "VeryLazy",
opts = {
- lsp = {
- -- override markdown rendering so that **cmp** and other plugins use **Treesitter**
- override = {
- ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
- ["vim.lsp.util.stylize_markdown"] = true,
- ["cmp.entry.get_documentation"] = true,
- },
- },
- -- -- you can enable a preset for easier configuration
- presets = {
- bottom_search = true, -- use a classic bottom cmdline for search
- -- command_palette = true, -- position the cmdline and popupmenu together
- long_message_to_split = true, -- long messages will be sent to a split
- -- inc_rename = false, -- enables an input dialog for inc-rename.nvim
- lsp_doc_border = true, -- add a border to hover docs and signature help
- },
cmdline = {
- view = "cmdline",
+ enabled = true, -- enables the Noice cmdline UI
+ view = "cmdline_popup", -- view for rendering the cmdline. Change to `cmdline` to get a classic cmdline at the bottom
+ opts = {}, -- global options for the cmdline. See section on views
+ ---@type table<string, CmdlineFormat>
+ format = {
+ -- conceal: (default=true) This will hide the text in the cmdline that matches the pattern.
+ -- view: (default is cmdline view)
+ -- opts: any options passed to the view
+ -- icon_hl_group: optional hl_group for the icon
+ -- title: set to anything or empty string to hide
+ cmdline = { pattern = "^:", icon = "", lang = "vim" },
+ search_down = { kind = "search", pattern = "^/", icon = " ", lang = "regex" },
+ search_up = { kind = "search", pattern = "^%?", icon = " ", lang = "regex" },
+ filter = { pattern = "^:%s*!", icon = "$", lang = "bash" },
+ lua = { pattern = { "^:%s*lua%s+", "^:%s*lua%s*=%s*", "^:%s*=%s*" }, icon = "", lang = "lua" },
+ help = { pattern = "^:%s*he?l?p?%s+", icon = "" },
+ input = { view = "cmdline_input", icon = "󰥻 " }, -- Used by input()
+ -- lua = false, -- to disable a format, set to `false`
+ },
},
messages = {
+ -- NOTE: If you enable messages, then the cmdline is enabled automatically.
+ -- This is a current Neovim limitation.
enabled = true, -- enables the Noice messages UI
view = "notify", -- default view for messages
view_error = "notify", -- view for errors
view_warn = "notify", -- view for warnings
view_history = "messages", -- view for :messages
- view_search = false, -- view for search count messages. Set to `false` to disable
+ view_search = "virtualtext", -- view for search count messages. Set to `false` to disable
},
- routes = {
- {
+ popupmenu = {
+ enabled = true, -- enables the Noice popupmenu UI
+ ---@type 'nui'|'cmp'
+ backend = "nui", -- backend to use to show regular cmdline completions
+ ---@type NoicePopupmenuItemKind|false
+ -- Icons for completion item kinds (see defaults at noice.config.icons.kinds)
+ kind_icons = {}, -- set to `false` to disable icons
+ },
+ -- default options for require('noice').redirect
+ -- see the section on Command Redirection
+ ---@type NoiceRouteConfig
+ redirect = {
+ view = "popup",
+ filter = { event = "msg_show" },
+ },
+ -- You can add any custom commands below that will be available with `:Noice command`
+ ---@type table<string, NoiceCommand>
+ commands = {
+ history = {
+ -- options for the message history that you get with `:Noice`
view = "split",
+ opts = { enter = true, format = "details" },
filter = {
- cmdline = "G",
- },
- opts = {
- enter = true,
- render = "plain",
- format = { "{message}" },
- replace = true,
- close = {
- events = { "BufLeave" },
-