From 40467c5bbadac50a269e82174127549209dbc8e6 Mon Sep 17 00:00:00 2001 From: chengqinglin Date: Fri, 17 Feb 2023 15:21:22 +0800 Subject: [PATCH] remove unused files Signed-off-by: chengqinglin --- difftastic-lib/vendor/highlights/bash.scm | 1 - difftastic-lib/vendor/highlights/c-sharp.scm | 1 - difftastic-lib/vendor/highlights/c.scm | 1 - difftastic-lib/vendor/highlights/clojure.scm | 1 - difftastic-lib/vendor/highlights/cmake.scm | 128 ------ difftastic-lib/vendor/highlights/cpp.scm | 1 - difftastic-lib/vendor/highlights/css.scm | 1 - difftastic-lib/vendor/highlights/dart.scm | 1 - difftastic-lib/vendor/highlights/elisp.scm | 1 - difftastic-lib/vendor/highlights/elixir.scm | 1 - difftastic-lib/vendor/highlights/elm.scm | 1 - difftastic-lib/vendor/highlights/elvish.scm | 1 - difftastic-lib/vendor/highlights/gleam.scm | 1 - difftastic-lib/vendor/highlights/go.scm | 1 - difftastic-lib/vendor/highlights/hack.scm | 1 - difftastic-lib/vendor/highlights/haskell.scm | 1 - difftastic-lib/vendor/highlights/hcl.scm | 103 ----- difftastic-lib/vendor/highlights/html.scm | 1 - .../vendor/highlights/janet_simple.scm | 1 - difftastic-lib/vendor/highlights/java.scm | 1 - .../vendor/highlights/javascript.scm | 1 - difftastic-lib/vendor/highlights/json.scm | 1 - difftastic-lib/vendor/highlights/julia.scm | 199 --------- difftastic-lib/vendor/highlights/kotlin.scm | 391 ------------------ difftastic-lib/vendor/highlights/lua.scm | 76 ---- difftastic-lib/vendor/highlights/make.scm | 1 - difftastic-lib/vendor/highlights/nix.scm | 1 - difftastic-lib/vendor/highlights/ocaml.scm | 1 - difftastic-lib/vendor/highlights/perl.scm | 185 --------- difftastic-lib/vendor/highlights/php.scm | 1 - difftastic-lib/vendor/highlights/python.scm | 1 - difftastic-lib/vendor/highlights/qmljs.scm | 1 - difftastic-lib/vendor/highlights/ruby.scm | 1 - difftastic-lib/vendor/highlights/rust.scm | 1 - difftastic-lib/vendor/highlights/scala.scm | 1 - difftastic-lib/vendor/highlights/sql.scm | 1 - difftastic-lib/vendor/highlights/swift.scm | 1 - difftastic-lib/vendor/highlights/toml.scm | 1 - .../vendor/highlights/typescript.scm | 1 - difftastic-lib/vendor/highlights/zig.scm | 1 - 40 files changed, 1116 deletions(-) delete mode 120000 difftastic-lib/vendor/highlights/bash.scm delete mode 120000 difftastic-lib/vendor/highlights/c-sharp.scm delete mode 120000 difftastic-lib/vendor/highlights/c.scm delete mode 120000 difftastic-lib/vendor/highlights/clojure.scm delete mode 100644 difftastic-lib/vendor/highlights/cmake.scm delete mode 120000 difftastic-lib/vendor/highlights/cpp.scm delete mode 120000 difftastic-lib/vendor/highlights/css.scm delete mode 120000 difftastic-lib/vendor/highlights/dart.scm delete mode 120000 difftastic-lib/vendor/highlights/elisp.scm delete mode 120000 difftastic-lib/vendor/highlights/elixir.scm delete mode 120000 difftastic-lib/vendor/highlights/elm.scm delete mode 120000 difftastic-lib/vendor/highlights/elvish.scm delete mode 120000 difftastic-lib/vendor/highlights/gleam.scm delete mode 120000 difftastic-lib/vendor/highlights/go.scm delete mode 120000 difftastic-lib/vendor/highlights/hack.scm delete mode 120000 difftastic-lib/vendor/highlights/haskell.scm delete mode 100644 difftastic-lib/vendor/highlights/hcl.scm delete mode 120000 difftastic-lib/vendor/highlights/html.scm delete mode 120000 difftastic-lib/vendor/highlights/janet_simple.scm delete mode 120000 difftastic-lib/vendor/highlights/java.scm delete mode 120000 difftastic-lib/vendor/highlights/javascript.scm delete mode 120000 difftastic-lib/vendor/highlights/json.scm delete mode 100644 difftastic-lib/vendor/highlights/julia.scm delete mode 100644 difftastic-lib/vendor/highlights/kotlin.scm delete mode 100644 difftastic-lib/vendor/highlights/lua.scm delete mode 120000 difftastic-lib/vendor/highlights/make.scm delete mode 120000 difftastic-lib/vendor/highlights/nix.scm delete mode 120000 difftastic-lib/vendor/highlights/ocaml.scm delete mode 100644 difftastic-lib/vendor/highlights/perl.scm delete mode 120000 difftastic-lib/vendor/highlights/php.scm delete mode 120000 difftastic-lib/vendor/highlights/python.scm delete mode 120000 difftastic-lib/vendor/highlights/qmljs.scm delete mode 120000 difftastic-lib/vendor/highlights/ruby.scm delete mode 120000 difftastic-lib/vendor/highlights/rust.scm delete mode 120000 difftastic-lib/vendor/highlights/scala.scm delete mode 120000 difftastic-lib/vendor/highlights/sql.scm delete mode 120000 difftastic-lib/vendor/highlights/swift.scm delete mode 120000 difftastic-lib/vendor/highlights/toml.scm delete mode 120000 difftastic-lib/vendor/highlights/typescript.scm delete mode 120000 difftastic-lib/vendor/highlights/zig.scm diff --git a/difftastic-lib/vendor/highlights/bash.scm b/difftastic-lib/vendor/highlights/bash.scm deleted file mode 120000 index 79b326e..0000000 --- a/difftastic-lib/vendor/highlights/bash.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-bash/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/c-sharp.scm b/difftastic-lib/vendor/highlights/c-sharp.scm deleted file mode 120000 index d63ae12..0000000 --- a/difftastic-lib/vendor/highlights/c-sharp.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-c-sharp/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/c.scm b/difftastic-lib/vendor/highlights/c.scm deleted file mode 120000 index f8a71ac..0000000 --- a/difftastic-lib/vendor/highlights/c.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-c/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/clojure.scm b/difftastic-lib/vendor/highlights/clojure.scm deleted file mode 120000 index caafb2a..0000000 --- a/difftastic-lib/vendor/highlights/clojure.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-clojure/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/cmake.scm b/difftastic-lib/vendor/highlights/cmake.scm deleted file mode 100644 index d118992..0000000 --- a/difftastic-lib/vendor/highlights/cmake.scm +++ /dev/null @@ -1,128 +0,0 @@ -;; Based on the nvim-treesitter highlighting, which is under the Apache license. -;; https://github.com/nvim-treesitter/nvim-treesitter/blob/d76b0de6536c2461f97cfeca0550f8cb89793935/queries/cmake/highlights.scm - -[ - (quoted_argument) - (bracket_argument) -] @string - -(variable_ref) @none -(variable) @variable - -[ - (bracket_comment) - (line_comment) -] @comment - -(normal_command (identifier) @function) - -["ENV" "CACHE"] @symbol -["$" "{" "}" "<" ">"] @punctuation.special -["(" ")"] @punctuation.bracket - -[ - (function) - (endfunction) - (macro) - (endmacro) -] @keyword.function - -[ - (if) - (elseif) - (else) - (endif) -] @conditional - -[ - (foreach) - (endforeach) - (while) - (endwhile) -] @repeat - -(function_command - (function) - . (argument) @function - (argument)* @parameter -) - -(macro_command - (macro) - . (argument) @function.macro - (argument)* @parameter -) - -;; (normal_command -;; (identifier) @function.builtin -;; . (argument) @variable -;; (#match? @function.builtin "\\c^(set)$") -;; ) - -;; (normal_command -;; (identifier) @function.builtin -;; (#match? @function.builtin "\\c^(set)$") -;; ( -;; (argument) @constant -;; (#any-of? @constant "PARENT_SCOPE") -;; ) . -;; ) - -;; (normal_command -;; (identifier) @function.builtin -;; (#match? @function.builtin "\\c^(set)$") -;; . (argument) -;; ( -;; (argument) @_cache @constant -;; . -;; (argument) @_type @constant -;; (#any-of? @_cache "CACHE") -;; (#any-of? @_type "BOOL" "FILEPATH" "PATH" "STRING" "INTERNAL") -;; ) -;; ) -;; (normal_command -;; (identifier) @function.builtin -;; (#match? @function.builtin "\\c^(set)$") -;; . (argument) -;; (argument) @_cache -;; (#any-of? @_cache "CACHE") -;; ( -;; (argument) @_force @constant -;; (#any-of? @_force "FORCE") -;; ) . -;; ) - -;; ((argument) @boolean -;; (#match? @boolean "\\c^(1|on|yes|true|y|0|off|no|false|n|ignore|notfound|.*-notfound)$") -;; ) - -(if_command - (if) - (argument) @keyword.operator - (#any-of? @keyword.operator "NOT" "AND" "OR" - "COMMAND" "POLICY" "TARGET" "TEST" "DEFINED" "IN_LIST" - "EXISTS" "IS_NEWER_THAN" "IS_DIRECTORY" "IS_SYMLINK" "IS_ABSOLUTE" - "MATCHES" - "LESS" "GREATER" "EQUAL" "LESS_EQUAL" "GREATER_EQUAL" - "STRLESS" "STRGREATER" "STREQUAL" "STRLESS_EQUAL" "STRGREATER_EQUAL" - "VERSION_LESS" "VERSION_GREATER" "VERSION_EQUAL" "VERSION_LESS_EQUAL" "VERSION_GREATER_EQUAL" - ) -) - -;; (normal_command -;; (identifier) @function.builtin -;; . (argument) -;; (argument) @constant -;; (#any-of? @constant "ALL" "COMMAND" "DEPENDS" "BYPRODUCTS" "WORKING_DIRECTORY" "COMMENT" -;; "JOB_POOL" "VERBATIM" "USES_TERMINAL" "COMMAND_EXPAND_LISTS" "SOURCES") -;; (#match? @function.builtin "\\c^(add_custom_target)$") -;; ) - -;; (normal_command -;; (identifier) @function.builtin -;; (argument) @constant -;; (#any-of? @constant "OUTPUT" "COMMAND" "MAIN_DEPENDENCY" "DEPENDS" "BYPRODUCTS" "IMPLICIT_DEPENDS" "WORKING_DIRECTORY" -;; "COMMENT" "DEPFILE" "JOB_POOL" "VERBATIM" "APPEND" "USES_TERMINAL" "COMMAND_EXPAND_LISTS") -;; (#match? @function.builtin "\\c^(add_custom_command)$") -;; ) - diff --git a/difftastic-lib/vendor/highlights/cpp.scm b/difftastic-lib/vendor/highlights/cpp.scm deleted file mode 120000 index 09c631f..0000000 --- a/difftastic-lib/vendor/highlights/cpp.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-cpp/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/css.scm b/difftastic-lib/vendor/highlights/css.scm deleted file mode 120000 index ee54f11..0000000 --- a/difftastic-lib/vendor/highlights/css.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-css/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/dart.scm b/difftastic-lib/vendor/highlights/dart.scm deleted file mode 120000 index c6df108..0000000 --- a/difftastic-lib/vendor/highlights/dart.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-dart/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/elisp.scm b/difftastic-lib/vendor/highlights/elisp.scm deleted file mode 120000 index 5f4c088..0000000 --- a/difftastic-lib/vendor/highlights/elisp.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-elisp/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/elixir.scm b/difftastic-lib/vendor/highlights/elixir.scm deleted file mode 120000 index 2af7f32..0000000 --- a/difftastic-lib/vendor/highlights/elixir.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-elixir/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/elm.scm b/difftastic-lib/vendor/highlights/elm.scm deleted file mode 120000 index 6a19b68..0000000 --- a/difftastic-lib/vendor/highlights/elm.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-elm/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/elvish.scm b/difftastic-lib/vendor/highlights/elvish.scm deleted file mode 120000 index 268b504..0000000 --- a/difftastic-lib/vendor/highlights/elvish.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-elvish/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/gleam.scm b/difftastic-lib/vendor/highlights/gleam.scm deleted file mode 120000 index 9fbbb42..0000000 --- a/difftastic-lib/vendor/highlights/gleam.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-gleam/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/go.scm b/difftastic-lib/vendor/highlights/go.scm deleted file mode 120000 index 68cf853..0000000 --- a/difftastic-lib/vendor/highlights/go.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-go/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/hack.scm b/difftastic-lib/vendor/highlights/hack.scm deleted file mode 120000 index 1ecb108..0000000 --- a/difftastic-lib/vendor/highlights/hack.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-hack/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/haskell.scm b/difftastic-lib/vendor/highlights/haskell.scm deleted file mode 120000 index 136fb81..0000000 --- a/difftastic-lib/vendor/highlights/haskell.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-haskell/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/hcl.scm b/difftastic-lib/vendor/highlights/hcl.scm deleted file mode 100644 index 9959233..0000000 --- a/difftastic-lib/vendor/highlights/hcl.scm +++ /dev/null @@ -1,103 +0,0 @@ -;; Based on the nvim-treesitter highlighting, which is under the Apache license. -;; See https://github.com/nvim-treesitter/nvim-treesitter/blob/09ad32c91bbc6a2813c1293d2373c6604e0f6ea4/queries/hcl/highlights.scm - -[ - "!" - "\*" - "/" - "%" - "\+" - "-" - ">" - ">=" - "<" - "<=" - "==" - "!=" - "&&" - "||" -] @operator - -[ - "{" - "}" - "[" - "]" - "(" - ")" -] @punctuation.bracket - -[ - "." - ".*" - "," - "[*]" -] @punctuation.delimiter - -[ - (ellipsis) - "\?" - "=>" -] @punctuation.special - -[ - ":" - "=" -] @none - -[ - "for" - "endfor" - "in" -] @repeat - -[ - "if" - "else" - "endif" -] @conditional - -[ - (quoted_template_start) ; " - (quoted_template_end); " - (template_literal) ; non-interpolation/directive content -] @string - -[ - (heredoc_identifier) ; <" @operator) - -;; In case you want type highlighting based on Julia naming conventions (this might collide with mathematical notation) -;((identifier) @type ; exception: mark `A_foo` sort of identifiers as variables - ;(match? @type "^[A-Z][^_]")) - -;; Disabled for difftastic: predicates are currently ignored. -;; ((identifier) @constant -;; (#match? @constant "^[A-Z][A-Z_]{2}[A-Z_]*$")) - -(macro_identifier) @function.macro -(macro_identifier (identifier) @function.macro) ; for any one using the variable highlight -(macro_definition - name: (identifier) @function.macro - ["macro" "end" @keyword]) - -(field_expression - (identifier) - (identifier) @field .) - -(function_definition - name: (identifier) @function) -(call_expression - (identifier) @function) -(call_expression - (field_expression (identifier) @method .)) -(broadcast_call_expression - (identifier) @function) -(broadcast_call_expression - (field_expression (identifier) @method .)) -(parameter_list - (identifier) @parameter) -(parameter_list - (optional_parameter . - (identifier) @parameter)) -(typed_parameter - (identifier) @parameter - (identifier) @type) -(type_parameter_list - (identifier) @type) -(typed_parameter - (identifier) @parameter - (parameterized_identifier) @type) -(function_expression - . (identifier) @parameter) -(spread_parameter) @parameter -(spread_parameter - (identifier) @parameter) -(named_argument - . (identifier) @parameter) -(argument_list - (typed_expression - (identifier) @parameter - (identifier) @type)) -(argument_list - (typed_expression - (identifier) @parameter - (parameterized_identifier) @type)) - -;; Symbol expressions (:my-wanna-be-lisp-keyword) -(quote_expression - (identifier)) @symbol - -;; Parsing error! foo (::Type) gets parsed as two quote expressions -(argument_list - (quote_expression - (quote_expression - (identifier) @type))) - -(type_argument_list - (identifier) @type) -(parameterized_identifier (_)) @type -(argument_list - (typed_expression . (identifier) @parameter)) - -(typed_expression - (identifier) @type .) -(typed_expression - (parameterized_identifier) @type .) - -(abstract_definition - name: (identifier) @type) -(struct_definition - name: (identifier) @type) - -(subscript_expression - (_) - (range_expression - (identifier) @constant.builtin .) - (#eq? @constant.builtin "end")) - -"end" @keyword - -(if_statement - ["if" "end"] @conditional) -(elseif_clause - ["elseif"] @conditional) -(else_clause - ["else"] @conditional) -(ternary_expression - ["?" ":"] @conditional) - -(function_definition ["function" "end"] @keyword.function) - -[ - "abstract" - "const" - "macro" - "primitive" - "struct" - "type" -] @keyword - -"return" @keyword.return - -;; Disabled for difftastic: predicates are currently ignored. -;; ((identifier) @keyword (#any-of? @keyword "global" "local")) - -(compound_expression - ["begin" "end"] @keyword) -(try_statement - ["try" "end" ] @exception) -(finally_clause - "finally" @exception) -(catch_clause - "catch" @exception) -(quote_statement - ["quote" "end"] @keyword) -(let_statement - ["let" "end"] @keyword) -(for_statement - ["for" "end"] @repeat) -(while_statement - ["while" "end"] @repeat) -(break_statement) @repeat -(continue_statement) @repeat -(for_clause - "for" @repeat) -(do_clause - ["do" "end"] @keyword) - -"in" @keyword.operator - -(export_statement - ["export"] @include) - -(import_statement - ["import" "using"] @include) - -(module_definition - ["module" "end"] @include) - -((identifier) @include (#eq? @include "baremodule")) - - -;;; Literals - -(integer_literal) @number -(float_literal) @float - -;; Disabled for difftastic: predicates are currently ignored. -;; ((identifier) @float -;; (#any-of? @float "NaN" "NaN16" "NaN32" -;; "Inf" "Inf16" "Inf32")) - -;; ((identifier) @boolean -;; (#any-of? @boolean "true" "false")) - -;; ((identifier) @constant.builtin -;; (#any-of? @constant.builtin "nothing" "missing")) - -(character_literal) @character -(escape_sequence) @string.escape - -(string_literal) @string -(prefixed_string_literal - prefix: (identifier) @function.macro) @string - -(command_literal) @string.special -(prefixed_command_literal - prefix: (identifier) @function.macro) @string.special - -[ - (line_comment) - (block_comment) -] @comment - -;;; Punctuation - -(quote_expression ":" @symbol) -["::" "." "," "..."] @punctuation.delimiter -["[" "]" "(" ")" "{" "}"] @punctuation.bracket diff --git a/difftastic-lib/vendor/highlights/kotlin.scm b/difftastic-lib/vendor/highlights/kotlin.scm deleted file mode 100644 index a70ff37..0000000 --- a/difftastic-lib/vendor/highlights/kotlin.scm +++ /dev/null @@ -1,391 +0,0 @@ -;; Based on the nvim-treesitter highlighting, which is under the Apache license. -;; See https://github.com/nvim-treesitter/nvim-treesitter/blob/f8ab59861eed4a1c168505e3433462ed800f2bae/queries/kotlin/highlights.scm -;; -;; The only difference in this file is that queries using #lua-match? -;; have been removed. - -;;; Identifiers - -(simple_identifier) @variable - -; `it` keyword inside lambdas -; FIXME: This will highlight the keyword outside of lambdas since tree-sitter -; does not allow us to check for arbitrary nestation -((simple_identifier) @variable.builtin -(#eq? @variable.builtin "it")) - -; `field` keyword inside property getter/setter -; FIXME: This will highlight the keyword outside of getters and setters -; since tree-sitter does not allow us to check for arbitrary nestation -((simple_identifier) @variable.builtin -(#eq? @variable.builtin "field")) - -; `this` this keyword inside classes -(this_expression) @variable.builtin - -; `super` keyword inside classes -(super_expression) @variable.builtin - -(class_parameter - (simple_identifier) @property) - -(class_body - (property_declaration - (variable_declaration - (simple_identifier) @property))) - -; id_1.id_2.id_3: `id_2` and `id_3` are assumed as object properties -(_ - (navigation_suffix - (simple_identifier) @property)) - -(enum_entry - (simple_identifier) @constant) - -(type_identifier) @type - -((type_identifier) @type.builtin - (#any-of? @type.builtin - "Byte" - "Short" - "Int" - "Long" - "UByte" - "UShort" - "UInt" - "ULong" - "Float" - "Double" - "Boolean" - "Char" - "String" - "Array" - "ByteArray" - "ShortArray" - "IntArray" - "LongArray" - "UByteArray" - "UShortArray" - "UIntArray" - "ULongArray" - "FloatArray" - "DoubleArray" - "BooleanArray" - "CharArray" - "Map" - "Set" - "List" - "EmptyMap" - "EmptySet" - "EmptyList" - "MutableMap" - "MutableSet" - "MutableList" -)) - -(package_header - . (identifier)) @namespace - -(import_header - "import" @include) - - -; TODO: Seperate labeled returns/breaks/continue/super/this -; Must be implemented in the parser first -(label) @label - -;;; Function definitions - -(function_declaration - . (simple_identifier) @function) - -(getter - ("get") @function.builtin) -(setter - ("set") @function.builtin) - -(primary_constructor) @constructor -(secondary_constructor - ("constructor") @constructor) - -(constructor_invocation - (user_type - (type_identifier) @constructor)) - -(anonymous_initializer - ("init") @constructor) - -(parameter - (simple_identifier) @parameter) - -(parameter_with_optional_type - (simple_identifier) @parameter) - -; lambda parameters -(lambda_literal - (lambda_parameters - (variable_declaration - (simple_identifier) @parameter))) - -;;; Function calls - -; function() -(call_expression - . (simple_identifier) @function) - -; object.function() or object.property.function() -(call_expression - (navigation_expression - (navigation_suffix - (simple_identifier) @function) . )) - -(call_expression - . (simple_identifier) @function.builtin - (#any-of? @function.builtin - "arrayOf" - "arrayOfNulls" - "byteArrayOf" - "shortArrayOf" - "intArrayOf" - "longArrayOf" - "ubyteArrayOf" - "ushortArrayOf" - "uintArrayOf" - "ulongArrayOf" - "floatArrayOf" - "doubleArrayOf" - "booleanArrayOf" - "charArrayOf" - "emptyArray" - "mapOf" - "setOf" - "listOf" - "emptyMap" - "emptySet" - "emptyList" - "mutableMapOf" - "mutableSetOf" - "mutableListOf" - "print" - "println" - "error" - "TODO" - "run" - "runCatching" - "repeat" - "lazy" - "lazyOf" - "enumValues" - "enumValueOf" - "assert" - "check" - "checkNotNull" - "require" - "requireNotNull" - "with" - "suspend" - "synchronized" -)) - -;;; Literals - -[ - (comment) - (shebang_line) -] @comment - -(real_literal) @float -[ - (integer_literal) - (long_literal) - (hex_literal) - (bin_literal) - (unsigned_literal) -] @number - -[ - "null" ; should be highlighted the same as booleans - (boolean_literal) -] @boolean - -(character_literal) @character - -[ - (line_string_literal) - (multi_line_string_literal) -] @string - -; NOTE: Escapes not allowed in multi-line strings -(line_string_literal (character_escape_seq) @string.escape) - -; There are 3 ways to define a regex -; - "[abc]?".toRegex() -(call_expression - (navigation_expression - ([(line_string_literal) (multi_line_string_literal)] @string.regex) - (navigation_suffix - ((simple_identifier) @_function - (#eq? @_function "toRegex"))))) - -; - Regex("[abc]?") -(call_expression - ((simple_identifier) @_function - (#eq? @_function "Regex")) - (call_suffix - (value_arguments - (value_argument - [ (line_string_literal) (multi_line_string_literal) ] @string.regex)))) - -; - Regex.fromLiteral("[abc]?") -(call_expression - (navigation_expression - ((simple_identifier) @_class - (#eq? @_class "Regex")) - (navigation_suffix - ((simple_identifier) @_function - (#eq? @_function "fromLiteral")))) - (call_suffix - (value_arguments - (value_argument - [ (line_string_literal) (multi_line_string_literal) ] @string.regex)))) - -;;; Keywords - -(type_alias "typealias" @keyword) -[ - (class_modifier) - (member_modifier) - (function_modifier) - (property_modifier) - (platform_modifier) - (variance_modifier) - (parameter_modifier) - (visibility_modifier) - (reification_modifier) - (inheritance_modifier) -]@keyword - -[ - "val" - "var" - "enum" - "class" - "object" - "interface" -; "typeof" ; NOTE: It is reserved for future use -] @keyword - -("fun") @keyword.function - -(jump_expression) @keyword.return - -[ - "if" - "else" - "when" -] @conditional - -[ - "for" - "do" - "while" -] @repeat - -[ - "try" - "catch" - "throw" - "finally" -] @exception - - -(annotation - "@" @attribute (use_site_target)? @attribute) -(annotation - (user_type - (type_identifier) @attribute)) -(annotation - (constructor_invocation - (user_type - (type_identifier) @attribute))) - -(file_annotation - "@" @attribute "file" @attribute ":" @attribute) -(file_annotation - (user_type - (type_identifier) @attribute)) -(file_annotation - (constructor_invocation - (user_type - (type_identifier) @attribute))) - -;;; Operators & Punctuation - -[ - "!" - "!=" - "!==" - "=" - "==" - "===" - ">" - ">=" - "<" - "<=" - "||" - "&&" - "+" - "++" - "+=" - "-" - "--" - "-=" - "*" - "*=" - "/" - "/=" - "%" - "%=" - "?." - "?:" - "!!" - "is" - "!is" - "in" - "!in" - "as" - "as?" - ".." - "->" -] @operator - -[ - "(" ")" - "[" "]" - "{" "}" -] @punctuation.bracket - -[ - "." - "," - ";" - ":" - "::" -] @punctuation.delimiter - -; NOTE: `interpolated_identifier`s can be highlighted in any way -(line_string_literal - "$" @punctuation.special - (interpolated_identifier) @none) -(line_string_literal - "${" @punctuation.special - (interpolated_expression) @none - "}" @punctuation.special) - -(multi_line_string_literal - "$" @punctuation.special - (interpolated_identifier) @none) -(multi_line_string_literal - "${" @punctuation.special - (interpolated_expression) @none - "}" @punctuation.special) diff --git a/difftastic-lib/vendor/highlights/lua.scm b/difftastic-lib/vendor/highlights/lua.scm deleted file mode 100644 index 6c4323b..0000000 --- a/difftastic-lib/vendor/highlights/lua.scm +++ /dev/null @@ -1,76 +0,0 @@ -;; Keywords - -[ - "goto" - "in" - "local" - "return" - "and" - "not" - "or" - "function" - "if" - "elseif" - "else" - "then" - "for" - "do" - "end" - "repeat" - "until" - "while" -] @keyword - -[ - "+" - "-" - "*" - "/" - "%" - "^" - "#" - "==" - "~=" - "<=" - ">=" - "<" - ">" - "=" - "&" - "~" - "|" - "<<" - ">>" - "//" - ".." -] @operator - -;; Variables - -(identifier) @variable - -((identifier) @variable.builtin - (#match? @variable.builtin "self")) - -;; Constants - -((identifier) @constant - (#match? @constant "^[A-Z][A-Z_0-9]*$")) - -(nil) @constant.builtin - -[ - (false) - (true) -] @boolean - -;; Others - -(comment) @comment - -(number) @number - -(string) @string - -;; Error -(ERROR) @error diff --git a/difftastic-lib/vendor/highlights/make.scm b/difftastic-lib/vendor/highlights/make.scm deleted file mode 120000 index c6c9061..0000000 --- a/difftastic-lib/vendor/highlights/make.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-make/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/nix.scm b/difftastic-lib/vendor/highlights/nix.scm deleted file mode 120000 index 9e4535c..0000000 --- a/difftastic-lib/vendor/highlights/nix.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-nix/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/ocaml.scm b/difftastic-lib/vendor/highlights/ocaml.scm deleted file mode 120000 index 9738149..0000000 --- a/difftastic-lib/vendor/highlights/ocaml.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-ocaml/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/perl.scm b/difftastic-lib/vendor/highlights/perl.scm deleted file mode 100644 index 361a7f8..0000000 --- a/difftastic-lib/vendor/highlights/perl.scm +++ /dev/null @@ -1,185 +0,0 @@ -;; Copied from nvim-treesitter, under Apache License. -;; https://github.com/nvim-treesitter/nvim-treesitter/blob/909b5d26fddad5043e354046571e7c7353b53b61/queries/perl/highlights.scm - -; Misc keywords -[ - "my" "our" "local" - "next" "last" "redo" - "goto" - "package" -; "do" -; "eval" -] @keyword - -; Keywords for including -[ "use" "no" "require" ] @include - -; Keywords that mark conditional statements -[ "if" "elsif" "unless" "else" ] @conditional - -; Keywords that mark repeating loops -[ "while" "until" "for" "foreach" ] @repeat - -; Keyword for return expressions -[ "return" ] @keyword.return - -; Keywords for phaser blocks -; TODO: Ideally these would be @keyword.phaser but vim-treesitter doesn't -; have such a thing yet -[ "BEGIN" "CHECK" "UNITCHECK" "INIT" "END" ] @keyword.function - -; Keywords to define a function -[ "sub" ] @keyword.function - -; Lots of builtin functions, except tree-sitter-perl doesn't emit most of -; these yet -;[ -; "print" "printf" "sprintf" "say" -; "push" "pop" "shift" "unshift" "splice" -; "exists" "delete" "keys" "values" -; "each" -;] @function.builtin - -; Keywords that are regular infix operators -[ - "and" "or" "not" "xor" - "eq" "ne" "lt" "le" "ge" "gt" "cmp" -] @keyword.operator - -; Variables -[ - (scalar_variable) - (array_variable) - (hash_variable) -] @variable - -; Special builtin variables -[ - (special_scalar_variable) - (special_array_variable) - (special_hash_variable) - (special_literal) - (super) -] @variable.builtin - -; Integer numbers -[ - (integer) - (hexadecimal) -] @number - -; Float numbers -[ - (floating_point) - (scientific_notation) -] @float - -; version sortof counts as a kind of multipart integer -(version) @constant - -; Package names are types -(package_name) @type - -; The special SUPER:: could be called a namespace. It isn't really but it -; should highlight differently and we might as well do it this way -(super) @namespace - -; Comments are comments -(comments) @comment - -; POD should be handled specially with its own embedded subtype but for now -; we'll just have to do this. -(pod_statement) @text - -(method_invocation - function_name: (identifier) @method) -(call_expression - function_name: (identifier) @function) - -;; ---------- - -(use_constant_statement - constant: (identifier) @constant) - -(named_block_statement - function_name: (identifier) @function) - -(function_definition - name: (identifier) @function) - -[ -(function) -(map) -(grep) -(bless) -] @function - -[ -"(" -")" -"[" -"]" -"{" -"}" -] @punctuation.bracket -(standard_input_to_variable) @punctuation.bracket - -[ -"=~" -"!~" -"=" -"==" -"+" -"-" -"." -"//" -"||" -(arrow_operator) -(hash_arrow_operator) -(array_dereference) -(hash_dereference) -(to_reference) -(type_glob) -(hash_access_variable) -(ternary_expression) -(ternary_expression_in_hash) -] @operator - -[ -(regex_option) -(regex_option_for_substitution) -(regex_option_for_transliteration) -] @parameter - -(type_glob - (identifier) @variable) - -[ -(word_list_qw) -(command_qx_quoted) -(string_single_quoted) -(string_double_quoted) -(string_qq_quoted) -(bareword) -(transliteration_tr_or_y) -] @string - -[ -(regex_pattern_qr) -(patter_matcher_m) -(substitution_pattern_s) -] @string.regex - -(escape_sequence) @string.escape - -[ -"," -(semi_colon) -(start_delimiter) -(end_delimiter) -(ellipsis_statement) -] @punctuation.delimiter - -(function_attribute) @field - -(function_signature) @type diff --git a/difftastic-lib/vendor/highlights/php.scm b/difftastic-lib/vendor/highlights/php.scm deleted file mode 120000 index 5989ef0..0000000 --- a/difftastic-lib/vendor/highlights/php.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-php/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/python.scm b/difftastic-lib/vendor/highlights/python.scm deleted file mode 120000 index 0c30cc5..0000000 --- a/difftastic-lib/vendor/highlights/python.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-python/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/qmljs.scm b/difftastic-lib/vendor/highlights/qmljs.scm deleted file mode 120000 index 6ba8919..0000000 --- a/difftastic-lib/vendor/highlights/qmljs.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-qmljs/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/ruby.scm b/difftastic-lib/vendor/highlights/ruby.scm deleted file mode 120000 index 8c9f441..0000000 --- a/difftastic-lib/vendor/highlights/ruby.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-ruby/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/rust.scm b/difftastic-lib/vendor/highlights/rust.scm deleted file mode 120000 index 6ef0990..0000000 --- a/difftastic-lib/vendor/highlights/rust.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-rust/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/scala.scm b/difftastic-lib/vendor/highlights/scala.scm deleted file mode 120000 index 6fa173e..0000000 --- a/difftastic-lib/vendor/highlights/scala.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-scala/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/sql.scm b/difftastic-lib/vendor/highlights/sql.scm deleted file mode 120000 index 79954e4..0000000 --- a/difftastic-lib/vendor/highlights/sql.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-sql/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/swift.scm b/difftastic-lib/vendor/highlights/swift.scm deleted file mode 120000 index 1a0f631..0000000 --- a/difftastic-lib/vendor/highlights/swift.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-swift/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/toml.scm b/difftastic-lib/vendor/highlights/toml.scm deleted file mode 120000 index 95af975..0000000 --- a/difftastic-lib/vendor/highlights/toml.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-toml/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/typescript.scm b/difftastic-lib/vendor/highlights/typescript.scm deleted file mode 120000 index 41e5cf5..0000000 --- a/difftastic-lib/vendor/highlights/typescript.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-typescript/queries/highlights.scm \ No newline at end of file diff --git a/difftastic-lib/vendor/highlights/zig.scm b/difftastic-lib/vendor/highlights/zig.scm deleted file mode 120000 index 8d63196..0000000 --- a/difftastic-lib/vendor/highlights/zig.scm +++ /dev/null @@ -1 +0,0 @@ -../tree-sitter-zig/queries/highlights.scm \ No newline at end of file