mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
phpcs linter, php-cs-fixer formatter
This commit is contained in:
parent
ee5fb7c7b5
commit
e12fc47f74
1 changed files with 20 additions and 7 deletions
|
|
@ -42,18 +42,31 @@ return {
|
||||||
local nls = require("null-ls")
|
local nls = require("null-ls")
|
||||||
opts.sources = opts.sources or {}
|
opts.sources = opts.sources or {}
|
||||||
table.insert(opts.sources, nls.builtins.formatting.phpcsfixer)
|
table.insert(opts.sources, nls.builtins.formatting.phpcsfixer)
|
||||||
|
table.insert(opts.sources, nls.builtins.diagnostics.phpcs)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"stevearc/conform.nvim",
|
"mfussenegger/nvim-lint",
|
||||||
optional = true,
|
optional = true,
|
||||||
dependencies = {
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
opts = { ensure_installed = { "php-cs-fixer" } },
|
|
||||||
},
|
|
||||||
opts = {
|
opts = {
|
||||||
formatters_by_ft = {
|
linters_by_ft = {
|
||||||
php = { "php-cs-fixer" },
|
php = { "phpcs" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
optional = true,
|
||||||
|
dependencies = {
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
opts = { ensure_installed = {
|
||||||
|
"phpcs",
|
||||||
|
"php-cs-fixer",
|
||||||
|
} },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
formatters_by_ft = {
|
||||||
|
php = { "php-cs-fixer" },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue