return { "ccaglak/phptools.nvim", keys = { { "lm", "PhpTools Method" }, { "lc", "PhpTools Class" }, { "ls", "PhpTools Scripts" }, { "ln", "PhpTools Namespace" }, { "lg", "PhpTools GetSet" }, { "lf", "PhpTools Create" }, { "ld", "PhpTools DrupalAutoLoader" }, { mode = "v", "lr", "PhpTools Refactor" }, }, dependencies = { "ccaglak/namespace.nvim", -- optional - php namespace resolver "ccaglak/larago.nvim", -- optional -- laravel goto blade/components -- "ccaglak/snippets.nvim", -- optional -- native snippet expander }, config = function() require("phptools").setup({ ui = { enable = true, -- default:true; false only if you have a UI enhancement plugin fzf = false, -- default:false; requires fzf used only in tests module otherwise there might long list of tests }, create = false, -- default:false autorun PhpTools Create when creating a new php file drupal_autoloader = { -- delete if you dont use it scan_paths = { "/web/modules/contrib/" }, -- Paths to scan for modules root_markers = { ".git" }, -- Project root markers autoload_file = "/vendor/composer/autoload_psr4.php", -- Autoload file path }, custom_toggles = { -- { "foo", "bar", "baz" }, -- Add more custom toggle groups here }, }) local map = vim.keymap.set -- local ide_helper = require("phptools.ide_helper") -- -- Laravel IDE Helper keymaps -- map("n", "lha", ide_helper.generate_all, { desc = "Generate all IDE helpers" }) -- map("n", "lhm", ide_helper.generate_models, { desc = "Generate model helpers" }) -- map("n", "lhf", ide_helper.generate_facades, { desc = "Generate facade helpers" }) -- map("n", "lht", ide_helper.generate_meta, { desc = "Generate meta helper" }) -- map("n", "lhi", ide_helper.install, { desc = "Install IDE Helper package" }) -- -- local tests = require("phptools.tests") -- map("n", "ta", tests.test.all, { desc = "Run all tests" }) -- map("n", "tf", tests.test.file, { desc = "Run current file tests" }) -- map("n", "tl", tests.test.line, { desc = "Run test at cursor" }) -- map("n", "ts", tests.test.filter, { desc = "Search and run test" }) -- map("n", "tp", tests.test.parallel, { desc = "Run tests in parallel" }) -- map("n", "tr", tests.test.rerun, { desc = "Rerun last test" }) -- map("n", "ti", tests.test.selected, { desc = "Run selected test file" }) -- -- local fn = require("phptools.fn") -- map("n", "llf", fn.toggle_function, { desc = "Toggle PHP function style" }) -- map("n", "lli", fn.toggle_if_ternary, { desc = "Toggle if/ternary" }) -- map("n", "llm", fn.toggle_if_match, { desc = "Toggle if/match" }) -- map("n", "llm", fn.toggle_quotes, { desc = "Toggle qoutes" }) end, }