https://github.com/rubixdev/tree-sitter-while
https://github.com/rubixdev/tree-sitter-while
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rubixdev/tree-sitter-while
- Owner: RubixDev
- License: mit
- Created: 2024-10-15T15:52:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-15T15:54:15.000Z (over 1 year ago)
- Last Synced: 2025-03-02T15:53:00.610Z (about 1 year ago)
- Language: Rust
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tree-sitter-while
[while](https://github.com/Gobidev/while-lang) grammar for
[tree-sitter](https://github.com/tree-sitter/tree-sitter)
## Usage in Neovim
### Parser Installation
To use this parser you must manually add it to your tree-sitter config and then
install it with `:TSInstall while` or by adding it to your `ensure_installed`
list:
```lua
require('nvim-treesitter.parsers').get_parser_configs()['while'] = {
install_info = {
url = 'https://github.com/RubixDev/tree-sitter-while.git',
files = { 'src/parser.c' },
branch = 'main',
},
}
```
### File type detection
You will likely also have to add the `while` file type:
```lua
vim.filetype.add { extension = { ['while'] = 'while' } }
```
### Highlighting
If you want to use this parser for highlighting, you will also have to add this
repository as a plugin, for example for packer.nvim add this:
```lua
use { 'RubixDev/tree-sitter-while' }
```