Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pinbraerts/tree-sitter-fastbuild
FASTBuild grammar for tree-sitter
https://github.com/pinbraerts/tree-sitter-fastbuild
fastbuild parser tree-sitter
Last synced: 4 months ago
JSON representation
FASTBuild grammar for tree-sitter
- Host: GitHub
- URL: https://github.com/pinbraerts/tree-sitter-fastbuild
- Owner: pinbraerts
- Created: 2024-02-28T17:08:24.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-07-13T17:20:39.000Z (7 months ago)
- Last Synced: 2024-09-27T10:41:12.314Z (4 months ago)
- Topics: fastbuild, parser, tree-sitter
- Language: JavaScript
- Homepage:
- Size: 678 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tree-sitter-fastbuild
[FASTBuild](https://github.com/fastbuild/fastbuild) grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter)
## Usage
It's not published on grammar lists yet
### [NeoVim](https://github.com/neovim/neovim/) (using [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter))
```lua
local parsers = require 'nvim-treesitter.parsers'.get_parser_configs()
vim.filetype.add {
extension = {
bff = 'fastbuild',
},
}
parsers.fastbuild = {
install_info = {
url = 'https://github.com/pinbraerts/tree-sitter-fastbuild.git',
branch = 'main',
files = {
'src/parser.c',
'src/scanner.c',
},
generate_requires_npm = false,
requires_generate_from_grammar = false,
},
filetype = 'fastbuild',
}
```And then
```
:TSInstall fastbuild
```### Queries
You need to copy queries to some nvim runtime path directory
#### shell
```bash
ln -s /path/to/cloned/tree-sitter-fastbuild/queries ~/.config/nvim/after/queries/fastbuild
```#### powershell
```powershell
New-Item -Type SymbolicLink -Value path\to\cloned\tree-sitter-fastbuild\queries -Path $env:LOCALAPPDATA\nvim\after\queries\fastbuild
```## Features
- [x] Highlighting
- [x] Locals
- [x] [Context](https://github.com/nvim-treesitter/nvim-treesitter-context)
- [x] Folds
- [x] Indentation
- [x] [Text Objects](https://github.com/nvim-treesitter/nvim-treesitter-textobjects)## Links
- [Syntax](https://fastbuild.org/docs/syntaxguide.html)
## Example
![examples/example.bff](pictures/example.png)