diff --git a/lazy-lock.json b/lazy-lock.json index 087bc42..1676a4c 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,5 +1,6 @@ { "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, + "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, "alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" }, "bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" }, @@ -24,6 +25,8 @@ "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, "mini.indentscope": { "branch": "main", "commit": "f0d7faa064c892b96997810afcddfadc3f2a15b3" }, "neoscroll.nvim": { "branch": "master", "commit": "a731f66f1d39ec6175fd201c5bf849e54abda99c" }, + "neotest": { "branch": "master", "commit": "f30bab1faef13d47f3905e065215c96a42d075ad" }, + "neotest-phpunit": { "branch": "main", "commit": "baae8dfa0a3aaacd9f0bb6845d6348f5bcdc48bb" }, "noice.nvim": { "branch": "main", "commit": "8f1d9966762e62fa8788e5fb1a5f6a86784221d9" }, "none-ls-extras.nvim": { "branch": "main", "commit": "336e84b9e43c0effb735b08798ffac382920053b" }, "none-ls.nvim": { "branch": "main", "commit": "cc0a3c45047e3daf85d07c1571d65476cfce6480" }, @@ -31,18 +34,14 @@ "nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" }, "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, - "nvim-dap": { "branch": "master", "commit": "5ba8ceace596360321cf33fa4b56d9d46e057ce9" }, - "nvim-dap-ui": { "branch": "master", "commit": "f7d75cca202b52a60c520ec7b1ec3414d6e77b0f" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" }, - "nvim-dap-vscode-js": { "branch": "main", "commit": "e7c05495934a658c8aa10afd995dacd796f76091" }, "nvim-lspconfig": { "branch": "master", "commit": "0b8165cf95806bc4bb8f745bb0c92021b2ed4b98" }, - "nvim-material-icon": { "branch": "main", "commit": "7a8893417c6947925d00946d16b81b56574796a9" }, + "nvim-material-icon": { "branch": "main", "commit": "2f1d6333bbec2e787774193c9fc7b447b878069a" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-nio": { "branch": "master", "commit": "7969e0a8ffabdf210edd7978ec954a47a737bbcc" }, "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-scrollview": { "branch": "main", "commit": "c29c5f69d37040a1fac88cbea7f5e6f06f0aff4d" }, "nvim-tree.lua": { "branch": "master", "commit": "2086e564c4d23fea714e8a6d63b881e551af2f41" }, - "nvim-treesitter": { "branch": "master", "commit": "f7edd3f5f636dceebc874a59bdcf9de6a41dbc68" }, + "nvim-treesitter": { "branch": "master", "commit": "c29989f5d735a30b6d2350b54d5cd50be811f8b2" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" }, "nvim-ts-autotag": { "branch": "main", "commit": "06fe07d7523ba8c755fac7c913fceba43b1720ee" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" }, @@ -59,7 +58,6 @@ "vim-startuptime": { "branch": "master", "commit": "97a88e688482a09c3c4b777d07b509b328a5ec29" }, "vim-visual-multi": { "branch": "master", "commit": "b84a6d42c1c10678928b0bf8327f378c8bc8af5a" }, "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" }, - "vscode-js-debug": { "branch": "main", "commit": "9fd0efd39d534304cffd970263148923b627be20" }, "which-key.nvim": { "branch": "main", "commit": "0539da005b98b02cf730c1d9da82b8e8edb1c2d2" }, "yanky.nvim": { "branch": "main", "commit": "9268018e92d02650a94e39dd5f5903c542f7ea11" } } \ No newline at end of file diff --git a/lua/custom/default.lua b/lua/custom/default.lua index 163e6ee..e51d7c6 100644 --- a/lua/custom/default.lua +++ b/lua/custom/default.lua @@ -154,3 +154,6 @@ pcode.refactoring = false pcode.nvim_dap = false -- not support for windows os pcode.nvim_dap_javascript = false pcode.nvim_dap_php = false + +-- https://github.com/olimorris/neotest-phpunit +pcode.phpunit = true diff --git a/lua/plugins/test_php.lua b/lua/plugins/test_php.lua new file mode 100644 index 0000000..b97adf3 --- /dev/null +++ b/lua/plugins/test_php.lua @@ -0,0 +1,37 @@ +local M = {} +if pcode.phpunit then + M = { + { + "nvim-neotest/neotest", + dependencies = { + "antoinemadec/FixCursorHold.nvim", + "olimorris/neotest-phpunit", + "nvim-neotest/nvim-nio", + }, + config = function() + require("neotest-phpunit")({ + filter_dirs = { "vendor" }, + }) + require("neotest").setup({ + adapters = { + require("neotest-phpunit"), + }, + }) + end, + -- stylua: ignore + keys = { + { "T","",desc="  Test"}, + { "Tt", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File" }, + { "Tr", function() require("neotest").run.run() end, desc = "Run Nearest" }, + { "TT", function() require("neotest").run.run(vim.loop.cwd()) end, desc = "Run All Test Files" }, + { "Tl", function() require("neotest").run.run_last() end, desc = "Run Last" }, + { "Ts", function() require("neotest").summary.toggle() end, desc = "Toggle Summary" }, + { "To", function() require("neotest").output.open({ enter = true, auto_close = true }) end, desc = "Show Output" }, + { "TO", function() require("neotest").output_panel.toggle() end, desc = "Toggle Output Panel" }, + { "TS", function() require("neotest").run.stop() end, desc = "Stop" }, + }, + }, + } +end + +return M