mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-10 23:40:04 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
310f0925ec
commit
692b051b09
1247 changed files with 6096 additions and 9074 deletions
60
runtime/queries/authzed/highlights.scm
Normal file
60
runtime/queries/authzed/highlights.scm
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
(identifier) @function
|
||||
|
||||
(block
|
||||
(relation
|
||||
(relation_literal) @function.builtin
|
||||
(identifier) @constant))
|
||||
|
||||
(block
|
||||
(permission
|
||||
(permission_literal) @variable.builtin
|
||||
(identifier) @type))
|
||||
|
||||
; relations
|
||||
(rel_expression
|
||||
(identifier) @property)
|
||||
|
||||
(relation
|
||||
(rel_expression
|
||||
(hash_literal)
|
||||
.
|
||||
(identifier) @constant))
|
||||
|
||||
; permissions
|
||||
(perm_expression
|
||||
(identifier) @property)
|
||||
|
||||
(call_expression
|
||||
function: (selector_expression
|
||||
operand: (identifier) @constant
|
||||
field: (field_identifier) @function.method))
|
||||
|
||||
(perm_expression
|
||||
(stabby) @operator
|
||||
.
|
||||
(identifier) @function)
|
||||
|
||||
; misc
|
||||
[
|
||||
(plus_literal)
|
||||
(minus_literal)
|
||||
(amp_literal)
|
||||
(pipe_literal)
|
||||
] @operator
|
||||
|
||||
[
|
||||
(true)
|
||||
(false)
|
||||
] @boolean
|
||||
|
||||
(nil) @constant.builtin
|
||||
|
||||
[
|
||||
(caveat_literal)
|
||||
(definition_literal)
|
||||
] @keyword
|
||||
|
||||
[
|
||||
(hash_literal)
|
||||
(comment)
|
||||
] @comment
|
||||
26
runtime/queries/authzed/injections.scm
Normal file
26
runtime/queries/authzed/injections.scm
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((function_call
|
||||
name: (ident) @_name
|
||||
.
|
||||
(simplexpr)
|
||||
.
|
||||
(simplexpr
|
||||
(string
|
||||
(string_fragment) @injection.content)+))
|
||||
(#any-of? @_name "replace" "search" "matches" "captures")
|
||||
(#set! injection.language "regex")
|
||||
(#set! injection.combined))
|
||||
|
||||
((function_call
|
||||
name: (ident) @_name
|
||||
.
|
||||
(simplexpr)
|
||||
.
|
||||
(simplexpr
|
||||
(string
|
||||
(string_fragment) @injection.content)+))
|
||||
(#eq? @_name "jq")
|
||||
(#set! injection.language "jq")
|
||||
(#set! injection.combined))
|
||||
Loading…
Add table
Add a link
Reference in a new issue