return { { "nvim-treesitter/nvim-treesitter", opts = function(_, opts) vim.list_extend(opts.ensure_installed, { "php", "phpdoc", }) end, }, { "williamboman/mason.nvim", opts = function(_, opts) vim.list_extend(opts.ensure_installed, { "phpactor", "php-cs-fixer", "phpcs", }) end, }, { "neovim/nvim-lspconfig", opts = { servers = { phpactor = {}, }, }, }, { "mfussenegger/nvim-lint", opts = function(_, opts) opts.linters_by_ft.php = opts.linters_by_ft.php or {} table.insert(opts.linters_by_ft.php, "phpcs") return opts end, }, { "mfussenegger/nvim-dap", optional = true, dependencies = { "williamboman/mason.nvim", opts = function(_, opts) if type(opts.ensure_installed) == "table" then table.insert(opts.ensure_installed, "php-debug-adapter") end end, }, opts = function() local dap = require("dap") local path = require("mason-registry").get_package("php-debug-adapter"):get_install_path() dap.adapters.php = { type = "executable", command = "node", args = { path .. "/extension/out/phpDebug.js" }, } end, }, { "nvim-neotest/neotest", optional = true, dependencies = { "olimorris/neotest-phpunit", }, opts = { adapters = { ["neotest-phpunit"] = {}, }, }, }, { "stevearc/conform.nvim", opts = function(_, opts) opts.formatters_by_ft.php = opts.formatters_by_ft.php or {} table.insert(opts.formatters_by_ft.php, "php_cs_fixer") return opts end, }, { "luckasRanarison/nvim-devdocs", optional = true, opts = { ensure_installed = { "php", }, }, }, }