fix(php): formatting and linting (#3540)

Fixed the issue of php formatting not working in extras.lang.php
This commit is contained in:
Muneeb Usmani
2024-06-11 01:01:24 +05:00
committed by GitHub
parent 6ab404134d
commit f5dc867ac2

View File

@ -18,12 +18,23 @@ return {
},
},
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"phpcs",
"php-cs-fixer",
},
},
},
{
"mfussenegger/nvim-dap",
optional = true,
dependencies = {
"williamboman/mason.nvim",
opts = { ensure_installed = { "php-debug-adapter" } },
opts = { ensure_installed = {
"php-debug-adapter",
} },
},
opts = function()
local dap = require("dap")
@ -35,4 +46,32 @@ return {
}
end,
},
{
"nvimtools/none-ls.nvim",
optional = true,
opts = function(_, opts)
local nls = require("null-ls")
opts.sources = opts.sources or {}
table.insert(opts.sources, nls.builtins.formatting.phpcsfixer)
table.insert(opts.sources, nls.builtins.diagnostics.phpcs)
end,
},
{
"mfussenegger/nvim-lint",
optional = true,
opts = {
linters_by_ft = {
php = { "phpcs" },
},
},
{
"stevearc/conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
php = { "php-cs-fixer" },
},
},
},
},
}