IDE support for Pest, via the LSP.
This repository contains an implementation of the Language Server Protocol for the Pest parser generator.
- Error reporting.
- Syntax highlighting.
- Rename support.
- Go to declaration/definition.
- Find references.
- Highlighting a rule highlights it's references.
- Hover information for built-in rules.
- Intellisense/completion of rule names.
- Formatting.
- Debugging window (as on the Pest website).
- Visual Studio Code
Due to the usage of the LSP by this project, adding support for new IDEs should be far more achievable than a custom implementation for each editor.
- Neovim.
- Fleet, once it releases.
This repository uses a Taskfile; I recommend installing the task
command for a better experience developing in this repository.
The task fmt-and-lint
can be used to format and lint your code to ensure it fits with the rest of the repository.
The server itself is implemented in Rust. It contains several methods which are called by each editor extension upon important events. The server is packaged into a WASM module.
Each extension is implemented in the language that makes the most sense for its respective editor.
We appreciate contributions! I recommend reaching out on Discord (the invite to which can be found at pest.rs) before contributing, to check with us.
- OsoHQ, for their blog post, and open source code which was used to originally scaffold the build tools and boilerplate of getting a LS running.
- Stef Gijsberts for their Pest syntax highlighting TextMate bundle which is used in this extension under the MIT license.