diff options
| author | Amaan Qureshi <amaanq12@gmail.com> | 2023-01-21 07:39:15 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-21 14:39:15 +0200 |
| commit | 08e1adae538083cf541c201a49fe7602bf308d65 (patch) | |
| tree | 5080773eb8993cb95908c4bc8e9af0be6a34be20 /queries | |
| parent | docs: fix comment alignment (diff) | |
| download | nvim-treesitter-08e1adae538083cf541c201a49fe7602bf308d65.tar nvim-treesitter-08e1adae538083cf541c201a49fe7602bf308d65.tar.gz nvim-treesitter-08e1adae538083cf541c201a49fe7602bf308d65.tar.bz2 nvim-treesitter-08e1adae538083cf541c201a49fe7602bf308d65.tar.lz nvim-treesitter-08e1adae538083cf541c201a49fe7602bf308d65.tar.xz nvim-treesitter-08e1adae538083cf541c201a49fe7602bf308d65.tar.zst nvim-treesitter-08e1adae538083cf541c201a49fe7602bf308d65.zip | |
feat: add thrift (#4185)
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/thrift/highlights.scm | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/queries/thrift/highlights.scm b/queries/thrift/highlights.scm new file mode 100644 index 000000000..f585ec08a --- /dev/null +++ b/queries/thrift/highlights.scm @@ -0,0 +1,144 @@ +; Namespace + +(namespace) @namespace + +; Includes + +[ + "include" + "cpp_include" +] @include + +(include_path) @string + +; Types + +(primitive_type) @type.builtin + +[ + "list" + "map" + "set" +] @type.builtin + +; Function + +(function) @function + +; Fields + +(field) @field + +; Parameters + +(parameter) @parameter + +; Variables + +(identifier) @variable + +; Operators + +[ + "=" + "+" + "-" + "&" +] @operator + +; Exceptions + +[ + (exception) + (throws) +] @exception + +; Keywords + +[ + "const" + "cpp_include" + "enum" + "exception" + "extends" + "include" + "namespace" + "oneway" + "optional" + "required" + "senum" + "service" + "struct" + "throws" + "typedef" + "union" + "void" +] @keyword + +; Deprecated +[ + "async" + "byte" + "cocoa_prefix" + "cpp_namespace" + "csharp_namespace" + "delphi_namespace" + "java_package" + "perl_package" + "php_namespace" + "py_module" + "ruby_namespace" + "smalltalk_category" + "smalltalk_prefix" + "xsd_all" + "xsd_attrs" + "xsd_namespace" + "xsd_nillable" + "xsd_optional" +] @keyword + +(namespace_scope) @keyword + +; Literals + +(string_literal) @string + +(number) @number + +(double) @float + +(boolean) @boolean + +(typedef_definition) @type.definition + +[ + "const" +] @type.qualifier + +[ + "*" +] @punctuation.special + +; Misc + +(field_modifier) @attribute + +["{" "}"] @punctuation.bracket + +["(" ")"] @punctuation.bracket + +["[" "]"] @punctuation.bracket + +[ + ";" + "," + (list_separator) +] @punctuation.delimiter + +; Errors + +(invalid) @error + +; Comments + +(comment) @comment @spell |
