aboutsummaryrefslogtreecommitdiffstats
path: root/queries/thrift
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-06-12 09:54:30 -0600
committerChristian Clason <c.clason@uni-graz.at>2025-05-12 18:43:40 +0200
commit692b051b09935653befdb8f7ba8afdb640adf17b (patch)
tree167162b6b129ae04f68c5735078521a72917c742 /queries/thrift
parentfeat(c-family): inherit injections (diff)
downloadnvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.gz
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.bz2
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.lz
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.xz
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.zst
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.zip
feat!: drop modules, general refactor and cleanup
Diffstat (limited to 'queries/thrift')
-rw-r--r--queries/thrift/folds.scm12
-rw-r--r--queries/thrift/highlights.scm237
-rw-r--r--queries/thrift/indents.scm23
-rw-r--r--queries/thrift/injections.scm2
-rw-r--r--queries/thrift/locals.scm70
5 files changed, 0 insertions, 344 deletions
diff --git a/queries/thrift/folds.scm b/queries/thrift/folds.scm
deleted file mode 100644
index 62880f98c..000000000
--- a/queries/thrift/folds.scm
+++ /dev/null
@@ -1,12 +0,0 @@
-[
- (annotation_definition)
- (enum_definition)
- (exception_definition)
- (function_definition)
- (senum_definition)
- (service_definition)
- (struct_definition)
- (union_definition)
- (comment)
- (include_statement)+
-] @fold
diff --git a/queries/thrift/highlights.scm b/queries/thrift/highlights.scm
deleted file mode 100644
index 96136d7b5..000000000
--- a/queries/thrift/highlights.scm
+++ /dev/null
@@ -1,237 +0,0 @@
-; Variables
-((identifier) @variable
- (#set! priority 95))
-
-; Includes
-[
- "include"
- "cpp_include"
-] @keyword.import
-
-; Function
-(function_definition
- (identifier) @function)
-
-; Fields
-(field
- (identifier) @property)
-
-; Parameters
-(function_definition
- (parameters
- (parameter
- (identifier) @variable.parameter)))
-
-(throws
- (parameters
- (parameter
- (identifier) @variable.parameter)))
-
-; Types
-(typedef_identifier) @type
-
-(struct_definition
- "struct"
- (identifier) @type)
-
-(union_definition
- "union"
- (identifier) @type)
-
-(exception_definition
- "exception"
- (identifier) @type)
-
-(service_definition
- "service"
- (identifier) @type)
-
-(interaction_definition
- "interaction"
- (identifier) @type)
-
-(type
- type: (identifier) @type)
-
-(definition_type
- type: (identifier) @type)
-
-((identifier) @type
- (#lua-match? @type "^[_]*[A-Z]"))
-
-; Constants
-(const_definition
- (identifier) @constant)
-
-((identifier) @constant
- (#lua-match? @constant "^[_A-Z][A-Z0-9_]*$"))
-
-(enum_definition
- type: (identifier) @type)
-
-(enum_definition
- "{"
- (identifier) @constant)
-
-; Builtin Types
-[
- (primitive)
- "list"
- "map"
- "set"
- "sink"
- "stream"
- "void"
-] @type.builtin
-
-; Namespace
-(namespace_declaration
- (namespace_scope) @string.special)
-
-(namespace_declaration
- (namespace_scope)
- [
- type: (namespace) @module
- (_
- (identifier) @module)
- ])
-
-; Attributes
-(annotation_definition
- (annotation_identifier
- (identifier) @attribute))
-
-(fb_annotation_definition
- "@" @attribute
- (annotation_identifier
- (identifier) @attribute)
- (identifier)? @attribute)
-
-(namespace_uri
- (string) @attribute)
-
-; Operators
-[
- "="
- "&"
-] @operator
-
-; Exceptions
-"throws" @keyword.exception
-
-; Keywords
-[
- "exception"
- "extends"
- "typedef"
- "uri"
-] @keyword
-
-[
- "enum"
- "struct"
- "union"
- "senum"
- "interaction"
- "namespace"
- "service"
-] @keyword.type
-
-; Deprecated Keywords
-[
- "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
-
-; Extended Keywords
-[
- "package"
- "performs"
-] @keyword
-
-[
- "async"
- "oneway"
-] @keyword.coroutine
-
-; Qualifiers
-[
- "client"
- "const"
- "idempotent"
- "optional"
- "permanent"
- "readonly"
- "required"
- "safe"
- "server"
- "stateful"
- "transient"
-] @keyword.modifier
-
-; Literals
-(string) @string
-
-(escape_sequence) @string.escape
-
-(namespace_uri
- (string) @string.special.url)
-
-(number) @number
-
-(double) @number.float
-
-(boolean) @boolean
-
-; Typedefs
-(typedef_identifier) @type.definition
-
-; Punctuation
-"*" @punctuation.special
-
-[
- "{"
- "}"
- "("
- ")"
- "["
- "]"
- "<"
- ">"
-] @punctuation.bracket
-
-[
- "."
- ","
- ";"
- ":"
-] @punctuation.delimiter
-
-; Comments
-(comment) @comment @spell
-
-((comment) @comment.documentation
- (#lua-match? @comment.documentation "^/[*][*][^*].*[*]/$"))
-
-((comment) @comment.documentation
- (#lua-match? @comment.documentation "^///[^/]"))
-
-((comment) @comment.documentation
- (#lua-match? @comment.documentation "^///$"))
-
-((comment) @keyword.directive @nospell
- (#lua-match? @keyword.directive "#!.*"))
diff --git a/queries/thrift/indents.scm b/queries/thrift/indents.scm
deleted file mode 100644
index db49c0712..000000000
--- a/queries/thrift/indents.scm
+++ /dev/null
@@ -1,23 +0,0 @@
-(definition) @indent.begin
-
-((parameters
- (parameter)) @indent.align
- (#set! indent.open_delimiter "(")
- (#set! indent.close_delimiter ")"))
-
-"}" @indent.end
-
-[
- "{"
- "}"
-] @indent.branch
-
-[
- "("
- ")"
-] @indent.branch
-
-[
- (ERROR)
- (comment)
-] @indent.auto
diff --git a/queries/thrift/injections.scm b/queries/thrift/injections.scm
deleted file mode 100644
index 2f0e58eb6..000000000
--- a/queries/thrift/injections.scm
+++ /dev/null
@@ -1,2 +0,0 @@
-((comment) @injection.content
- (#set! injection.language "comment"))
diff --git a/queries/thrift/locals.scm b/queries/thrift/locals.scm
deleted file mode 100644
index 49f25bdde..000000000
--- a/queries/thrift/locals.scm
+++ /dev/null
@@ -1,70 +0,0 @@
-; Scopes
-[
- (document)
- (definition)
-] @local.scope
-
-; References
-(identifier) @local.reference
-
-; Definitions
-(annotation_identifier) @local.definition
-
-(const_definition
- (identifier) @local.definition.constant)
-
-(enum_definition
- "enum"
- .
- (identifier) @local.definition.enum
- "{"
- (identifier) @local.definition.constant
- "}")
-
-(senum_definition
- "senum"
- .
- (identifier) @local.definition.enum)
-
-(field
- (identifier) @local.definition.field)
-
-(function_definition
- (identifier) @local.definition.function)
-
-(namespace_declaration
- "namespace"
- (namespace_scope)
- .
- (_) @local.definition.namespace
- (namespace_uri)?)
-
-(parameter
- (identifier) @local.definition.parameter)
-
-(struct_definition
- "struct"
- .
- (identifier) @local.definition.type)
-
-(union_definition
- "union"
- .
- (identifier) @local.definition.type)
-
-(exception_definition
- "exception"
- .
- (identifier) @local.definition.type)
-
-(service_definition
- "service"
- .
- (identifier) @local.definition.type)
-
-(interaction_definition
- "interaction"
- .
- (identifier) @local.definition.type)
-
-(typedef_identifier) @local.definition.type