mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 08:35:53 +02:00
fix(php): formatting and linting (#3540)
Fixed the issue of php formatting not working in extras.lang.php
This commit is contained in:
parent
6ab404134d
commit
f5dc867ac2
1 changed files with 40 additions and 1 deletions
|
@ -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" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue