mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-08 22:40:12 -04:00
feat: add thrift (#4185)
This commit is contained in:
parent
341bbae864
commit
08e1adae53
4 changed files with 157 additions and 0 deletions
144
queries/thrift/highlights.scm
Normal file
144
queries/thrift/highlights.scm
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue