mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 03:10:04 -04:00
Add slint parser configuration and queries (#2598)
* Add slint parser * Mark slint as experimental * Remove filetype and add slint to the lockfile * Update queries * Update varibable.builtin's and repeats * Update slint true false * Change export back to keyword * Change export back to include :)
This commit is contained in:
parent
444525d386
commit
cc4f373bb4
4 changed files with 141 additions and 0 deletions
|
|
@ -251,6 +251,9 @@
|
||||||
"supercollider": {
|
"supercollider": {
|
||||||
"revision": "0f0e5b5a96dd3e048a9c3db648ed969c44068bff"
|
"revision": "0f0e5b5a96dd3e048a9c3db648ed969c44068bff"
|
||||||
},
|
},
|
||||||
|
"slint": {
|
||||||
|
"revision": "0d4dda94f96623302dfc234e06be62a5717f47da"
|
||||||
|
},
|
||||||
"surface": {
|
"surface": {
|
||||||
"revision": "f4586b35ac8548667a9aaa4eae44456c1f43d032"
|
"revision": "f4586b35ac8548667a9aaa4eae44456c1f43d032"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -461,6 +461,16 @@ list.supercollider = {
|
||||||
filetype = "supercollider",
|
filetype = "supercollider",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.slint = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/jrmoulton/tree-sitter-slint",
|
||||||
|
files = { "src/parser.c" },
|
||||||
|
branch = "main",
|
||||||
|
},
|
||||||
|
maintainers = { "@jrmoulton" },
|
||||||
|
experimental = true,
|
||||||
|
}
|
||||||
|
|
||||||
list.haskell = {
|
list.haskell = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/tree-sitter/tree-sitter-haskell",
|
url = "https://github.com/tree-sitter/tree-sitter-haskell",
|
||||||
|
|
|
||||||
115
queries/slint/highlights.scm
Normal file
115
queries/slint/highlights.scm
Normal file
|
|
@ -0,0 +1,115 @@
|
||||||
|
|
||||||
|
(user_type_identifier) @type
|
||||||
|
|
||||||
|
(var_identifier) @variable
|
||||||
|
|
||||||
|
(state_identifier) @field
|
||||||
|
|
||||||
|
(var_identifier
|
||||||
|
(post_identifier) @variable)
|
||||||
|
|
||||||
|
(function_identifier) @function
|
||||||
|
|
||||||
|
(reference_identifier) @keyword
|
||||||
|
(visibility_modifier) @include
|
||||||
|
|
||||||
|
(comment) @comment
|
||||||
|
|
||||||
|
(value) @number
|
||||||
|
(string) @string
|
||||||
|
|
||||||
|
[
|
||||||
|
"in"
|
||||||
|
"for"
|
||||||
|
] @repeat
|
||||||
|
|
||||||
|
"@" @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"import"
|
||||||
|
"from"
|
||||||
|
] @include
|
||||||
|
|
||||||
|
[
|
||||||
|
"if"
|
||||||
|
"else"
|
||||||
|
] @conditional
|
||||||
|
|
||||||
|
[
|
||||||
|
"root"
|
||||||
|
"parent"
|
||||||
|
"this"
|
||||||
|
] @variable.builtin
|
||||||
|
|
||||||
|
[
|
||||||
|
"true"
|
||||||
|
"false"
|
||||||
|
] @boolean
|
||||||
|
|
||||||
|
|
||||||
|
[
|
||||||
|
"struct"
|
||||||
|
"property"
|
||||||
|
"callback"
|
||||||
|
"in"
|
||||||
|
"animate"
|
||||||
|
"states"
|
||||||
|
"when"
|
||||||
|
"out"
|
||||||
|
"transitions"
|
||||||
|
"global"
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"black"
|
||||||
|
"transparent"
|
||||||
|
"blue"
|
||||||
|
"ease"
|
||||||
|
"ease_in"
|
||||||
|
"ease-in"
|
||||||
|
"ease_in_out"
|
||||||
|
"ease-in-out"
|
||||||
|
"ease_out"
|
||||||
|
"ease-out"
|
||||||
|
"end"
|
||||||
|
"green"
|
||||||
|
"red"
|
||||||
|
"red"
|
||||||
|
"start"
|
||||||
|
"yellow"
|
||||||
|
] @constant.builtin
|
||||||
|
|
||||||
|
|
||||||
|
; Punctuation
|
||||||
|
[
|
||||||
|
","
|
||||||
|
"."
|
||||||
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
; Brackets
|
||||||
|
[
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
] @punctuation.bracket
|
||||||
|
|
||||||
|
[
|
||||||
|
"angle"
|
||||||
|
"bool"
|
||||||
|
"brush"
|
||||||
|
; "color" // This causes problems
|
||||||
|
"duration"
|
||||||
|
"easing"
|
||||||
|
"float"
|
||||||
|
"image"
|
||||||
|
"int"
|
||||||
|
"length"
|
||||||
|
"percent"
|
||||||
|
"physical-length"
|
||||||
|
"physical_length"
|
||||||
|
"string"
|
||||||
|
] @type.builtin
|
||||||
|
|
||||||
13
queries/slint/indents.scm
Normal file
13
queries/slint/indents.scm
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
|
||||||
|
[
|
||||||
|
(field_declaration_list_body)
|
||||||
|
(list_definition_body)
|
||||||
|
(struct_field_declaration_list_body)
|
||||||
|
] @indent
|
||||||
|
|
||||||
|
"}" @indent_end
|
||||||
|
|
||||||
|
(comment) @auto
|
||||||
|
|
||||||
|
(string) @auto
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue