This plugin is a source for none-ls.nvim allows to use PHP Easy coding standard formatter in Neovim with none-ls.nvim.
Note: This plugin is not intended to be used alone, it is a dependency of none-ls.nvim.
This should be used as a dependency of none-ls.nvim.
{
{
"nvimtools/none-ls.nvim",
dependencies = {
"gbprod/none-ls-ecs.nvim",
},
},
}
Follow the steps in null-ls setup section.
local null_ls = require("null-ls")
null_ls.setup({
sources = {
require("none-ls-ecs.formatting"),
...
}
})
How to trigger the formatter only if the project is using Easy coding standard?
null_ls.register(require("none-ls-ecs.formatting").with({
condition = function(utils)
return utils.root_has_file("ecs.php")
end,
}))
How to use project's ecs bin instead of globally installed one?
null_ls.register(require("none-ls-ecs.formatting").with({
command = "vendor/bin/ecs",
condition = function(utils)
return utils.root_has_file("vendor/bin/ecs")
end,
}))
You can search for sources via the none-ls-sources
topic.