update
This commit is contained in:
parent
7434003b37
commit
82932b8223
|
@ -151,7 +151,8 @@ require'lspconfig'.sumneko_lua.setup {
|
|||
local null_ls = require("null-ls")
|
||||
|
||||
local sources = {
|
||||
null_ls.builtins.formatting.prettierd, -- phpcs - standards wordpress
|
||||
null_ls.builtins.formatting.prettierd, --
|
||||
-- phpcs - standards wordpress
|
||||
-- in project directory must
|
||||
-- composer require friendsofphp/php-cs-fixer
|
||||
-- as in https://github.com/FriendsOfPHP/PHP-CS-Fixer
|
||||
|
@ -162,30 +163,33 @@ local sources = {
|
|||
end,
|
||||
command = "vendor/bin/phpcs",
|
||||
args = {"--standard=WordPress", "--report=json", "-s", "-"}
|
||||
}), -- phpcbf - standards wordpress
|
||||
null_ls.builtins.formatting.phpcbf.with({
|
||||
condition = function(utils)
|
||||
return utils.root_has_file({"vendor/bin/phpcbf"})
|
||||
end,
|
||||
command = "vendor/bin/phpcbf",
|
||||
args = {"--standard=WordPress", "-"}
|
||||
}), -- phpcs
|
||||
}), --
|
||||
-- phpcbf - standards wordpress
|
||||
-- null_ls.builtins.formatting.phpcbf.with({
|
||||
-- condition = function(utils)
|
||||
-- return utils.root_has_file({"vendor/bin/phpcbf"})
|
||||
-- end,
|
||||
-- command = "vendor/bin/phpcbf",
|
||||
-- args = {"--standard=WordPress", "-"}
|
||||
-- }), --
|
||||
-- phpcs
|
||||
null_ls.builtins.diagnostics.phpcs.with({
|
||||
condition = function(utils)
|
||||
return not utils.root_has_file({"vendor/bin/phpcs"})
|
||||
end,
|
||||
args = {"--standard=PSR12", "--report=json", "-s", "-"}
|
||||
}), -- phpcbf
|
||||
null_ls.builtins.formatting.phpcbf.with({
|
||||
condition = function(utils)
|
||||
return not utils.root_has_file({"vendor/bin/phpcbf"})
|
||||
end,
|
||||
args = {"--standard=PSR12", "--report=json", "-s", "-"}
|
||||
}), -- black
|
||||
null_ls.builtins.formatting.black, -- shellcheck,
|
||||
null_ls.builtins.diagnostics.shellcheck, -- flake8
|
||||
null_ls.builtins.diagnostics.flake8, -- luaFormatter
|
||||
null_ls.builtins.formatting.lua_format
|
||||
}), --
|
||||
-- phpcbf
|
||||
-- null_ls.builtins.formatting.phpcbf.with({
|
||||
-- condition = function(utils)
|
||||
-- return not utils.root_has_file({"vendor/bin/phpcbf"})
|
||||
-- end,
|
||||
-- args = {"--standard=PSR12", "--report=json", "-s", "-"}
|
||||
-- }),
|
||||
null_ls.builtins.formatting.black, -- black
|
||||
null_ls.builtins.diagnostics.shellcheck, -- shellcheck,
|
||||
null_ls.builtins.diagnostics.flake8, -- flake8
|
||||
null_ls.builtins.formatting.lua_format -- luaFormatter
|
||||
}
|
||||
|
||||
null_ls.setup({sources = sources, on_attach = on_attach})
|
||||
|
|
Loading…
Reference in New Issue