aboutsummaryrefslogtreecommitdiffstats
path: root/queries/matlab
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/matlab
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/matlab')
-rw-r--r--queries/matlab/folds.scm13
-rw-r--r--queries/matlab/highlights.scm216
-rw-r--r--queries/matlab/indents.scm40
-rw-r--r--queries/matlab/injections.scm2
-rw-r--r--queries/matlab/locals.scm33
5 files changed, 0 insertions, 304 deletions
diff --git a/queries/matlab/folds.scm b/queries/matlab/folds.scm
deleted file mode 100644
index 83008b3d7..000000000
--- a/queries/matlab/folds.scm
+++ /dev/null
@@ -1,13 +0,0 @@
-[
- (if_statement)
- (for_statement)
- (while_statement)
- (switch_statement)
- (try_statement)
- (function_definition)
- (class_definition)
- (enumeration)
- (events)
- (methods)
- (properties)
-] @fold
diff --git a/queries/matlab/highlights.scm b/queries/matlab/highlights.scm
deleted file mode 100644
index d2ab6053e..000000000
--- a/queries/matlab/highlights.scm
+++ /dev/null
@@ -1,216 +0,0 @@
-; Includes
-((command_name) @keyword.import
- (#eq? @keyword.import "import"))
-
-; Keywords
-[
- "arguments"
- "end"
- "events"
- "global"
- "methods"
- "persistent"
- "properties"
-] @keyword
-
-"enumeration" @keyword.type
-
-(class_definition
- [
- "classdef"
- "end"
- ] @keyword.type)
-
-; Conditionals
-(if_statement
- [
- "if"
- "end"
- ] @keyword.conditional)
-
-(elseif_clause
- "elseif" @keyword.conditional)
-
-(else_clause
- "else" @keyword.conditional)
-
-(switch_statement
- [
- "switch"
- "end"
- ] @keyword.conditional)
-
-(case_clause
- "case" @keyword.conditional)
-
-(otherwise_clause
- "otherwise" @keyword.conditional)
-
-(break_statement) @keyword.conditional
-
-; Repeats
-(for_statement
- [
- "for"
- "parfor"
- "end"
- ] @keyword.repeat)
-
-(while_statement
- [
- "while"
- "end"
- ] @keyword.repeat)
-
-(continue_statement) @keyword.repeat
-
-; Exceptions
-(try_statement
- [
- "try"
- "end"
- ] @keyword.exception)
-
-(catch_clause
- "catch" @keyword.exception)
-
-; Variables
-(identifier) @variable
-
-; Constants
-(events
- (identifier) @constant)
-
-(attribute
- (identifier) @constant)
-
-"~" @constant.builtin
-
-; Fields/Properties
-(field_expression
- field: (identifier) @variable.member)
-
-(superclass
- "."
- (identifier) @variable.member)
-
-(property_name
- "."
- (identifier) @variable.member)
-
-(property
- name: (identifier) @variable.member)
-
-; Types
-(class_definition
- name: (identifier) @type)
-
-(attributes
- (identifier) @constant)
-
-(enum
- .
- (identifier) @type)
-
-((identifier) @type
- (#lua-match? @type "^_*[A-Z][a-zA-Z0-9_]+$"))
-
-; Functions
-(function_definition
- "function" @keyword.function
- name: (identifier) @function
- [
- "end"
- "endfunction"
- ]? @keyword.function)
-
-(function_signature
- name: (identifier) @function)
-
-(function_call
- name: (identifier) @function.call)
-
-(handle_operator
- (identifier) @function)
-
-(validation_functions
- (identifier) @function)
-
-(command
- (command_name) @function.call)
-
-(command_argument) @variable.parameter
-
-(return_statement) @keyword.return
-
-; Parameters
-(function_arguments
- (identifier) @variable.parameter)
-
-; Punctuation
-[
- ";"
- ","
- "."
-] @punctuation.delimiter
-
-[
- "("
- ")"
- "["
- "]"
- "{"
- "}"
-] @punctuation.bracket
-
-; Operators
-[
- "+"
- ".+"
- "-"
- ".*"
- "*"
- ".*"
- "/"
- "./"
- "\\"
- ".\\"
- "^"
- ".^"
- "'"
- ".'"
- "|"
- "&"
- "?"
- "@"
- "<"
- "<="
- ">"
- ">="
- "=="
- "~="
- "="
- "&&"
- "||"
- ":"
-] @operator
-
-; Literals
-(string) @string
-
-(escape_sequence) @string.escape
-
-(formatting_sequence) @string.special
-
-(number) @number
-
-(boolean) @boolean
-
-; Comments
-[
- (comment)
- (line_continuation)
-] @comment @spell
-
-((comment) @keyword.directive
- (#lua-match? @keyword.directive "^%%%% "))
diff --git a/queries/matlab/indents.scm b/queries/matlab/indents.scm
deleted file mode 100644
index d446f45df..000000000
--- a/queries/matlab/indents.scm
+++ /dev/null
@@ -1,40 +0,0 @@
-"end" @indent.end @indent.branch
-
-[
- (arguments_statement)
- (if_statement)
- (for_statement)
- (while_statement)
- (switch_statement)
- (try_statement)
- (function_definition)
- (class_definition)
- (enumeration)
- (events)
- (methods)
- (properties)
-] @indent.begin
-
-[
- "elseif"
- "else"
- "case"
- "otherwise"
- "catch"
-] @indent.branch
-
-((matrix
- (row) @indent.align)
- (#set! indent.open_delimiter "[")
- (#set! indent.close_delimiter "]"))
-
-((cell
- (row) @indent.align)
- (#set! indent.open_delimiter "{")
- (#set! indent.close_delimiter "}"))
-
-((parenthesis) @indent.align
- (#set! indent.open_delimiter "(")
- (#set! indent.close_delimiter ")"))
-
-(comment) @indent.auto
diff --git a/queries/matlab/injections.scm b/queries/matlab/injections.scm
deleted file mode 100644
index 2f0e58eb6..000000000
--- a/queries/matlab/injections.scm
+++ /dev/null
@@ -1,2 +0,0 @@
-((comment) @injection.content
- (#set! injection.language "comment"))
diff --git a/queries/matlab/locals.scm b/queries/matlab/locals.scm
deleted file mode 100644
index 366c82027..000000000
--- a/queries/matlab/locals.scm
+++ /dev/null
@@ -1,33 +0,0 @@
-; References
-(identifier) @local.reference
-
-; Definitions
-(function_definition
- name: (identifier) @local.definition.function
- (function_arguments
- (identifier)* @local.definition.parameter
- (","
- (identifier) @local.definition.parameter)*)?) @local.scope
-
-(assignment
- left: (identifier) @local.definition.var)
-
-(multioutput_variable
- (identifier) @local.definition.var)
-
-(iterator
- .
- (identifier) @local.definition.var)
-
-(lambda
- (arguments
- (identifier) @local.definition.parameter))
-
-(global_operator
- (identifier) @local.definition.var)
-
-(persistent_operator
- (identifier) @local.definition.var)
-
-(catch_clause
- (identifier) @local.definition)