diff options
| author | Jared Moulton <jaredmoulton3@gmail.com> | 2022-03-07 16:10:31 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-07 23:10:31 +0000 |
| commit | cc4f373bb4a2a1057479e1d08d46d740717b32a3 (patch) | |
| tree | 8d16082a30a758b34c71d62c47adaa81f4e1f888 /queries/slint | |
| parent | Update lockfile.json (diff) | |
| download | nvim-treesitter-cc4f373bb4a2a1057479e1d08d46d740717b32a3.tar nvim-treesitter-cc4f373bb4a2a1057479e1d08d46d740717b32a3.tar.gz nvim-treesitter-cc4f373bb4a2a1057479e1d08d46d740717b32a3.tar.bz2 nvim-treesitter-cc4f373bb4a2a1057479e1d08d46d740717b32a3.tar.lz nvim-treesitter-cc4f373bb4a2a1057479e1d08d46d740717b32a3.tar.xz nvim-treesitter-cc4f373bb4a2a1057479e1d08d46d740717b32a3.tar.zst nvim-treesitter-cc4f373bb4a2a1057479e1d08d46d740717b32a3.zip | |
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 :)
Diffstat (limited to 'queries/slint')
| -rw-r--r-- | queries/slint/highlights.scm | 115 | ||||
| -rw-r--r-- | queries/slint/indents.scm | 13 |
2 files changed, 128 insertions, 0 deletions
diff --git a/queries/slint/highlights.scm b/queries/slint/highlights.scm new file mode 100644 index 000000000..7372f331c --- /dev/null +++ b/queries/slint/highlights.scm @@ -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 + diff --git a/queries/slint/indents.scm b/queries/slint/indents.scm new file mode 100644 index 000000000..30761ef8f --- /dev/null +++ b/queries/slint/indents.scm @@ -0,0 +1,13 @@ + +[ +(field_declaration_list_body) +(list_definition_body) +(struct_field_declaration_list_body) +] @indent + +"}" @indent_end + +(comment) @auto + +(string) @auto + |
