Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gbprod/none-ls-ecs.nvim
Easy Coding Standard PHP formatter source for none-ls.nvim
https://github.com/gbprod/none-ls-ecs.nvim
neovim neovim-plugin none-ls none-ls-sources null-ls null-ls-sources nvim nvim-plugin php
Last synced: 21 days ago
JSON representation
Easy Coding Standard PHP formatter source for none-ls.nvim
- Host: GitHub
- URL: https://github.com/gbprod/none-ls-ecs.nvim
- Owner: gbprod
- License: wtfpl
- Created: 2024-02-06T13:20:35.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-03-19T08:43:02.000Z (8 months ago)
- Last Synced: 2024-03-19T09:51:30.443Z (8 months ago)
- Topics: neovim, neovim-plugin, none-ls, none-ls-sources, null-ls, null-ls-sources, nvim, nvim-plugin, php
- Language: Lua
- Homepage:
- Size: 3.91 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# none-ls-ecs.nvim
This plugin is a source for [none-ls.nvim](https://github.com/nvimtools/none-ls.nvim) allows to use PHP
[Easy coding standard](https://github.com/easy-coding-standard/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](https://github.com/nvimtools/none-ls.nvim).
## 📦 Installation
This should be used as a dependency of **none-ls.nvim**.
### [lazy.nvim](https://github.com/folke/lazy.nvim)
```lua
{
{
"nvimtools/none-ls.nvim",
dependencies = {
"gbprod/none-ls-ecs.nvim",
},
},
}
```## Setup
Follow the steps in null-ls [setup](https://github.com/nvimtools/none-ls.nvim?tab=readme-ov-file#setup) section.
```lua
local null_ls = require("null-ls")null_ls.setup({
sources = {
require("none-ls-ecs.formatting"),
...
}
})
```## FAQ
How to trigger the formatter only if the project is using Easy coding standard?
```lua
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?
```lua
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,
}))
```## Related projects
You can search for sources via the [`none-ls-sources` topic](https://github.com/topics/none-ls-sources).