mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 01:10:02 -04:00
feat: add thrift (#4185)
This commit is contained in:
parent
341bbae864
commit
08e1adae53
4 changed files with 157 additions and 0 deletions
|
|
@ -299,6 +299,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
||||||
- [x] [sxhkdrc](https://github.com/RaafatTurki/tree-sitter-sxhkdrc) (maintained by @RaafatTurki)
|
- [x] [sxhkdrc](https://github.com/RaafatTurki/tree-sitter-sxhkdrc) (maintained by @RaafatTurki)
|
||||||
- [x] [teal](https://github.com/euclidianAce/tree-sitter-teal) (maintained by @euclidianAce)
|
- [x] [teal](https://github.com/euclidianAce/tree-sitter-teal) (maintained by @euclidianAce)
|
||||||
- [x] [terraform](https://github.com/MichaHoffmann/tree-sitter-hcl) (maintained by @MichaHoffmann)
|
- [x] [terraform](https://github.com/MichaHoffmann/tree-sitter-hcl) (maintained by @MichaHoffmann)
|
||||||
|
- [x] [thrift](https://github.com/duskmoon314/tree-sitter-thrift) (maintained by @amaanq, @duskmoon314)
|
||||||
- [x] [tiger](https://github.com/ambroisie/tree-sitter-tiger) (maintained by @ambroisie)
|
- [x] [tiger](https://github.com/ambroisie/tree-sitter-tiger) (maintained by @ambroisie)
|
||||||
- [x] [tlaplus](https://github.com/tlaplus-community/tree-sitter-tlaplus) (maintained by @ahelwer, @susliko)
|
- [x] [tlaplus](https://github.com/tlaplus-community/tree-sitter-tlaplus) (maintained by @ahelwer, @susliko)
|
||||||
- [x] [todotxt](https://github.com/arnarg/tree-sitter-todotxt.git) (experimental, maintained by @arnarg)
|
- [x] [todotxt](https://github.com/arnarg/tree-sitter-todotxt.git) (experimental, maintained by @arnarg)
|
||||||
|
|
|
||||||
|
|
@ -386,6 +386,9 @@
|
||||||
"terraform": {
|
"terraform": {
|
||||||
"revision": "0ff887f2a60a147452d52db060de6b42f42f1441"
|
"revision": "0ff887f2a60a147452d52db060de6b42f42f1441"
|
||||||
},
|
},
|
||||||
|
"thrift": {
|
||||||
|
"revision": "b49105758e3375f7f20781ba617493c1aac7d3c9"
|
||||||
|
},
|
||||||
"tiger": {
|
"tiger": {
|
||||||
"revision": "a233ebe360a73a92c50978e5c4e9e471bc59ff42"
|
"revision": "a233ebe360a73a92c50978e5c4e9e471bc59ff42"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1244,6 +1244,15 @@ list.v = {
|
||||||
maintainers = { "@kkharji" },
|
maintainers = { "@kkharji" },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.thrift = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/duskmoon314/tree-sitter-thrift",
|
||||||
|
files = { "src/parser.c" },
|
||||||
|
},
|
||||||
|
maintainers = { "@amaanq", "@duskmoon314" },
|
||||||
|
experimental = true,
|
||||||
|
}
|
||||||
|
|
||||||
list.tiger = {
|
list.tiger = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/ambroisie/tree-sitter-tiger",
|
url = "https://github.com/ambroisie/tree-sitter-tiger",
|
||||||
|
|
|
||||||
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