Skip to content

Commit

Permalink
docs: introduce FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
gbprod committed Feb 7, 2024
1 parent 24fbb43 commit 6ceb93c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,26 @@ This should be used as a dependency of **none-ls.nvim**.
},
}
```

## FAQ

How to trigger the formatter only if the project is using psalm?

```lua
null_ls.register(require("none-ls-psalm.diagnostics").with({
condition = function(utils)
return utils.root_has_file("psalm.xml")
end,
}))
```

How to use project's psalm bin instead of globally installed one?

```lua
null_ls.register(require("none-ls-psalm.diagnostics").with({
command = "vendor/bin/psalm",
condition = function(utils)
return utils.root_has_file("vendor/bin/psalm")
end,
}))
```

0 comments on commit 6ceb93c

Please sign in to comment.