mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-21 12:50:09 -04:00
feat(fga): add FGA grammar
FGA is the DSL for [OpenFGA](https://openfga.dev/) authorization models - a zanzibar-like Role-Based Access Control system.
This commit is contained in:
parent
0d32ec3c3e
commit
5ca72f9b30
3 changed files with 59 additions and 0 deletions
1
SUPPORTED_LANGUAGES.md
generated
1
SUPPORTED_LANGUAGES.md
generated
|
|
@ -80,6 +80,7 @@ ecma (queries only)[^ecma] | unstable | `HFIJL` | | @steelsojka
|
|||
[facility](https://github.com/FacilityApi/tree-sitter-facility) | unstable | `HFIJ ` | | @bryankenote
|
||||
[faust](https://github.com/khiner/tree-sitter-faust) | unstable | `H J ` | | @khiner
|
||||
[fennel](https://github.com/alexmozaidze/tree-sitter-fennel) | unstable | `HF JL` | | @alexmozaidze
|
||||
[fga](https://github.com/matoous/tree-sitter-fga) | unstable | `H ` | | @matoous
|
||||
[fidl](https://github.com/google/tree-sitter-fidl) | unstable | `HF J ` | | @chaopeng
|
||||
[firrtl](https://github.com/tree-sitter-grammars/tree-sitter-firrtl) | unstable | `HFIJL` | | @amaanq
|
||||
[fish](https://github.com/ram02z/tree-sitter-fish) | unstable | `HFIJL` | | @ram02z
|
||||
|
|
|
|||
|
|
@ -550,6 +550,14 @@ return {
|
|||
maintainers = { '@alexmozaidze' },
|
||||
tier = 2,
|
||||
},
|
||||
fga = {
|
||||
install_info = {
|
||||
revision = '44bfe4e15dc11969f1a23e5f0fa9d8e961268721',
|
||||
url = 'https://github.com/matoous/tree-sitter-fga',
|
||||
},
|
||||
maintainers = { '@matoous' },
|
||||
tier = 2,
|
||||
},
|
||||
fidl = {
|
||||
install_info = {
|
||||
revision = '0a8910f293268e27ff554357c229ba172b0eaed2',
|
||||
|
|
|
|||
50
runtime/queries/fga/highlights.scm
Normal file
50
runtime/queries/fga/highlights.scm
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
(call_expression
|
||||
function: (identifier) @function)
|
||||
|
||||
(call_expression
|
||||
function: (selector_expression
|
||||
field: (identifier) @function.method))
|
||||
|
||||
((type_identifier) @type.builtin
|
||||
(#match? @type.builtin "^(string|int|map|uint|list|timestamp|bool|duration|double|ipaddress)$"))
|
||||
|
||||
(condition_declaration
|
||||
name: (identifier) @function)
|
||||
|
||||
(version) @number
|
||||
|
||||
[
|
||||
"*"
|
||||
"/"
|
||||
"%"
|
||||
">>"
|
||||
"<<"
|
||||
"&"
|
||||
"&^"
|
||||
] @operator
|
||||
|
||||
[
|
||||
"+"
|
||||
"-"
|
||||
"|"
|
||||
"^"
|
||||
] @operator
|
||||
|
||||
[
|
||||
"or"
|
||||
"and"
|
||||
"but not"
|
||||
] @operator
|
||||
|
||||
[
|
||||
"model"
|
||||
"schema"
|
||||
"type"
|
||||
"relations"
|
||||
"define"
|
||||
"from"
|
||||
] @keyword
|
||||
|
||||
"condition" @keyword.function
|
||||
|
||||
(comment) @comment
|
||||
Loading…
Add table
Add a link
Reference in a new issue