From 14e1f025038fd15abdd76a10f69bf0ef94776647 Mon Sep 17 00:00:00 2001 From: Matt Ricketson Date: Wed, 18 Feb 2026 13:59:39 -0800 Subject: [PATCH] Strip unused grammars to reduce binary size (#1) * Strip unused tree-sitter grammars to reduce binary size Remove 22 languages that are not needed, keeping only: Swift, C, Obj-C, JSON, Markdown, Bash, Ruby, Go, Rust, YAML, TOML, SQL, and Regex. The CodeLanguagesContainer.xcframework still contains all grammar object files, but since the Swift source no longer references the removed languages' tree_sitter_*() symbols, the linker won't pull them into the binary. This should reduce the app binary by ~150-160MB. Changes: - TreeSitterLanguage enum: removed 22 unused cases - CodeLanguage.swift: removed unused tsLanguage switch cases - CodeLanguage+Definitions.swift: removed unused language definitions - TreeSitterModel.swift: removed unused query properties - CodeLanguages_Container.h: removed unused extern declarations - Resources/: removed unused query .scm files - Tests/: removed (reference removed languages) Co-Authored-By: Claude Opus 4.6 * Also remove Ruby, Go, Rust, YAML, TOML, SQL, and Regex grammars Only Swift, C, Obj-C, JSON, Markdown, and Bash remain. Co-Authored-By: Claude Opus 4.6 --------- Co-authored-by: Claude Opus 4.6 --- .../CodeLanguages_Container.h | 34 - Package.swift | 5 - .../CodeLanguage+Definitions.swift | 399 +-------- Sources/CodeEditLanguages/CodeLanguage.swift | 68 -- .../Resources/tree-sitter-agda/folds.scm | 19 - .../Resources/tree-sitter-agda/highlights.scm | 81 -- .../Resources/tree-sitter-agda/injections.scm | 17 - .../Resources/tree-sitter-c-sharp/folds.scm | 32 - .../tree-sitter-c-sharp/highlights.scm | 254 ------ .../tree-sitter-c-sharp/injections.scm | 17 - .../Resources/tree-sitter-c-sharp/locals.scm | 57 -- .../Resources/tree-sitter-c-sharp/tags.scm | 23 - .../Resources/tree-sitter-cpp/folds.scm | 29 - .../Resources/tree-sitter-cpp/highlights.scm | 74 -- .../Resources/tree-sitter-cpp/indents.scm | 23 - .../Resources/tree-sitter-cpp/injections.scm | 3 - .../Resources/tree-sitter-cpp/locals.scm | 93 -- .../Resources/tree-sitter-cpp/tags.scm | 15 - .../Resources/tree-sitter-css/folds.scm | 25 - .../Resources/tree-sitter-css/highlights.scm | 64 -- .../Resources/tree-sitter-css/indents.scm | 26 - .../Resources/tree-sitter-css/injections.scm | 17 - .../Resources/tree-sitter-dart/folds.scm | 28 - .../Resources/tree-sitter-dart/highlights.scm | 246 ----- .../Resources/tree-sitter-dart/indents.scm | 64 -- .../Resources/tree-sitter-dart/injections.scm | 17 - .../Resources/tree-sitter-dart/locals.scm | 47 - .../Resources/tree-sitter-dart/tags.scm | 92 -- .../Resources/tree-sitter-dart/test.scm | 1 - .../tree-sitter-dockerfile/highlights.scm | 55 -- .../tree-sitter-dockerfile/injections.scm | 27 - .../Resources/tree-sitter-elixir/folds.scm | 25 - .../tree-sitter-elixir/highlights.scm | 199 ---- .../Resources/tree-sitter-elixir/indents.scm | 40 - .../tree-sitter-elixir/injections.scm | 7 - .../Resources/tree-sitter-elixir/locals.scm | 215 ----- .../Resources/tree-sitter-elixir/tags.scm | 54 -- .../tree-sitter-go-mod/highlights.scm | 18 - .../tree-sitter-go-mod/structure.scm | 29 - .../Resources/tree-sitter-go/folds.scm | 34 - .../Resources/tree-sitter-go/highlights.scm | 123 --- .../Resources/tree-sitter-go/indents.scm | 63 -- .../Resources/tree-sitter-go/injections.scm | 57 -- .../Resources/tree-sitter-go/locals.scm | 103 --- .../Resources/tree-sitter-go/structure.scm | 175 ---- .../Resources/tree-sitter-go/tags.scm | 30 - .../Resources/tree-sitter-haskell/folds.scm | 21 - .../tree-sitter-haskell/highlights.scm | 156 ---- .../tree-sitter-haskell/injections.scm | 99 -- .../Resources/tree-sitter-haskell/locals.scm | 4 - .../Resources/tree-sitter-html/folds.scm | 20 - .../Resources/tree-sitter-html/highlights.scm | 13 - .../Resources/tree-sitter-html/indents.scm | 16 - .../Resources/tree-sitter-html/injections.scm | 7 - .../Resources/tree-sitter-html/locals.scm | 16 - .../Resources/tree-sitter-java/folds.scm | 23 - .../Resources/tree-sitter-java/highlights.scm | 142 --- .../Resources/tree-sitter-java/indents.scm | 55 -- .../Resources/tree-sitter-java/injections.scm | 46 - .../Resources/tree-sitter-java/locals.scm | 115 --- .../Resources/tree-sitter-java/tags.scm | 20 - .../tree-sitter-javascript/folds.scm | 16 - .../tree-sitter-javascript/highlights-jsx.scm | 8 - .../highlights-params.scm | 12 - .../tree-sitter-javascript/highlights.scm | 205 ----- .../tree-sitter-javascript/indents.scm | 16 - .../tree-sitter-javascript/injections.scm | 32 - .../tree-sitter-javascript/locals.scm | 23 - .../Resources/tree-sitter-javascript/tags.scm | 99 -- .../tree-sitter-jsdoc/highlights.scm | 2 - .../Resources/tree-sitter-julia/folds.scm | 29 - .../tree-sitter-julia/highlights.scm | 387 -------- .../Resources/tree-sitter-julia/indents.scm | 67 -- .../tree-sitter-julia/injections.scm | 57 -- .../Resources/tree-sitter-julia/locals.scm | 90 -- .../Resources/tree-sitter-kotlin/folds.scm | 28 - .../tree-sitter-kotlin/highlights.scm | 380 -------- .../tree-sitter-kotlin/injections.scm | 63 -- .../Resources/tree-sitter-kotlin/locals.scm | 93 -- .../Resources/tree-sitter-lua/folds.scm | 27 - .../Resources/tree-sitter-lua/highlights.scm | 224 ----- .../Resources/tree-sitter-lua/indents.scm | 62 -- .../Resources/tree-sitter-lua/injections.scm | 8 - .../Resources/tree-sitter-lua/locals.scm | 36 - .../Resources/tree-sitter-lua/tags.scm | 34 - .../Resources/tree-sitter-ocaml/folds.scm | 45 - .../tree-sitter-ocaml/highlights.scm | 151 ---- .../Resources/tree-sitter-ocaml/indents.scm | 92 -- .../tree-sitter-ocaml/injections.scm | 17 - .../Resources/tree-sitter-ocaml/locals.scm | 24 - .../Resources/tree-sitter-ocaml/tags.scm | 115 --- .../Resources/tree-sitter-perl/folds.scm | 51 -- .../Resources/tree-sitter-perl/highlights.scm | 339 ------- .../Resources/tree-sitter-perl/injections.scm | 30 - .../Resources/tree-sitter-php/folds.scm | 16 - .../Resources/tree-sitter-php/highlights.scm | 123 --- .../Resources/tree-sitter-php/indents.scm | 16 - .../Resources/tree-sitter-php/injections.scm | 14 - .../Resources/tree-sitter-php/locals.scm | 16 - .../Resources/tree-sitter-php/tags.scm | 40 - .../Resources/tree-sitter-python/folds.scm | 43 - .../tree-sitter-python/highlights.scm | 132 --- .../Resources/tree-sitter-python/indents.scm | 228 ----- .../tree-sitter-python/injections.scm | 33 - .../Resources/tree-sitter-python/locals.scm | 139 --- .../Resources/tree-sitter-python/tags.scm | 14 - .../tree-sitter-regex/highlights.scm | 63 -- .../Resources/tree-sitter-ruby/folds.scm | 27 - .../Resources/tree-sitter-ruby/highlights.scm | 154 ---- .../Resources/tree-sitter-ruby/indents.scm | 58 -- .../Resources/tree-sitter-ruby/injections.scm | 38 - .../Resources/tree-sitter-ruby/locals.scm | 27 - .../Resources/tree-sitter-ruby/tags.scm | 64 -- .../Resources/tree-sitter-rust/folds.scm | 40 - .../Resources/tree-sitter-rust/highlights.scm | 155 ---- .../Resources/tree-sitter-rust/indents.scm | 132 --- .../Resources/tree-sitter-rust/injections.scm | 9 - .../Resources/tree-sitter-rust/locals.scm | 113 --- .../Resources/tree-sitter-rust/tags.scm | 60 -- .../Resources/tree-sitter-scala/folds.scm | 31 - .../tree-sitter-scala/highlights.scm | 261 ------ .../tree-sitter-scala/injections.scm | 20 - .../Resources/tree-sitter-scala/locals.scm | 30 - .../Resources/tree-sitter-sql/folds.scm | 16 - .../Resources/tree-sitter-sql/highlights.scm | 429 --------- .../Resources/tree-sitter-sql/indents.scm | 27 - .../Resources/tree-sitter-sql/injections.scm | 20 - .../Resources/tree-sitter-toml/folds.scm | 20 - .../Resources/tree-sitter-toml/highlights.scm | 33 - .../Resources/tree-sitter-toml/indents.scm | 26 - .../Resources/tree-sitter-toml/injections.scm | 17 - .../Resources/tree-sitter-toml/locals.scm | 19 - .../tree-sitter-typescript/folds.scm | 23 - .../tree-sitter-typescript/highlights.scm | 35 - .../tree-sitter-typescript/indents.scm | 22 - .../tree-sitter-typescript/injections.scm | 16 - .../tree-sitter-typescript/locals.scm | 2 - .../Resources/tree-sitter-typescript/tags.scm | 23 - .../Resources/tree-sitter-verilog/folds.scm | 38 - .../tree-sitter-verilog/highlights.scm | 620 ------------- .../tree-sitter-verilog/injections.scm | 20 - .../Resources/tree-sitter-yaml/folds.scm | 19 - .../Resources/tree-sitter-yaml/highlights.scm | 79 -- .../Resources/tree-sitter-yaml/indents.scm | 22 - .../Resources/tree-sitter-yaml/injections.scm | 96 -- .../Resources/tree-sitter-yaml/locals.scm | 24 - .../Resources/tree-sitter-zig/folds.scm | 23 - .../Resources/tree-sitter-zig/highlights.scm | 291 ------ .../Resources/tree-sitter-zig/indents.scm | 22 - .../Resources/tree-sitter-zig/injections.scm | 10 - .../Resources/tree-sitter-zig/locals.scm | 111 --- .../TreeSitterLanguage.swift | 36 +- .../CodeEditLanguages/TreeSitterModel.swift | 219 ----- .../CodeEditLanguagesTests.swift | 846 ------------------ .../LanguageDetectionTests.swift | 125 --- .../LanguageResourcesTests.swift | 48 - 156 files changed, 4 insertions(+), 12208 deletions(-) delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-agda/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-agda/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-agda/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/tags.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-cpp/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-cpp/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-cpp/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-cpp/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-cpp/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-cpp/tags.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-css/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-css/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-css/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-css/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-dart/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-dart/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-dart/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-dart/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-dart/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-dart/tags.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-dart/test.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-dockerfile/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-dockerfile/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-elixir/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-elixir/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-elixir/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-elixir/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-elixir/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-elixir/tags.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-go-mod/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-go-mod/structure.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-go/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-go/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-go/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-go/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-go/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-go/structure.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-go/tags.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-haskell/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-haskell/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-haskell/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-haskell/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-html/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-html/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-html/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-html/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-html/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-java/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-java/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-java/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-java/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-java/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-java/tags.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-javascript/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-javascript/highlights-jsx.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-javascript/highlights-params.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-javascript/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-javascript/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-javascript/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-javascript/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-javascript/tags.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-jsdoc/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-julia/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-julia/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-julia/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-julia/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-julia/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-kotlin/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-kotlin/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-kotlin/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-kotlin/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-lua/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-lua/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-lua/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-lua/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-lua/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-lua/tags.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-ocaml/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-ocaml/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-ocaml/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-ocaml/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-ocaml/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-ocaml/tags.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-perl/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-perl/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-perl/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-php/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-php/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-php/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-php/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-php/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-php/tags.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-python/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-python/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-python/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-python/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-python/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-python/tags.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-regex/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-ruby/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-ruby/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-ruby/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-ruby/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-ruby/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-ruby/tags.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-rust/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-rust/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-rust/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-rust/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-rust/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-rust/tags.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-scala/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-scala/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-scala/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-scala/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-sql/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-sql/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-sql/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-sql/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-toml/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-toml/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-toml/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-toml/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-toml/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-typescript/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-typescript/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-typescript/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-typescript/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-typescript/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-typescript/tags.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-verilog/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-verilog/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-verilog/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-yaml/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-yaml/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-yaml/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-yaml/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-yaml/locals.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-zig/folds.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-zig/highlights.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-zig/indents.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-zig/injections.scm delete mode 100644 Sources/CodeEditLanguages/Resources/tree-sitter-zig/locals.scm delete mode 100644 Tests/CodeEditLanguagesTests/CodeEditLanguagesTests.swift delete mode 100644 Tests/CodeEditLanguagesTests/LanguageDetectionTests.swift delete mode 100644 Tests/CodeEditLanguagesTests/LanguageResourcesTests.swift diff --git a/CodeLanguages-Container/CodeLanguages-Container/CodeLanguages_Container.h b/CodeLanguages-Container/CodeLanguages-Container/CodeLanguages_Container.h index b27c35d..ed0c568 100644 --- a/CodeLanguages-Container/CodeLanguages-Container/CodeLanguages_Container.h +++ b/CodeLanguages-Container/CodeLanguages-Container/CodeLanguages_Container.h @@ -20,48 +20,14 @@ extern "C" { #endif // A collection of pointers to supported tree-sitter languages -// Add new ones below (please keep an alphabetical order) -extern TSLanguage *tree_sitter_agda(); extern TSLanguage *tree_sitter_bash(); extern TSLanguage *tree_sitter_c(); -extern TSLanguage *tree_sitter_cpp(); -extern TSLanguage *tree_sitter_c_sharp(); -extern TSLanguage *tree_sitter_css(); -extern TSLanguage *tree_sitter_dart(); -extern TSLanguage *tree_sitter_dockerfile(); -extern TSLanguage *tree_sitter_elixir(); -extern TSLanguage *tree_sitter_go(); -extern TSLanguage *tree_sitter_gomod(); -extern TSLanguage *tree_sitter_haskell(); -extern TSLanguage *tree_sitter_html(); -extern TSLanguage *tree_sitter_java(); -extern TSLanguage *tree_sitter_javascript(); -extern TSLanguage *tree_sitter_jsdoc(); extern TSLanguage *tree_sitter_json(); -extern TSLanguage *tree_sitter_julia(); -extern TSLanguage *tree_sitter_kotlin(); -extern TSLanguage *tree_sitter_lua(); extern TSLanguage *tree_sitter_markdown(); extern TSLanguage *tree_sitter_markdown_inline(); extern TSLanguage *tree_sitter_objc(); -extern TSLanguage *tree_sitter_ocaml(); -extern TSLanguage *tree_sitter_ocaml_interface(); -extern TSLanguage *tree_sitter_perl(); -extern TSLanguage *tree_sitter_php(); -extern TSLanguage *tree_sitter_python(); -extern TSLanguage *tree_sitter_regex(); -extern TSLanguage *tree_sitter_ruby(); -extern TSLanguage *tree_sitter_rust(); -extern TSLanguage *tree_sitter_scala(); -extern TSLanguage *tree_sitter_sql(); extern TSLanguage *tree_sitter_swift(); -extern TSLanguage *tree_sitter_toml(); -extern TSLanguage *tree_sitter_tsx(); -extern TSLanguage *tree_sitter_typescript(); -extern TSLanguage *tree_sitter_verilog(); -extern TSLanguage *tree_sitter_yaml(); -extern TSLanguage *tree_sitter_zig(); #ifdef __cplusplus } diff --git a/Package.swift b/Package.swift index 5ff76ab..345977d 100644 --- a/Package.swift +++ b/Package.swift @@ -32,10 +32,5 @@ let package = Package( name: "CodeLanguagesContainer", path: "CodeLanguagesContainer.xcframework.zip" ), - - .testTarget( - name: "CodeEditLanguagesTests", - dependencies: ["CodeEditLanguages"] - ), ] ) diff --git a/Sources/CodeEditLanguages/CodeLanguage+Definitions.swift b/Sources/CodeEditLanguages/CodeLanguage+Definitions.swift index 56ce3d4..8cd2b4f 100644 --- a/Sources/CodeEditLanguages/CodeLanguage+Definitions.swift +++ b/Sources/CodeEditLanguages/CodeLanguage+Definitions.swift @@ -1,8 +1,6 @@ -// swiftlint:disable file_length - // // CodeLanguage+Definitions.swift -// +// // // Created by Lukas Pistrol on 15.01.23. // @@ -13,59 +11,15 @@ public extension CodeLanguage { /// An array of all language structures. static let allLanguages: [CodeLanguage] = [ - .agda, .bash, .c, - .cpp, - .cSharp, - .css, - .dart, - .dockerfile, - .elixir, - .go, - .goMod, - .haskell, - .html, - .java, - .javascript, - .jsdoc, .json, - .jsx, - .julia, - .kotlin, - .lua, .markdown, .markdownInline, .objc, - .ocaml, - .ocamlInterface, - .perl, - .php, - .python, - .regex, - .ruby, - .rust, - .scala, - .sql, - .swift, - .toml, - .tsx, - .typescript, - .verilog, - .yaml, - .zig + .swift ] - /// A language structure for `Agda` - static let agda: CodeLanguage = .init( - id: .agda, - tsName: "agda", - extensions: ["agda"], - lineCommentString: "--", - rangeCommentStrings: ("{-", "-}"), - highlights: ["folds", "injections"] - ) - /// A language structure for `Bash` static let bash: CodeLanguage = .init( id: .bash, @@ -86,140 +40,6 @@ public extension CodeLanguage { highlights: ["folds", "indents", "injections", "locals", "tags"] ) - /// A language structure for `C++` - static let cpp: CodeLanguage = .init( - id: .cpp, - tsName: "cpp", - extensions: ["cc", "cpp", "c++", "hpp", "h"], - lineCommentString: CodeLanguage.c.lineCommentString, - rangeCommentStrings: CodeLanguage.c.rangeCommentStrings, - documentationCommentStrings: [.pair(("/**", "*/"))], - parentURL: CodeLanguage.c.queryURL, - highlights: ["folds", "indents", "injections", "locals", "tags"] - ) - - /// A language structure for `C#` - static let cSharp: CodeLanguage = .init( - id: .cSharp, - tsName: "c-sharp", - extensions: ["cs"], - lineCommentString: "//", - rangeCommentStrings: ("/*", "*/"), - highlights: ["folds", "injections", "locals", "tags"] - ) - - /// A language structure for `CSS` - static let css: CodeLanguage = .init( - id: .css, - tsName: "css", - extensions: ["css"], - lineCommentString: "", - rangeCommentStrings: ("/*", "*/"), - highlights: ["folds", "indents", "injections"] - ) - - /// A language structure for `Dart` - static let dart: CodeLanguage = .init( - id: .dart, - tsName: "dart", - extensions: ["dart"], - lineCommentString: "//", - rangeCommentStrings: ("/*", "*/"), - highlights: ["folds", "indents", "injections", "locals", "tags"] - ) - - /// A language structure for `Dockerfile` - static let dockerfile: CodeLanguage = .init( - id: .dockerfile, - tsName: "dockerfile", - extensions: ["Dockerfile"], - lineCommentString: "#", - rangeCommentStrings: ("", ""), - highlights: ["injections"] - ) - - /// A language structure for `Elixir` - static let elixir: CodeLanguage = .init( - id: .elixir, - tsName: "elixir", - extensions: ["ex", "exs"], - lineCommentString: "#", - rangeCommentStrings: ("", ""), - documentationCommentStrings: [.pair(("\"\"\"", "\"\"\""))], - highlights: ["folds", "indents", "injections", "locals", "tags"] - ) - - /// A language structure for `Go` - static let go: CodeLanguage = .init( - id: .go, - tsName: "go", - extensions: ["go"], - lineCommentString: "//", - rangeCommentStrings: ("/*", "*/"), - highlights: ["folds", "indents", "injections", "locals", "tags"] - ) - - /// A language structure for `GoMod` - static let goMod: CodeLanguage = .init( - id: .goMod, - tsName: "go-mod", - extensions: ["mod"], - lineCommentString: "//", - rangeCommentStrings: ("/*", "*/") - ) - - /// A language structure for `Haskell` - static let haskell: CodeLanguage = .init( - id: .haskell, - tsName: "haskell", - extensions: ["hs"], - lineCommentString: "--", - rangeCommentStrings: ("{-", "-}"), - highlights: ["folds", "injections", "locals"] - ) - - /// A language structure for `HTML` - static let html: CodeLanguage = .init( - id: .html, - tsName: "html", - extensions: ["html", "htm", "shtml"], - lineCommentString: "", - rangeCommentStrings: (""), - highlights: ["folds", "indents", "injections", "locals"] - ) - - /// A language structure for `Java` - static let java: CodeLanguage = .init( - id: .java, - tsName: "java", - extensions: ["java", "jav"], - lineCommentString: "//", - rangeCommentStrings: ("/*", "*/"), - documentationCommentStrings: [.pair(("/**", "*/"))], - highlights: ["folds", "indents", "injections", "locals", "tags"] - ) - - /// A language structure for `JavaScript` - static let javascript: CodeLanguage = .init( - id: .javascript, - tsName: "javascript", - extensions: ["js", "cjs", "mjs"], - lineCommentString: "//", - rangeCommentStrings: ("/*", "*/"), - documentationCommentStrings: [.pair(("/**", "*/"))], - highlights: ["folds", "indents", "injections", "locals", "tags"], - additionalIdentifiers: ["node", "deno"] - ) - - /// A language structure for `JSDoc` - static let jsdoc: CodeLanguage = .init( - id: .jsdoc, - tsName: "jsdoc", - extensions: [], - lineCommentString: "", - rangeCommentStrings: ("/**", "*/") - ) - /// A language structure for `JSON` static let json: CodeLanguage = .init( id: .json, @@ -230,46 +50,6 @@ public extension CodeLanguage { highlights: ["folds", "indents", "locals"] ) - /// A language structure for `JSX` - static let jsx: CodeLanguage = .init( - id: .jsx, - tsName: "javascript", - extensions: ["jsx"], - lineCommentString: "//", - rangeCommentStrings: ("/*", "*/"), - highlights: ["folds", "highlights-jsx", "indents", "injections", "locals", "tags"] - ) - - /// A language structure for `Julia` - static let julia: CodeLanguage = .init( - id: .julia, - tsName: "julia", - extensions: ["jl"], - lineCommentString: "#", - rangeCommentStrings: ("#=", "=#"), - highlights: ["folds", "indents", "injections", "locals"] - ) - - /// A language structure for `Kotlin` - static let kotlin: CodeLanguage = .init( - id: .kotlin, - tsName: "kotlin", - extensions: ["kt", "kts"], - lineCommentString: "//", - rangeCommentStrings: ("/*", "*/"), - highlights: ["folds", "injections", "locals"] - ) - - /// A language structure for `Lua` - static let lua: CodeLanguage = .init( - id: .lua, - tsName: "lua", - extensions: ["lua"], - lineCommentString: "--", - rangeCommentStrings: ("-[[", "]]--"), - highlights: ["folds", "indents", "injections", "locals", "tags"] - ) - /// A language structure for `Markdown` static let markdown: CodeLanguage = .init( id: .markdown, @@ -294,121 +74,13 @@ public extension CodeLanguage { static let objc: CodeLanguage = .init( id: .objc, tsName: "objc", - extensions: ["m", "h"], + extensions: ["m"], lineCommentString: "//", rangeCommentStrings: ("/*", "*/"), parentURL: CodeLanguage.c.queryURL, highlights: ["folds", "indents", "injections", "locals"] ) - /// A language structure for `OCaml` - static let ocaml: CodeLanguage = .init( - id: .ocaml, - tsName: "ocaml", - extensions: ["ml"], - lineCommentString: "", - rangeCommentStrings: ("(*", "*)"), - documentationCommentStrings: [.pair(("(**", "*)"))], - highlights: ["folds", "indents", "injections", "locals", "tags"] - ) - - /// A language structure for `OCaml Interface` - static let ocamlInterface: CodeLanguage = .init( - id: .ocamlInterface, - tsName: "ocaml", - extensions: ["mli"], - lineCommentString: "", - rangeCommentStrings: ("", ""), - highlights: ["folds", "indents", "injections", "locals", "tags"] - ) - - /// A language structure for `Perl` - static let perl: CodeLanguage = .init( - id: .perl, - tsName: "perl", - extensions: ["pl", "pm"], - lineCommentString: "#", - rangeCommentStrings: ("=pod", "=cut"), - highlights: ["folds", "injections"] - ) - - /// A language structure for `PHP` - static let php: CodeLanguage = .init( - id: .php, - tsName: "php", - extensions: ["php"], - lineCommentString: "//", - rangeCommentStrings: ("/*", "*/"), - highlights: ["folds", "indents", "injections", "locals", "tags"] - ) - - /// A language structure for `Python` - static let python: CodeLanguage = .init( - id: .python, - tsName: "python", - extensions: ["py"], - lineCommentString: "#", - rangeCommentStrings: ("", ""), - documentationCommentStrings: [.pair(("\"\"\"", "\"\"\""))], - highlights: ["folds", "indents", "injections", "locals", "tags"], - additionalIdentifiers: ["python2", "python3"] - ) - - /// A language structure for `Regex` - static let regex: CodeLanguage = .init( - id: .regex, - tsName: "regex", - extensions: [], - lineCommentString: "", - rangeCommentStrings: ("", "") - ) - - /// A language structure for `Ruby` - static let ruby: CodeLanguage = .init( - id: .ruby, - tsName: "ruby", - extensions: ["rb"], - lineCommentString: "#", - rangeCommentStrings: ("=begin", "=end"), - highlights: ["folds", "indents", "injections", "locals", "tags"] - ) - - /// A language structure for `Rust` - static let rust: CodeLanguage = .init( - id: .rust, - tsName: "rust", - extensions: ["rs"], - lineCommentString: "//", - rangeCommentStrings: ("/*", "*/"), - documentationCommentStrings: [ - .single("///"), - .single("//!"), - .pair(("/**", "*/")), - .pair(("/*!", "*/")) - ], - highlights: ["folds", "indents", "injections", "locals", "tags"] - ) - - /// A language structure for `Scala` - static let scala: CodeLanguage = .init( - id: .scala, - tsName: "scala", - extensions: ["scala", "sc"], - lineCommentString: "//", - rangeCommentStrings: ("/*", "*/"), - highlights: ["folds", "injections", "locals"] - ) - - /// A language structure for `SQL` - static let sql: CodeLanguage = .init( - id: .sql, - tsName: "sql", - extensions: ["sql"], - lineCommentString: "--", - rangeCommentStrings: ("/*", "*/"), - highlights: ["folds", "indents", "injections"] - ) - /// A language structure for `Swift` static let swift: CodeLanguage = .init( id: .swift, @@ -420,69 +92,6 @@ public extension CodeLanguage { highlights: ["folds", "indents", "injections", "locals", "tags"] ) - /// A language structure for `TOML` - static let toml: CodeLanguage = .init( - id: .toml, - tsName: "toml", - extensions: ["toml"], - lineCommentString: "#", - rangeCommentStrings: ("", ""), - highlights: ["folds", "indents", "injections", "locals"] - ) - - /// A language structure for `TSX` - static let tsx: CodeLanguage = .init( - id: .tsx, - tsName: "typescript", - extensions: ["tsx"], - lineCommentString: "//", - rangeCommentStrings: ("/*", "*/"), - parentURL: CodeLanguage.jsx.queryURL, - highlights: ["folds", "indents", "injections", "locals", "tags"] - ) - - /// A language structure for `Typescript` - static let typescript: CodeLanguage = .init( - id: .typescript, - tsName: "typescript", - extensions: ["ts", "cts", "mts"], - lineCommentString: "//", - rangeCommentStrings: ("/*", "*/"), - parentURL: CodeLanguage.javascript.queryURL, - highlights: ["folds", "indents", "injections", "locals", "tags"] - ) - - /// A language structure for `Verilog` - static let verilog: CodeLanguage = .init( - id: .verilog, - tsName: "verilog", - extensions: ["v"], - lineCommentString: "//", - rangeCommentStrings: ("/*", "*/"), - highlights: ["folds", "injections"] - ) - - /// A language structure for `YAML` - static let yaml: CodeLanguage = .init( - id: .yaml, - tsName: "yaml", - extensions: ["yml", "yaml"], - lineCommentString: "#", - rangeCommentStrings: ("", ""), - highlights: ["folds", "indents", "injections", "locals"] - ) - - /// A language structure for `Zig` - static let zig: CodeLanguage = .init( - id: .zig, - tsName: "zig", - extensions: ["zig"], - lineCommentString: "//", - rangeCommentStrings: ("", ""), - documentationCommentStrings: [.single("///"), .single("//!")], - highlights: ["folds", "indents", "injections", "locals"] - ) - /// The default language (plain text) static let `default`: CodeLanguage = .init( id: .plainText, @@ -492,5 +101,3 @@ public extension CodeLanguage { rangeCommentStrings: ("", "") ) } - -// swiftlint:enable file_length diff --git a/Sources/CodeEditLanguages/CodeLanguage.swift b/Sources/CodeEditLanguages/CodeLanguage.swift index f8b6681..fef150d 100644 --- a/Sources/CodeEditLanguages/CodeLanguage.swift +++ b/Sources/CodeEditLanguages/CodeLanguage.swift @@ -87,88 +87,20 @@ public struct CodeLanguage { /// Gets the TSLanguage from `tree-sitter` private var tsLanguage: OpaquePointer? { switch id { - case .agda: - return tree_sitter_agda() case .bash: return tree_sitter_bash() case .c: return tree_sitter_c() - case .cpp: - return tree_sitter_cpp() - case .cSharp: - return tree_sitter_c_sharp() - case .css: - return tree_sitter_css() - case .dart: - return tree_sitter_dart() - case .dockerfile: - return tree_sitter_dockerfile() - case .elixir: - return tree_sitter_elixir() - case .go: - return tree_sitter_go() - case .goMod: - return tree_sitter_gomod() - case .haskell: - return tree_sitter_haskell() - case .html: - return tree_sitter_html() - case .java: - return tree_sitter_java() - case .javascript: - return tree_sitter_javascript() - case .jsdoc: - return tree_sitter_jsdoc() case .json: return tree_sitter_json() - case .jsx: - return tree_sitter_javascript() - case .julia: - return tree_sitter_julia() - case .kotlin: - return tree_sitter_kotlin() - case .lua: - return tree_sitter_lua() case .markdown: return tree_sitter_markdown() case .markdownInline: return tree_sitter_markdown_inline() case .objc: return tree_sitter_objc() - case .ocaml: - return tree_sitter_ocaml() - case .ocamlInterface: - return tree_sitter_ocaml_interface() - case .perl: - return tree_sitter_perl() - case .php: - return tree_sitter_php() - case .python: - return tree_sitter_python() - case .regex: - return tree_sitter_regex() - case .ruby: - return tree_sitter_ruby() - case .rust: - return tree_sitter_rust() - case .scala: - return tree_sitter_scala() - case .sql: - return tree_sitter_sql() case .swift: return tree_sitter_swift() - case .toml: - return tree_sitter_toml() - case .tsx: - return tree_sitter_tsx() - case .typescript: - return tree_sitter_typescript() - case .verilog: - return tree_sitter_verilog() - case .yaml: - return tree_sitter_yaml() - case .zig: - return tree_sitter_zig() case .plainText: return nil } diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-agda/folds.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-agda/folds.scm deleted file mode 100644 index 143d49f..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-agda/folds.scm +++ /dev/null @@ -1,19 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -[ - (record) - (module) -] @fold diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-agda/highlights.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-agda/highlights.scm deleted file mode 100644 index d81f95e..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-agda/highlights.scm +++ /dev/null @@ -1,81 +0,0 @@ - - -;; Constants -(integer) @constant - -;; Variables and Symbols - -(typed_binding (atom (qid) @variable)) -(untyped_binding) @variable -(typed_binding (expr) @type) - -(id) @function -(bid) @function - -(function_name (atom (qid) @function)) -(field_name) @function - - -[(data_name) (record_name)] @constructor - -; Set -(SetN) @type.builtin - - -;; Imports and Module Declarations - -"import" @include - -(module_name) @namespace - -;; Pragmas and comments - -(pragma) @constant.macro - -(comment) @comment - -;; Keywords -[ - "where" - "data" - "rewrite" - "postulate" - "public" - "private" - "tactic" - "Prop" - "quote" - "renaming" - "open" - "in" - "hiding" - "constructor" - "abstract" - "let" - "field" - "mutual" - "module" - "infix" - "infixl" - "infixr" - "record" - "forall" - "∀" - "->" - "→" - "\\" - "λ" - "..." - "…" -] @keyword - -;; Brackets - -[ - "(" - ")" - "{" - "}"] -@punctuation.bracket - - diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-agda/injections.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-agda/injections.scm deleted file mode 100644 index 3c59e7b..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-agda/injections.scm +++ /dev/null @@ -1,17 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/folds.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/folds.scm deleted file mode 100644 index c323c5b..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/folds.scm +++ /dev/null @@ -1,32 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -body: [ - (declaration_list) - (switch_body) - (enum_member_declaration_list) -] @fold - -accessors: (accessor_list) @fold - -initializer: (initializer_expression) @fold - -[ - (block) - (preproc_if) - (preproc_elif) - (preproc_else) - (using_directive)+ -] @fold diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/highlights.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/highlights.scm deleted file mode 100644 index 12ab524..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/highlights.scm +++ /dev/null @@ -1,254 +0,0 @@ -;; Methods -(method_declaration name: (identifier) @function) -(local_function_statement name: (identifier) @function) - -;; Types -(interface_declaration name: (identifier) @type) -(class_declaration name: (identifier) @type) -(enum_declaration name: (identifier) @type) -(struct_declaration (identifier) @type) -(record_declaration (identifier) @type) -(record_struct_declaration (identifier) @type) -(namespace_declaration name: (identifier) @module) - -(constructor_declaration name: (identifier) @constructor) -(destructor_declaration name: (identifier) @constructor) - -[ - (implicit_type) - (predefined_type) -] @type.builtin - -(_ type: (identifier) @type) - -;; Enum -(enum_member_declaration (identifier) @property.definition) - -;; Literals -[ - (real_literal) - (integer_literal) -] @number - -[ - (character_literal) - (string_literal) - (verbatim_string_literal) - (interpolated_string_text) - (interpolated_verbatim_string_text) - "\"" - "$\"" - "@$\"" - "$@\"" - ] @string - -[ - (boolean_literal) - (null_literal) -] @constant.builtin - -;; Comments -(comment) @comment - -;; Tokens -[ - ";" - "." - "," -] @punctuation.delimiter - -[ - "--" - "-" - "-=" - "&" - "&=" - "&&" - "+" - "++" - "+=" - "<" - "<=" - "<<" - "<<=" - "=" - "==" - "!" - "!=" - "=>" - ">" - ">=" - ">>" - ">>=" - ">>>" - ">>>=" - "|" - "|=" - "||" - "?" - "??" - "??=" - "^" - "^=" - "~" - "*" - "*=" - "/" - "/=" - "%" - "%=" - ":" -] @operator - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -;; Keywords -(modifier) @keyword -(this_expression) @keyword -(escape_sequence) @keyword - -[ - "add" - "alias" - "as" - "base" - "break" - "case" - "catch" - "checked" - "class" - "continue" - "default" - "delegate" - "do" - "else" - "enum" - "event" - "explicit" - "extern" - "finally" - "for" - "foreach" - "global" - "goto" - "if" - "implicit" - "interface" - "is" - "lock" - "namespace" - "notnull" - "operator" - "params" - "return" - "remove" - "sizeof" - "stackalloc" - "static" - "struct" - "switch" - "throw" - "try" - "typeof" - "unchecked" - "using" - "while" - "new" - "await" - "in" - "yield" - "get" - "set" - "when" - "out" - "ref" - "from" - "where" - "select" - "record" - "init" - "with" - "let" -] @keyword - - -;; Linq -(from_clause (identifier) @variable) -(group_clause (identifier) @variable) -(order_by_clause (identifier) @variable) -(join_clause (identifier) @variable) -(select_clause (identifier) @variable) -(query_continuation (identifier) @variable) @keyword - -;; Record -(with_expression - (with_initializer_expression - (simple_assignment_expression - (identifier) @variable))) - -;; Exprs -(binary_expression (identifier) @variable (identifier) @variable) -(binary_expression (identifier)* @variable) -(conditional_expression (identifier) @variable) -(prefix_unary_expression (identifier) @variable) -(postfix_unary_expression (identifier)* @variable) -(assignment_expression (identifier) @variable) -(cast_expression (_) (identifier) @variable) - -;; Class -(base_list (identifier) @type) ;; applies to record_base too -(property_declaration (generic_name)) -(property_declaration - name: (identifier) @variable) -(property_declaration - name: (identifier) @variable) -(property_declaration - name: (identifier) @variable) - -;; Lambda -(lambda_expression) @variable - -;; Attribute -(attribute) @attribute - -;; Parameter -(parameter - name: (identifier) @variable.parameter) -(parameter (identifier) @variable.parameter) -(parameter_modifier) @keyword - -;; Variable declarations -(variable_declarator (identifier) @variable) -(for_each_statement left: (identifier) @variable) -(catch_declaration (_) (identifier) @variable) - -;; Return -(return_statement (identifier) @variable) -(yield_statement (identifier) @variable) - -;; Type -(generic_name (identifier) @type) -(type_parameter (identifier) @property.definition) -(type_argument_list (identifier) @type) -(as_expression right: (identifier) @type) -(is_expression right: (identifier) @type) - -;; Type constraints -(type_parameter_constraints_clause (identifier) @property.definition) - -;; Switch -(switch_statement (identifier) @variable) -(switch_expression (identifier) @variable) - -;; Lock statement -(lock_statement (identifier) @variable) - -;; Method calls -(invocation_expression (member_access_expression name: (identifier) @function)) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/injections.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/injections.scm deleted file mode 100644 index 3c59e7b..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/injections.scm +++ /dev/null @@ -1,17 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/locals.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/locals.scm deleted file mode 100644 index 11d5b5c..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/locals.scm +++ /dev/null @@ -1,57 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -; Definitions -(variable_declarator - . - (identifier) @local.definition.var) - -(variable_declarator - (tuple_pattern - (identifier) @local.definition.var)) - -(declaration_expression - name: (identifier) @local.definition.var) - -(foreach_statement - left: (identifier) @local.definition.var) - -(foreach_statement - left: (tuple_pattern - (identifier) @local.definition.var)) - -(parameter - (identifier) @local.definition.parameter) - -(method_declaration - name: (identifier) @local.definition.method) - -(local_function_statement - name: (identifier) @local.definition.method) - -(property_declaration - name: (identifier) @local.definition) - -(type_parameter - (identifier) @local.definition.type) - -(class_declaration - name: (identifier) @local.definition) - -; References -(identifier) @local.reference - -; Scope -(block) @local.scope diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/tags.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/tags.scm deleted file mode 100644 index 5bb68cd..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-c-sharp/tags.scm +++ /dev/null @@ -1,23 +0,0 @@ -(class_declaration name: (identifier) @name) @definition.class - -(class_declaration bases: (base_list (_) @name)) @reference.class - -(interface_declaration name: (identifier) @name) @definition.interface - -(interface_declaration bases: (base_list (_) @name)) @reference.interface - -(method_declaration name: (identifier) @name) @definition.method - -(object_creation_expression type: (identifier) @name) @reference.class - -(type_parameter_constraints_clause target: (identifier) @name) @reference.class - -(type_constraint type: (identifier) @name) @reference.class - -(variable_declaration type: (identifier) @name) @reference.class - -(invocation_expression function: (member_access_expression name: (identifier) @name)) @reference.send - -(namespace_declaration name: (identifier) @name) @definition.module - -(namespace_declaration name: (identifier) @name) @module \ No newline at end of file diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/folds.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/folds.scm deleted file mode 100644 index ba4a265..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/folds.scm +++ /dev/null @@ -1,29 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -; inherits: c - -[ - (for_range_loop) - (class_specifier) - (field_declaration - type: (enum_specifier) - default_value: (initializer_list)) - (template_declaration) - (namespace_definition) - (try_statement) - (catch_clause) - (lambda_expression) -] @fold diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/highlights.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/highlights.scm deleted file mode 100644 index 4d1f1c0..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/highlights.scm +++ /dev/null @@ -1,74 +0,0 @@ -; Functions - -(call_expression - function: (qualified_identifier - name: (identifier) @function)) - -(template_function - name: (identifier) @function) - -(template_method - name: (field_identifier) @function) - -(template_function - name: (identifier) @function) - -(function_declarator - declarator: (qualified_identifier - name: (identifier) @function)) - -(function_declarator - declarator: (qualified_identifier - name: (identifier) @function)) - -(function_declarator - declarator: (field_identifier) @function) - -; Types - -((namespace_identifier) @type - (#match? @type "^[A-Z]")) - -(auto) @type - -; Constants - -(this) @variable.builtin -(null "nullptr" @constant) - -; Keywords - -[ - "catch" - "class" - "co_await" - "co_return" - "co_yield" - "constexpr" - "constinit" - "consteval" - "delete" - "explicit" - "final" - "friend" - "mutable" - "namespace" - "noexcept" - "new" - "override" - "private" - "protected" - "public" - "template" - "throw" - "try" - "typename" - "using" - "virtual" - "concept" - "requires" -] @keyword - -; Strings - -(raw_string_literal) @string diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/indents.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/indents.scm deleted file mode 100644 index 5dc76ec..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/indents.scm +++ /dev/null @@ -1,23 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -; inherits: c - -(condition_clause) @indent.begin - -((field_initializer_list) @indent.begin - (#set! indent.start_at_same_line 1)) - -(access_specifier) @indent.branch diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/injections.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/injections.scm deleted file mode 100644 index 6850c95..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/injections.scm +++ /dev/null @@ -1,3 +0,0 @@ -(raw_string_literal - delimiter: (raw_string_delimiter) @injection.language - (raw_string_content) @injection.content) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/locals.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/locals.scm deleted file mode 100644 index 968600e..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/locals.scm +++ /dev/null @@ -1,93 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -; inherits: c - -; Parameters -(variadic_parameter_declaration - declarator: (variadic_declarator - (identifier) @local.definition.parameter)) - -(optional_parameter_declaration - declarator: (identifier) @local.definition.parameter) - -; Class / struct definitions -(class_specifier) @local.scope - -(reference_declarator - (identifier) @local.definition.var) - -(variadic_declarator - (identifier) @local.definition.var) - -(struct_specifier - name: (qualified_identifier - name: (type_identifier) @local.definition.type)) - -(class_specifier - name: (type_identifier) @local.definition.type) - -(concept_definition - name: (identifier) @local.definition.type) - -(class_specifier - name: (qualified_identifier - name: (type_identifier) @local.definition.type)) - -(alias_declaration - name: (type_identifier) @local.definition.type) - -;template -(type_parameter_declaration - (type_identifier) @local.definition.type) - -(template_declaration) @local.scope - -; Namespaces -(namespace_definition - name: (namespace_identifier) @local.definition.namespace - body: (_) @local.scope) - -(namespace_definition - name: (nested_namespace_specifier) @local.definition.namespace - body: (_) @local.scope) - -((namespace_identifier) @local.reference - (#set! reference.kind "namespace")) - -; Function definitions -(template_function - name: (identifier) @local.definition.function) @local.scope - -(template_method - name: (field_identifier) @local.definition.method) @local.scope - -(function_declarator - declarator: (qualified_identifier - name: (identifier) @local.definition.function)) @local.scope - -(field_declaration - declarator: (function_declarator - (field_identifier) @local.definition.method)) - -(lambda_expression) @local.scope - -; Control structures -(try_statement - body: (_) @local.scope) - -(catch_clause) @local.scope - -(requires_expression) @local.scope diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/tags.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/tags.scm deleted file mode 100644 index 621a97d..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-cpp/tags.scm +++ /dev/null @@ -1,15 +0,0 @@ -(struct_specifier name: (type_identifier) @name body:(_)) @definition.class - -(declaration type: (union_specifier name: (type_identifier) @name)) @definition.class - -(function_declarator declarator: (identifier) @name) @definition.function - -(function_declarator declarator: (field_identifier) @name) @definition.function - -(function_declarator declarator: (qualified_identifier scope: (namespace_identifier) @local.scope name: (identifier) @name)) @definition.method - -(type_definition declarator: (type_identifier) @name) @definition.type - -(enum_specifier name: (type_identifier) @name) @definition.type - -(class_specifier name: (type_identifier) @name) @definition.class diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-css/folds.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-css/folds.scm deleted file mode 100644 index f7a8cef..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-css/folds.scm +++ /dev/null @@ -1,25 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -[ - ; top-level block statements from https://github.com/tree-sitter/tree-sitter-css/blob/master/grammar.js - ; note: (block) is not used due to unideal behavior when node before block node spans multiple lines - (rule_set) - (at_rule) - (supports_statement) - (media_statement) - (keyframe_block) - (import_statement)+ -] @fold diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-css/highlights.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-css/highlights.scm deleted file mode 100644 index 763661a..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-css/highlights.scm +++ /dev/null @@ -1,64 +0,0 @@ -(comment) @comment - -(tag_name) @tag -(nesting_selector) @tag -(universal_selector) @tag - -"~" @operator -">" @operator -"+" @operator -"-" @operator -"*" @operator -"/" @operator -"=" @operator -"^=" @operator -"|=" @operator -"~=" @operator -"$=" @operator -"*=" @operator - -"and" @operator -"or" @operator -"not" @operator -"only" @operator - -(attribute_selector (plain_value) @string) -(pseudo_element_selector (tag_name) @attribute) -(pseudo_class_selector (class_name) @attribute) - -(class_name) @property -(id_name) @property -(namespace_name) @property -(property_name) @property -(feature_name) @property - -(attribute_name) @attribute - -(function_name) @function - -((property_name) @variable - (#match? @variable "^--")) -((plain_value) @variable - (#match? @variable "^--")) - -"@media" @keyword -"@import" @keyword -"@charset" @keyword -"@namespace" @keyword -"@supports" @keyword -"@keyframes" @keyword -(at_keyword) @keyword -(to) @keyword -(from) @keyword -(important) @keyword - -(string_value) @string -(color_value) @string.special - -(integer_value) @number -(float_value) @number -(unit) @type - -"#" @punctuation.delimiter -"," @punctuation.delimiter -":" @punctuation.delimiter diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-css/indents.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-css/indents.scm deleted file mode 100644 index 1d59783..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-css/indents.scm +++ /dev/null @@ -1,26 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -[ - (block) - (declaration) -] @indent.begin - -(block - "}" @indent.branch) - -"}" @indent.dedent - -(comment) @indent.ignore diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-css/injections.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-css/injections.scm deleted file mode 100644 index 3c59e7b..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-css/injections.scm +++ /dev/null @@ -1,17 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-dart/folds.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-dart/folds.scm deleted file mode 100644 index 93d54d2..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-dart/folds.scm +++ /dev/null @@ -1,28 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -[ - (class_definition) - (enum_declaration) - (extension_declaration) - (arguments) - (function_body) - (block) - (switch_block) - (list_literal) - (set_or_map_literal) - (string_literal) - (import_or_export)+ -] @fold diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-dart/highlights.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-dart/highlights.scm deleted file mode 100644 index 56a68d5..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-dart/highlights.scm +++ /dev/null @@ -1,246 +0,0 @@ -; Variable -(identifier) @variable - -; Keywords -; -------------------- -[ - (assert_builtin) - (break_builtin) - (const_builtin) - (part_of_builtin) - (rethrow_builtin) - (void_type) - "abstract" - "as" - "async" - "async*" - "await" - "base" - "case" - "catch" - "class" - "continue" - "covariant" - "default" - "deferred" - "do" - "dynamic" - "else" - "enum" - "export" - "extends" - "extension" - "external" - "factory" - "final" - "finally" - "for" - "Function" - "get" - "hide" - "if" - "implements" - "import" - "in" - "interface" - "is" - "late" - "library" - "mixin" - "new" - "on" - "operator" - "part" - "required" - "return" - "sealed" - "set" - "show" - "static" - "super" - "switch" - "sync*" - "throw" - "try" - "typedef" - "var" - "when" - "while" - "with" - "yield" -] @keyword - -; Methods -; -------------------- - -; NOTE: This query is a bit of a work around for the fact that the dart grammar doesn't -; specifically identify a node as a function call -(((identifier) @function (#match? @function "^_?[a-z]")) - . (selector . (argument_part))) @function - -; Annotations -; -------------------- -(annotation - name: (identifier) @attribute) - -; Operators and Tokens -; -------------------- -(template_substitution - "$" @punctuation.special - "{" @punctuation.special - "}" @punctuation.special -) @none - -(template_substitution - "$" @punctuation.special - (identifier_dollar_escaped) @variable -) @none - -(escape_sequence) @string.escape - -[ - "@" - "=>" - ".." - "??" - "==" - "?" - ":" - "&&" - "%" - "<" - ">" - "=" - ">=" - "<=" - "||" - "~/" - (increment_operator) - (is_operator) - (prefix_operator) - (equality_operator) - (additive_operator) -] @operator - -(type_arguments - "<" @punctuation.bracket - ">" @punctuation.bracket) - -(type_parameters - "<" @punctuation.bracket - ">" @punctuation.bracket) - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -; Delimiters -; -------------------- -[ - ";" - "." - "," -] @punctuation.delimiter - -; Types -; -------------------- -(type_identifier) @type -((type_identifier) @type.builtin - (#match? @type.builtin "^(int|double|String|bool|List|Set|Map|Runes|Symbol)$")) -(class_definition - name: (identifier) @type) -(constructor_signature - name: (identifier) @type) -(scoped_identifier - scope: (identifier) @type) -(function_signature - name: (identifier) @function) -(getter_signature - (identifier) @function) -(setter_signature - name: (identifier) @function) - -((scoped_identifier - scope: (identifier) @type - name: (identifier) @type) - (#match? @type "^[a-zA-Z]")) - -; Enums -; ------------------- -(enum_declaration - name: (identifier) @type) -(enum_constant - name: (identifier) @identifier.constant) - -; Variables -; -------------------- -; var keyword -(inferred_type) @keyword - -((identifier) @type - (#match? @type "^_?[A-Z].*[a-z]")) - -("Function" @type) - -(this) @variable.builtin - -; properties - -(unconditional_assignable_selector - (identifier) @property) - -(conditional_assignable_selector - (identifier) @property) - -(cascade_section - (cascade_selector - (identifier) @property)) - -((selector - (unconditional_assignable_selector (identifier) @function)) - (selector (argument_part (arguments))) -) - -(cascade_section - (cascade_selector (identifier) @function) - (argument_part (arguments)) -) - -; assignments -(assignment_expression - left: (assignable_expression) @variable) - -(this) @variable.builtin - -; Parameters -; -------------------- -(formal_parameter - name: (identifier) @identifier.parameter) - -(named_argument - (label (identifier) @identifier.parameter)) - -; Literals -; -------------------- -[ - (hex_integer_literal) - (decimal_integer_literal) - (decimal_floating_point_literal) - ; TODO: inaccessbile nodes - ; (octal_integer_literal) - ; (hex_floating_point_literal) -] @number - -(string_literal) @string -(symbol_literal (identifier) @constant) @constant -(true) @boolean -(false) @boolean -(null_literal) @constant.null - -(documentation_comment) @comment -(comment) @comment diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-dart/indents.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-dart/indents.scm deleted file mode 100644 index 51e9958..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-dart/indents.scm +++ /dev/null @@ -1,64 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -[ - (class_body) - (function_body) - (function_expression_body) - (declaration - (initializers)) - (switch_block) - (formal_parameter_list) - (formal_parameter) - (list_literal) - (return_statement) - (arguments) - (try_statement) -] @indent.begin - -(switch_block - (_) @indent.begin - (#set! indent.immediate 1) - (#set! indent.start_at_same_line 1)) - -[ - (switch_statement_case) - (switch_statement_default) -] @indent.branch - -[ - "(" - ")" - "{" - "}" - "[" - "]" -] @indent.branch - -"}" @indent.end - -(return_statement - ";" @indent.end) - -(break_statement - ";" @indent.end) - -(comment) @indent.ignore - -; dedenting the else block is painfully slow; replace with simpler strategy -; (if_statement) @indent.begin -; (if_statement -; (block) @indent.branch) -(if_statement) @indent.auto diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-dart/injections.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-dart/injections.scm deleted file mode 100644 index 3c59e7b..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-dart/injections.scm +++ /dev/null @@ -1,17 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -((comment) @injection.content - (#set! injection.language "comment")) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-dart/locals.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-dart/locals.scm deleted file mode 100644 index c2ae1db..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-dart/locals.scm +++ /dev/null @@ -1,47 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -; Definitions -(function_signature - name: (identifier) @local.definition.function) - -(formal_parameter - name: (identifier) @local.definition.parameter) - -(initialized_variable_definition - name: (identifier) @local.definition.var) - -(initialized_identifier - (identifier) @local.definition.var) - -(static_final_declaration - (identifier) @local.definition.var) - -; References -(identifier) @local.reference - -; Scopes -(class_definition - body: (_) @local.scope) - -[ - (block) - (if_statement) - (for_statement) - (while_statement) - (try_statement) - (catch_clause) - (finally_clause) -] @local.scope diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-dart/tags.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-dart/tags.scm deleted file mode 100644 index 35ebc99..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-dart/tags.scm +++ /dev/null @@ -1,92 +0,0 @@ - -(class_definition - name: (identifier) @name) @definition.class - -(method_signature - (function_signature)) @definition.method - -(type_alias - (type_identifier) @name) @definition.type - -(method_signature -(getter_signature - name: (identifier) @name)) @definition.method - -(method_signature -(setter_signature - name: (identifier) @name)) @definition.method - -(method_signature - (function_signature - name: (identifier) @name)) @definition.method - -(method_signature - (factory_constructor_signature - (identifier) @name)) @definition.method - -(method_signature - (constructor_signature - name: (identifier) @name)) @definition.method - -(method_signature - (operator_signature)) @definition.method - -(method_signature) @definition.method - -(mixin_declaration - (mixin) - (identifier) @name) @definition.mixin - -(extension_declaration - name: (identifier) @name) @definition.extension - - -(new_expression - (type_identifier) @name) @reference.class - -(enum_declaration - name: (identifier) @name) @definition.enum - -(function_signature - name: (identifier) @name) @definition.function - -(initialized_variable_definition - name: (identifier) - value: (identifier) @name - value: (selector - "!"? - (argument_part - (arguments - (argument)*))?)?) @reference.class - -(assignment_expression - left: (assignable_expression - (identifier) - (unconditional_assignable_selector - "." - (identifier) @name))) @reference.call - -(assignment_expression - left: (assignable_expression - (identifier) - (conditional_assignable_selector - "?." - (identifier) @name))) @reference.call - -((identifier) @name - (selector - "!"? - (conditional_assignable_selector - "?." (identifier) @name)? - (unconditional_assignable_selector - "."? (identifier) @name)? - (argument_part - (arguments - (argument)*))?)* - (cascade_section - (cascade_selector - (identifier)) @name - (argument_part - (arguments - (argument)*))?)?) @reference.call - diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-dart/test.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-dart/test.scm deleted file mode 100644 index 92a8daa..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-dart/test.scm +++ /dev/null @@ -1 +0,0 @@ -(if_statement (block)) \ No newline at end of file diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-dockerfile/highlights.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-dockerfile/highlights.scm deleted file mode 100644 index 7c1bfde..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-dockerfile/highlights.scm +++ /dev/null @@ -1,55 +0,0 @@ -[ - "FROM" - "AS" - "RUN" - "CMD" - "LABEL" - "EXPOSE" - "ENV" - "ADD" - "COPY" - "ENTRYPOINT" - "VOLUME" - "USER" - "WORKDIR" - "ARG" - "ONBUILD" - "STOPSIGNAL" - "HEALTHCHECK" - "SHELL" - "MAINTAINER" - "CROSS_BUILD" -] @keyword - -[ - ":" - "@" -] @operator - -(comment) @comment - - -(image_spec - (image_tag - ":" @punctuation.special) - (image_digest - "@" @punctuation.special)) - -[ - (double_quoted_string) - (single_quoted_string) - (json_string) -] @string - -(expansion - [ - "$" - "{" - "}" - ] @punctuation.special -) @none - -((variable) @constant - (#match? @constant "^[A-Z][A-Z_0-9]*$")) - - diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-dockerfile/injections.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-dockerfile/injections.scm deleted file mode 100644 index eb77383..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-dockerfile/injections.scm +++ /dev/null @@ -1,27 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -((comment) @injection.content - (#set! injection.language "comment")) - -((shell_command - (shell_fragment) @injection.content) - (#set! injection.language "bash") - (#set! injection.combined)) - -((run_instruction - (heredoc_block) @injection.content) - (#set! injection.language "bash") - (#set! injection.include-children)) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/folds.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/folds.scm deleted file mode 100644 index 1c6c419..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/folds.scm +++ /dev/null @@ -1,25 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -[ - (anonymous_function) - (stab_clause) - (arguments) - (block) - (do_block) - (list) - (map) - (tuple) -] @fold diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/highlights.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/highlights.scm deleted file mode 100644 index 7423e31..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/highlights.scm +++ /dev/null @@ -1,199 +0,0 @@ -; Reserved keywords - -["when" "and" "or" "not" "in" "not in" "fn" "do" "end" "catch" "rescue" "after" "else"] @keyword - -; Operators - -; * doc string -(unary_operator - operator: "@" @comment.doc - operand: (call - target: (identifier) @comment.doc.__attribute__ - (arguments - [ - (string) @comment.doc - (charlist) @comment.doc - (sigil - quoted_start: _ @comment.doc - quoted_end: _ @comment.doc) @comment.doc - (boolean) @comment.doc - ])) - (#match? @comment.doc.__attribute__ "^(moduledoc|typedoc|doc)$")) - -; * module attribute -(unary_operator - operator: "@" @attribute - operand: [ - (identifier) @attribute - (call - target: (identifier) @attribute) - (boolean) @attribute - (nil) @attribute - ]) - -; * capture operand -(unary_operator - operator: "&" - operand: (integer) @operator) - -(operator_identifier) @operator - -(unary_operator - operator: _ @operator) - -(binary_operator - operator: _ @operator) - -(dot - operator: _ @operator) - -(stab_clause - operator: _ @operator) - -; Literals - -[ - (boolean) - (nil) -] @constant - -[ - (integer) - (float) -] @number - -(alias) @module - -(call - target: (dot - left: (atom) @module)) - -(char) @constant - -; Quoted content - -(interpolation "#{" @punctuation.special "}" @punctuation.special) @embedded - -(escape_sequence) @string.escape - -[ - (atom) - (quoted_atom) - (keyword) - (quoted_keyword) -] @string.special.symbol - -[ - (string) - (charlist) -] @string - -; Note that we explicitly target sigil quoted start/end, so they are not overridden by delimiters - -(sigil - (sigil_name) @__name__ - quoted_start: _ @string - quoted_end: _ @string - (#match? @__name__ "^[sS]$")) @string - -(sigil - (sigil_name) @__name__ - quoted_start: _ @string.regex - quoted_end: _ @string.regex - (#match? @__name__ "^[rR]$")) @string.regex - -(sigil - (sigil_name) @__name__ - quoted_start: _ @string.special - quoted_end: _ @string.special) @string.special - -; Calls - -; * definition keyword -(call - target: (identifier) @keyword - (#match? @keyword "^(def|defdelegate|defexception|defguard|defguardp|defimpl|defmacro|defmacrop|defmodule|defn|defnp|defoverridable|defp|defprotocol|defstruct)$")) - -; * kernel or special forms keyword -(call - target: (identifier) @keyword - (#match? @keyword "^(alias|case|cond|else|for|if|import|quote|raise|receive|require|reraise|super|throw|try|unless|unquote|unquote_splicing|use|with)$")) - -; * function call -(call - target: [ - ; local - (identifier) @function - ; remote - (dot - right: (identifier) @function) - ]) - -; * just identifier in function definition -(call - target: (identifier) @keyword - (arguments - [ - (identifier) @function - (binary_operator - left: (identifier) @function - operator: "when") - ]) - (#match? @keyword "^(def|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp|defp)$")) - -; * pipe into identifier (definition) -(call - target: (identifier) @keyword - (arguments - (binary_operator - operator: "|>" - right: (identifier) @variable)) - (#match? @keyword "^(def|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp|defp)$")) - -; * pipe into identifier (function call) -(binary_operator - operator: "|>" - right: (identifier) @function) - -; Identifiers - -; * special -( - (identifier) @constant.builtin - (#match? @constant.builtin "^(__MODULE__|__DIR__|__ENV__|__CALLER__|__STACKTRACE__)$") -) - -; * unused -( - (identifier) @comment.unused - (#match? @comment.unused "^_") -) - -; * regular -(identifier) @variable - -; Comment - -(comment) @comment - -; Punctuation - -[ - "%" -] @punctuation - -[ - "," - ";" -] @punctuation.delimiter - -[ - "(" - ")" - "[" - "]" - "{" - "}" - "<<" - ">>" -] @punctuation.bracket diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/indents.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/indents.scm deleted file mode 100644 index cfcebcf..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/indents.scm +++ /dev/null @@ -1,40 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -[ - (block) - (do_block) - (list) - (map) - (stab_clause) - (tuple) - (arguments) -] @indent.begin - -[ - ")" - "]" - "after" - "catch" - "else" - "rescue" - "}" - "end" -] @indent.end @indent.branch - -; Elixir pipelines are not indented, but other binary operator chains are -((binary_operator - operator: _ @_operator) @indent.begin - (#not-eq? @_operator "|>")) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/injections.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/injections.scm deleted file mode 100644 index 16069ce..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/injections.scm +++ /dev/null @@ -1,7 +0,0 @@ -; Phoenix HTML template -((sigil - (sigil_name) @_sigil_name - (quoted_content) @injection.content) - (#eq? @_sigil_name "H") - (#set! injection.language "heex") - (#set! injection.combined)) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/locals.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/locals.scm deleted file mode 100644 index a1e61dd..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/locals.scm +++ /dev/null @@ -1,215 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -; References -(identifier) @local.reference - -(alias) @local.reference - -; Module Definitions -(call - target: ((identifier) @_identifier - (#eq? @_identifier "defmodule")) - (arguments - (alias) @local.definition.type)) - -; Pattern Match Definitions -(binary_operator - ; format-ignore - left: - [ - (identifier) @local.definition.var - (_ (identifier) @local.definition.var) - (_ (_ (identifier) @local.definition.var)) - (_ (_ (_ (identifier) @local.definition.var))) - (_ (_ (_ (_ (identifier) @local.definition.var)))) - (_ (_ (_ (_ (_ (identifier) @local.definition.var))))) - (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))) - (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))))))) - ] - operator: "=") - -; Stab Clause Definitions -; format-ignore -(stab_clause - left: - [ - (arguments - [ - (identifier) @local.definition.var - (_ (identifier) @local.definition.var) - (_ (_ (identifier) @local.definition.var)) - (_ (_ (_ (identifier) @local.definition.var))) - (_ (_ (_ (_ (identifier) @local.definition.var)))) - (_ (_ (_ (_ (_ (identifier) @local.definition.var))))) - (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))) - (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))))))) - ]) - - (binary_operator - left: - (arguments - ; format-ignore - [ - (identifier) @local.definition.var - (_ (identifier) @local.definition.var) - (_ (_ (identifier) @local.definition.var)) - (_ (_ (_ (identifier) @local.definition.var))) - (_ (_ (_ (_ (identifier) @local.definition.var)))) - (_ (_ (_ (_ (_ (identifier) @local.definition.var))))) - (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))) - (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var))))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.var)))))))))))))))))))) - ]) - operator: "when") - ]) - -; Aliases -; format-ignore -(call - target: - ((identifier) @_identifier - (#any-of? @_identifier "require" "alias" "use" "import")) - (arguments - [ - (alias) @local.definition.import - (_ (alias) @local.definition.import) - (_ (_ (alias) @local.definition.import)) - (_ (_ (_ (alias) @local.definition.import))) - (_ (_ (_ (_ (alias) @local.definition.import)))) - ])) - -; Local Function Definitions & Scopes -; format-ignore -(call - target: - ((identifier) @_identifier - (#any-of? @_identifier "def" "defp" "defmacro" "defmacrop" "defguard" "defguardp" "defn" "defnp" "for")) - (arguments - [ - (identifier) @local.definition.function - (binary_operator - left: (identifier) @local.definition.function - operator: "when") - (binary_operator - (identifier) @local.definition.parameter) - (call - target: (identifier) @local.definition.function - (arguments - [ - (identifier) @local.definition.parameter - (_ (identifier) @local.definition.parameter) - (_ (_ (identifier) @local.definition.parameter)) - (_ (_ (_ (identifier) @local.definition.parameter))) - (_ (_ (_ (_ (identifier) @local.definition.parameter)))) - (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))) - (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))) - (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))))))))))) - ])) - ]?) - (#set! definition.function.scope parent)(do_block)?) @local.scope - -; ExUnit Test Definitions & Scopes -; format-ignore -(call - target: - ((identifier) @_identifier - (#eq? @_identifier "test")) - (arguments - [ - (string) - ((string) - . - "," - . - [ - (identifier) @local.definition.parameter - (_ (identifier) @local.definition.parameter) - (_ (_ (identifier) @local.definition.parameter)) - (_ (_ (_ (identifier) @local.definition.parameter))) - (_ (_ (_ (_ (identifier) @local.definition.parameter)))) - (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))) - (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))) - (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter))))))))))))))))))) - (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (_ (identifier) @local.definition.parameter)))))))))))))))))))) - ]) - ]) - (do_block)?) @local.scope - -; Stab Clause Scopes -(stab_clause) @local.scope diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/tags.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/tags.scm deleted file mode 100644 index 3408b7f..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-elixir/tags.scm +++ /dev/null @@ -1,54 +0,0 @@ -; Definitions - -; * modules and protocols -(call - target: (identifier) @ignore - (arguments (alias) @name) - (#match? @ignore "^(defmodule|defprotocol)$")) @definition.module - -; * functions/macros -(call - target: (identifier) @ignore - (arguments - [ - ; zero-arity functions with no parentheses - (identifier) @name - ; regular function clause - (call target: (identifier) @name) - ; function clause with a guard clause - (binary_operator - left: (call target: (identifier) @name) - operator: "when") - ]) - (#match? @ignore "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @definition.function - -; References - -; ignore calls to kernel/special-forms keywords -(call - target: (identifier) @ignore - (#match? @ignore "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp|defmodule|defprotocol|defimpl|defstruct|defexception|defoverridable|alias|case|cond|else|for|if|import|quote|raise|receive|require|reraise|super|throw|try|unless|unquote|unquote_splicing|use|with)$")) - -; ignore module attributes -(unary_operator - operator: "@" - operand: (call - target: (identifier) @ignore)) - -; * function call -(call - target: [ - ; local - (identifier) @name - ; remote - (dot - right: (identifier) @name) - ]) @reference.call - -; * pipe into function call -(binary_operator - operator: "|>" - right: (identifier) @name) @reference.call - -; * modules -(alias) @name @reference.module diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-go-mod/highlights.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-go-mod/highlights.scm deleted file mode 100644 index 0d3e0ca..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-go-mod/highlights.scm +++ /dev/null @@ -1,18 +0,0 @@ -[ - "require" - "replace" - "go" - "toolchain" - "exclude" - "retract" - "module" -] @keyword - -"=>" @operator - -(comment) @comment - -[ -(version) -(go_version) -] @string diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-go-mod/structure.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-go-mod/structure.scm deleted file mode 100644 index 0df01ea..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-go-mod/structure.scm +++ /dev/null @@ -1,29 +0,0 @@ -(require_directive - "require" @structure.anchor - ("(") @structure.open - (")") @structure.close -) - -(exclude_directive - "exclude" @structure.anchor - ("(") @structure.open - (")") @structure.close -) - -(module_directive - "module" @structure.anchor - ("(") @structure.open - (")") @structure.close -) - -(replace_directive - "replace" @structure.anchor - ("(") @structure.open - (")") @structure.close -) - -(retract_directive - "retract" @structure.anchor - ("(") @structure.open - (")") @structure.close -) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-go/folds.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-go/folds.scm deleted file mode 100644 index f29e495..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-go/folds.scm +++ /dev/null @@ -1,34 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -[ - (const_declaration) - (expression_switch_statement) - (expression_case) - (default_case) - (type_switch_statement) - (type_case) - (for_statement) - (func_literal) - (function_declaration) - (if_statement) - (import_declaration) - (method_declaration) - (type_declaration) - (var_declaration) - (composite_literal) - (literal_element) - (block) -] @fold diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-go/highlights.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-go/highlights.scm deleted file mode 100644 index 7e1d625..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-go/highlights.scm +++ /dev/null @@ -1,123 +0,0 @@ -; Function calls - -(call_expression - function: (identifier) @function.builtin - (.match? @function.builtin "^(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)$")) - -(call_expression - function: (identifier) @function) - -(call_expression - function: (selector_expression - field: (field_identifier) @function.method)) - -; Function definitions - -(function_declaration - name: (identifier) @function) - -(method_declaration - name: (field_identifier) @function.method) - -; Identifiers - -(type_identifier) @type -(field_identifier) @property -(identifier) @variable - -; Operators - -[ - "--" - "-" - "-=" - ":=" - "!" - "!=" - "..." - "*" - "*" - "*=" - "/" - "/=" - "&" - "&&" - "&=" - "%" - "%=" - "^" - "^=" - "+" - "++" - "+=" - "<-" - "<" - "<<" - "<<=" - "<=" - "=" - "==" - ">" - ">=" - ">>" - ">>=" - "|" - "|=" - "||" - "~" -] @operator - -; Keywords - -[ - "break" - "case" - "chan" - "const" - "continue" - "default" - "defer" - "else" - "fallthrough" - "for" - "func" - "go" - "goto" - "if" - "import" - "interface" - "map" - "package" - "range" - "return" - "select" - "struct" - "switch" - "type" - "var" -] @keyword - -; Literals - -[ - (interpreted_string_literal) - (raw_string_literal) - (rune_literal) -] @string - -(escape_sequence) @escape - -[ - (int_literal) - (float_literal) - (imaginary_literal) -] @number - -[ - (true) - (false) - (nil) - (iota) -] @constant.builtin - -(comment) @comment diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-go/indents.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-go/indents.scm deleted file mode 100644 index 1cca73f..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-go/indents.scm +++ /dev/null @@ -1,63 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -[ - (import_declaration) - (const_declaration) - (var_declaration) - (type_declaration) - (func_literal) - (literal_value) - (expression_case) - (communication_case) - (type_case) - (default_case) - (block) - (call_expression) - (parameter_list) - (field_declaration_list) - (interface_type) -] @indent.begin - -(literal_value - "}" @indent.branch) - -(block - "}" @indent.branch) - -(field_declaration_list - "}" @indent.branch) - -(interface_type - "}" @indent.branch) - -(const_declaration - ")" @indent.branch) - -(import_spec_list - ")" @indent.branch) - -(var_spec_list - ")" @indent.branch) - -[ - "}" - ")" -] @indent.end - -(parameter_list - ")" @indent.branch) - -(comment) @indent.ignore diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-go/injections.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-go/injections.scm deleted file mode 100644 index d8d0e1b..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-go/injections.scm +++ /dev/null @@ -1,57 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -((comment) @injection.content - (#set! injection.language "comment")) - -(call_expression - (selector_expression) @_function - (#any-of? @_function - "regexp.Match" "regexp.MatchReader" "regexp.MatchString" "regexp.Compile" "regexp.CompilePOSIX" - "regexp.MustCompile" "regexp.MustCompilePOSIX") - (argument_list - . - [ - (raw_string_literal - (raw_string_literal_content) @injection.content) - (interpreted_string_literal - (interpreted_string_literal_content) @injection.content) - ] - (#set! injection.language "regex"))) - -((comment) @injection.content - (#match? @injection.content "/\\*!([a-zA-Z]+:)?re2c") - (#set! injection.language "re2c")) - -((call_expression - function: (selector_expression - field: (field_identifier) @_method) - arguments: (argument_list - . - (interpreted_string_literal - (interpreted_string_literal_content) @injection.content))) - (#any-of? @_method "Printf" "Sprintf" "Fatalf" "Scanf" "Errorf" "Skipf" "Logf") - (#set! injection.language "printf")) - -((call_expression - function: (selector_expression - field: (field_identifier) @_method) - arguments: (argument_list - (_) - . - (interpreted_string_literal - (interpreted_string_literal_content) @injection.content))) - (#any-of? @_method "Fprintf" "Fscanf" "Appendf" "Sscanf") - (#set! injection.language "printf")) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-go/locals.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-go/locals.scm deleted file mode 100644 index 99cfc85..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-go/locals.scm +++ /dev/null @@ -1,103 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -((function_declaration - name: (identifier) @local.definition.function) ; @function - ) - -((method_declaration - name: (field_identifier) @local.definition.method) ; @function.method - ) - -(short_var_declaration - left: (expression_list - (identifier) @local.definition.var)) - -(var_spec - name: (identifier) @local.definition.var) - -(parameter_declaration - (identifier) @local.definition.var) - -(variadic_parameter_declaration - (identifier) @local.definition.var) - -(for_statement - (range_clause - left: (expression_list - (identifier) @local.definition.var))) - -(const_declaration - (const_spec - name: (identifier) @local.definition.var)) - -(type_declaration - (type_spec - name: (type_identifier) @local.definition.type)) - -; reference -(identifier) @local.reference - -(type_identifier) @local.reference - -(field_identifier) @local.reference - -((package_identifier) @local.reference - (#set! reference.kind "namespace")) - -(package_clause - (package_identifier) @local.definition.namespace) - -(import_spec_list - (import_spec - name: (package_identifier) @local.definition.namespace)) - -; Call references -((call_expression - function: (identifier) @local.reference) - (#set! reference.kind "call")) - -((call_expression - function: (selector_expression - field: (field_identifier) @local.reference)) - (#set! reference.kind "call")) - -((call_expression - function: (parenthesized_expression - (identifier) @local.reference)) - (#set! reference.kind "call")) - -((call_expression - function: (parenthesized_expression - (selector_expression - field: (field_identifier) @local.reference))) - (#set! reference.kind "call")) - -; Scopes -(func_literal) @local.scope - -(source_file) @local.scope - -(function_declaration) @local.scope - -(if_statement) @local.scope - -(block) @local.scope - -(expression_switch_statement) @local.scope - -(for_statement) @local.scope - -(method_declaration) @local.scope diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-go/structure.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-go/structure.scm deleted file mode 100644 index b86a123..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-go/structure.scm +++ /dev/null @@ -1,175 +0,0 @@ -(import_declaration - "import" @structure.anchor - (import_spec_list - "(" @structure.open - ")" @structure.close - ) -) - -(function_declaration - "func" @structure.anchor - body: (block - "{" @structure.open - "}" @structure.close - ) -) - -(function_declaration - (identifier) @structure.anchor - (parameter_list - "(" @structure.open - ("," @structure.separator (_))* - ")" @structure.close - ) -) - -(method_declaration - "func" @structure.anchor - body: (block - "{" @structure.open - "}" @structure.close - ) -) - -(call_expression - function: (_) @structure.anchor - (argument_list - "(" @structure.open - ("," @structure.separator (_))* - ","? @structure.separator - ")" @structure.close - ) -) - -(composite_literal - type: (_) @structure.anchor - body: (literal_value - "{" @structure.open - ("," @structure.separator (_)?)* - "}" @structure.close - ) -) - -(literal_value - "{" @structure.anchor - ("," @structure.separator (_)?)* - "}" @structure.close -) - -(if_statement - ["if" "else"] @structure.anchor - (block - "{" @structure.open - "}" @structure.close - ) -) - -(if_statement - "else" @structure.anchor - (if_statement - "if" - (block - "{" @structure.open - "}" @structure.close - ) - ) -) - -(expression_switch_statement - "switch" @structure.anchor - "{" @structure.open - "}" @structure.close -) - -(expression_switch_statement - (expression_case - "case" @structure.anchor - ":" @structure.open - ) - . - [ - (expression_case "case" @structure.limit) - (default_case "default" @structure.limit) - ] -) - - (expression_switch_statement - (default_case "default" @structure.anchor) - "}" @structure.limit - ) - -(type_switch_statement - "switch" @structure.anchor - "{" @structure.open - "}" @structure.close -) - -(type_switch_statement - (type_case - "case" @structure.anchor - ":" @structure.open - ) - . - [ - (type_case "case" @structure.limit) - (default_case "default" @structure.limit) - ] -) - -(select_statement - "select" @structure.anchor - "{" @structure.open - "}" @structure.close -) - -(func_literal - "func" @structure.anchor - (block - "{" @structure.open - "}" @structure.close - ) -) - -(for_statement - "for" @structure.anchor - (block - "{" @structure.open - "}" @structure.close - ) -) - -(type_declaration - "type" @structure.anchor - (type_spec - (struct_type - (field_declaration_list - "{" @structure.open - "}" @structure.close - ) - ) - ) -) - -(struct_type - "struct" @structure.anchor - (field_declaration_list - "{" @structure.open - "}" @structure.close - ) -) - -(type_declaration - "type" @structure.anchor - (type_spec - (interface_type - "{" @structure.open - "}" @structure.close - ) - ) -) - -(interface_type - "interface" @structure.anchor - "{" @structure.open - "}" @structure.close -) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-go/tags.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-go/tags.scm deleted file mode 100644 index d87008a..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-go/tags.scm +++ /dev/null @@ -1,30 +0,0 @@ -( - (comment)* @doc - . - (function_declaration - name: (identifier) @name) @definition.function - (#strip! @doc "^//\\s*") - (#set-adjacent! @doc @definition.function) -) - -( - (comment)* @doc - . - (method_declaration - name: (field_identifier) @name) @definition.method - (#strip! @doc "^//\\s*") - (#set-adjacent! @doc @definition.method) -) - -(call_expression - function: [ - (identifier) @name - (parenthesized_expression (identifier) @name) - (selector_expression field: (field_identifier) @name) - (parenthesized_expression (selector_expression field: (field_identifier) @name)) - ]) @reference.call - -(type_spec - name: (type_identifier) @name) @definition.type - -(type_identifier) @name @reference.type diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-haskell/folds.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-haskell/folds.scm deleted file mode 100644 index d2416bd..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-haskell/folds.scm +++ /dev/null @@ -1,21 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -[ - (apply) - (do) - (function) - (import)+ -] @fold diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-haskell/highlights.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-haskell/highlights.scm deleted file mode 100644 index 3ab843e..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-haskell/highlights.scm +++ /dev/null @@ -1,156 +0,0 @@ -;; Copyright 2022 nvim-treesitter -;; -;; Licensed under the Apache License, Version 2.0 (the "License"); -;; you may not use this file except in compliance with the License. -;; You may obtain a copy of the License at -;; -;; http://www.apache.org/licenses/LICENSE-2.0 -;; -;; Unless required by applicable law or agreed to in writing, software -;; distributed under the License is distributed on an "AS IS" BASIS, -;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -;; See the License for the specific language governing permissions and -;; limitations under the License. - -;; ---------------------------------------------------------------------------- -;; Literals and comments - -(integer) @number -(exp_negation) @number -(exp_literal (float)) @float -(char) @character -(string) @string - -(con_unit) @symbol ; unit, as in () - -(comment) @comment - - -;; ---------------------------------------------------------------------------- -;; Punctuation - -[ - "(" - ")" - "{" - "}" - "[" - "]" -] @punctuation.bracket - -[ - (comma) - ";" -] @punctuation.delimiter - - -;; ---------------------------------------------------------------------------- -;; Keywords, operators, includes - -[ - "forall" - "∀" -] @repeat - -(pragma) @constant.macro - -[ - "if" - "then" - "else" - "case" - "of" -] @conditional - -(exp_lambda_cases "\\" ("cases" @conditional)) - -[ - "import" - "qualified" - "module" -] @include - -[ - (operator) - (constructor_operator) - (type_operator) - (tycon_arrow) - (qualified_module) ; grabs the `.` (dot), ex: import System.IO - (all_names) - (wildcard) - "=" - "|" - "::" - "=>" - "->" - "<-" - "\\" - "`" - "@" -] @operator - -(module) @namespace - -[ - (where) - "let" - "in" - "class" - "instance" - "data" - "newtype" - "family" - "type" - "as" - "hiding" - "deriving" - "via" - "stock" - "anyclass" - "do" - "mdo" - "rec" - "infix" - "infixl" - "infixr" -] @keyword - - -;; ---------------------------------------------------------------------------- -;; Functions and variables - -(variable) @variable -(pat_wildcard) @variable - -(signature name: (variable) @type) -(function - name: (variable) @function - patterns: (patterns)) -((signature (fun)) . (function (variable) @function)) -((signature (context (fun))) . (function (variable) @function)) -((signature (forall (context (fun)))) . (function (variable) @function)) - -(exp_infix (variable) @operator) ; consider infix functions as operators - -(exp_infix (exp_name) @function (#set! "priority" 101)) -(exp_apply . (exp_name (variable) @function)) -(exp_apply . (exp_name (qualified_variable (variable) @function))) - - -;; ---------------------------------------------------------------------------- -;; Types - -(type) @type -(type_variable) @type - -(constructor) @constructor - -; True or False -((constructor) @_bool (#match? @_bool "(True|False)")) @boolean - - -;; ---------------------------------------------------------------------------- -;; Quasi-quotes - -(quoter) @function -; Highlighting of quasiquote_body is handled by injections.scm diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-haskell/injections.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-haskell/injections.scm deleted file mode 100644 index ec87c96..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-haskell/injections.scm +++ /dev/null @@ -1,99 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -; ----------------------------------------------------------------------------- -; General language injection -(quasiquote - (quoter) @injection.language - (quasiquote_body) @injection.content) - -((comment) @injection.content - (#set! injection.language "comment")) - -; ----------------------------------------------------------------------------- -; shakespeare library -; NOTE: doesn't support templating -; TODO: add once CoffeeScript parser is added -; ; CoffeeScript: Text.Coffee -; (quasiquote -; (quoter) @_name -; (#eq? @_name "coffee") -; ((quasiquote_body) @injection.content -; (#set! injection.language "coffeescript"))) -; CSS: Text.Cassius, Text.Lucius -(quasiquote - (quoter) @_name - (#any-of? @_name "cassius" "lucius") - (quasiquote_body) @injection.content - (#set! injection.language "css")) - -; HTML: Text.Hamlet -(quasiquote - (quoter) @_name - (#any-of? @_name "shamlet" "xshamlet" "hamlet" "xhamlet" "ihamlet") - (quasiquote_body) @injection.content - (#set! injection.language "html")) - -; JS: Text.Julius -(quasiquote - (quoter) @_name - (#any-of? @_name "js" "julius") - (quasiquote_body) @injection.content - (#set! injection.language "javascript")) - -; TS: Text.TypeScript -(quasiquote - (quoter) @_name - (#any-of? @_name "tsc" "tscJSX") - (quasiquote_body) @injection.content - (#set! injection.language "typescript")) - -; ----------------------------------------------------------------------------- -; HSX -(quasiquote - (quoter) @_name - (#eq? @_name "hsx") - (quasiquote_body) @injection.content - (#set! injection.language "html")) - -; ----------------------------------------------------------------------------- -; Inline JSON from aeson -(quasiquote - (quoter) @_name - (#eq? @_name "aesonQQ") - (quasiquote_body) @injection.content - (#set! injection.language "json")) - -; ----------------------------------------------------------------------------- -; SQL -; postgresql-simple -(quasiquote - (quoter) @injection.language - (#eq? @injection.language "sql") - (quasiquote_body) @injection.content) - -(quasiquote - (quoter) @_name - (#any-of? @_name "persistUpperCase" "persistLowerCase" "persistWith") - (quasiquote_body) @injection.content - (#set! injection.language "haskell_persistent")) - -; ----------------------------------------------------------------------------- -; Python -; inline-python -(quasiquote - (quoter) @injection.language - (#any-of? @injection.language "pymain" "pye" "py_" "pyf") - (quasiquote_body) @injection.content) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-haskell/locals.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-haskell/locals.scm deleted file mode 100644 index ad67fe4..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-haskell/locals.scm +++ /dev/null @@ -1,4 +0,0 @@ -(signature name: (variable)) @local.definition -(function name: (variable)) @local.definition -(pat_name (variable)) @local.definition -(exp_name (variable)) @local.reference diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-html/folds.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-html/folds.scm deleted file mode 100644 index f3eaa37..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-html/folds.scm +++ /dev/null @@ -1,20 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -[ - (element) - (style_element) - (script_element) -] @fold diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-html/highlights.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-html/highlights.scm deleted file mode 100644 index ea0ff4e..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-html/highlights.scm +++ /dev/null @@ -1,13 +0,0 @@ -(tag_name) @tag -(erroneous_end_tag_name) @tag.error -(doctype) @constant -(attribute_name) @attribute -(attribute_value) @string -(comment) @comment - -[ - "<" - ">" - "" -] @punctuation.bracket diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-html/indents.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-html/indents.scm deleted file mode 100644 index ccc3753..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-html/indents.scm +++ /dev/null @@ -1,16 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -; inherits: html_tags diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-html/injections.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-html/injections.scm deleted file mode 100644 index 71e7c3a..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-html/injections.scm +++ /dev/null @@ -1,7 +0,0 @@ -((script_element - (raw_text) @injection.content) - (#set! injection.language "javascript")) - -((style_element - (raw_text) @injection.content) - (#set! injection.language "css")) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-html/locals.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-html/locals.scm deleted file mode 100644 index 10428a4..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-html/locals.scm +++ /dev/null @@ -1,16 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -(element) @local.scope diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-java/folds.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-java/folds.scm deleted file mode 100644 index 28c8220..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-java/folds.scm +++ /dev/null @@ -1,23 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -[ - (block) - (class_body) - (constructor_declaration) - (argument_list) - (annotation_argument_list) - (import_declaration)+ -] @fold diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-java/highlights.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-java/highlights.scm deleted file mode 100644 index 301245b..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-java/highlights.scm +++ /dev/null @@ -1,142 +0,0 @@ -; Methods - -(method_declaration - name: (identifier) @function.method) -(method_invocation - name: (identifier) @function.method) -(super) @function.builtin - -; Annotations - -(annotation - name: (identifier) @attribute) -(marker_annotation - name: (identifier) @attribute) - -"@" @operator - -; Types - -(type_identifier) @type - -(interface_declaration - name: (identifier) @type) -(class_declaration - name: (identifier) @type) -(enum_declaration - name: (identifier) @type) - -((field_access - object: (identifier) @type) - (#match? @type "^[A-Z]")) -((scoped_identifier - scope: (identifier) @type) - (#match? @type "^[A-Z]")) -((method_invocation - object: (identifier) @type) - (#match? @type "^[A-Z]")) -((method_reference - . (identifier) @type) - (#match? @type "^[A-Z]")) - -(constructor_declaration - name: (identifier) @type) - -[ - (boolean_type) - (integral_type) - (floating_point_type) - (floating_point_type) - (void_type) -] @type.builtin - -; Variables - -((identifier) @constant - (#match? @constant "^_*[A-Z][A-Z\\d_]+$")) - -(identifier) @variable - -(this) @variable.builtin - -; Literals - -[ - (hex_integer_literal) - (decimal_integer_literal) - (octal_integer_literal) - (decimal_floating_point_literal) - (hex_floating_point_literal) -] @number - -[ - (character_literal) - (string_literal) -] @string -(escape_sequence) @string.escape - -[ - (true) - (false) - (null_literal) -] @constant.builtin - -[ - (line_comment) - (block_comment) -] @comment - -; Keywords - -[ - "abstract" - "assert" - "break" - "case" - "catch" - "class" - "continue" - "default" - "do" - "else" - "enum" - "exports" - "extends" - "final" - "finally" - "for" - "if" - "implements" - "import" - "instanceof" - "interface" - "module" - "native" - "new" - "non-sealed" - "open" - "opens" - "package" - "private" - "protected" - "provides" - "public" - "requires" - "record" - "return" - "sealed" - "static" - "strictfp" - "switch" - "synchronized" - "throw" - "throws" - "to" - "transient" - "transitive" - "try" - "uses" - "volatile" - "while" - "with" -] @keyword diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-java/indents.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-java/indents.scm deleted file mode 100644 index 3ff8bbb..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-java/indents.scm +++ /dev/null @@ -1,55 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -; format-ignore -[ - ; ... refers to the portion that this indent query will have effects on - (class_body) ; { ... } of `class X` - (enum_body) ; { ... } of `enum X` - (interface_body) ; { ... } of `interface X` - (constructor_body) ; { `modifier` X() {...} } inside `class X` - (annotation_type_body) ; { ... } of `@interface X` - (block) ; { ... } that's not mentioned in this scope - (switch_block) ; { ... } in `switch X` - (array_initializer) ; [1, 2] - (argument_list) ; foo(...) - (formal_parameters) ; method foo(...) - (annotation_argument_list) ; @Annotation(...) - (element_value_array_initializer) ; { a, b } inside @Annotation() -] @indent.begin - -(expression_statement - (method_invocation) @indent.begin) - -[ - "(" - ")" - "{" - "}" - "[" - "]" -] @indent.branch - -(annotation_argument_list - ")" @indent.end) ; This should be a special cased as `()` here doesn't have ending `;` - -"}" @indent.end - -(line_comment) @indent.ignore - -[ - (ERROR) - (block_comment) -] @indent.auto diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-java/injections.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-java/injections.scm deleted file mode 100644 index 4ff41ad..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-java/injections.scm +++ /dev/null @@ -1,46 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -([ - (block_comment) - (line_comment) -] @injection.content - (#set! injection.language "comment")) - -((block_comment) @injection.content - (#lua-match? @injection.content "/[*][*][%s]") - (#set! injection.language "javadoc")) - -; markdown-style javadocs https://openjdk.org/jeps/467 -((line_comment) @injection.content - (#lua-match? @injection.content "^///%s") - (#set! injection.language "javadoc")) - -((method_invocation - name: (identifier) @_method - arguments: (argument_list - . - (string_literal - . - (_) @injection.content))) - (#any-of? @_method "format" "printf") - (#set! injection.language "printf")) - -((method_invocation - object: (string_literal - (string_fragment) @injection.content) - name: (identifier) @_method) - (#eq? @_method "formatted") - (#set! injection.language "printf")) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-java/locals.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-java/locals.scm deleted file mode 100644 index a6b1dad..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-java/locals.scm +++ /dev/null @@ -1,115 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -; SCOPES -; declarations -(program) @local.scope - -(class_declaration - body: (_) @local.scope) - -(record_declaration - body: (_) @local.scope) - -(enum_declaration - body: (_) @local.scope) - -(lambda_expression) @local.scope - -(enhanced_for_statement) @local.scope - -; block -(block) @local.scope - -; if/else -(if_statement) @local.scope ; if+else - -(if_statement - consequence: (_) @local.scope) ; if body in case there are no braces - -(if_statement - alternative: (_) @local.scope) ; else body in case there are no braces - -; try/catch -(try_statement) @local.scope ; covers try+catch, individual try and catch are covered by (block) - -(catch_clause) @local.scope ; needed because `Exception` variable - -; loops -(for_statement) @local.scope ; whole for_statement because loop iterator variable - -(for_statement - ; "for" body in case there are no braces - body: (_) @local.scope) - -(do_statement - body: (_) @local.scope) - -(while_statement - body: (_) @local.scope) - -; Functions -(constructor_declaration) @local.scope - -(method_declaration) @local.scope - -; DEFINITIONS -(package_declaration - (identifier) @local.definition.namespace) - -(class_declaration - name: (identifier) @local.definition.type) - -(record_declaration - name: (identifier) @local.definition.type) - -(enum_declaration - name: (identifier) @local.definition.enum) - -(method_declaration - name: (identifier) @local.definition.method) - -(local_variable_declaration - declarator: (variable_declarator - name: (identifier) @local.definition.var)) - -(enhanced_for_statement - ; for (var item : items) { - name: (identifier) @local.definition.var) - -(formal_parameter - name: (identifier) @local.definition.parameter) - -(catch_formal_parameter - name: (identifier) @local.definition.parameter) - -(inferred_parameters - (identifier) @local.definition.parameter) ; (x,y) -> ... - -(lambda_expression - parameters: (identifier) @local.definition.parameter) ; x -> ... - -((scoped_identifier - (identifier) @local.definition.import) - (#has-ancestor? @local.definition.import import_declaration)) - -(field_declaration - declarator: (variable_declarator - name: (identifier) @local.definition.field)) - -; REFERENCES -(identifier) @local.reference - -(type_identifier) @local.reference diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-java/tags.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-java/tags.scm deleted file mode 100644 index 3f3eb40..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-java/tags.scm +++ /dev/null @@ -1,20 +0,0 @@ -(class_declaration - name: (identifier) @name) @definition.class - -(method_declaration - name: (identifier) @name) @definition.method - -(method_invocation - name: (identifier) @name - arguments: (argument_list) @reference.call) - -(interface_declaration - name: (identifier) @name) @definition.interface - -(type_list - (type_identifier) @name) @reference.implementation - -(object_creation_expression - type: (type_identifier) @name) @reference.class - -(superclass (type_identifier) @name) @reference.class diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/folds.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/folds.scm deleted file mode 100644 index e0aa637..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/folds.scm +++ /dev/null @@ -1,16 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -; inherits: ecma,jsx diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/highlights-jsx.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/highlights-jsx.scm deleted file mode 100644 index 0bdd886..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/highlights-jsx.scm +++ /dev/null @@ -1,8 +0,0 @@ -(jsx_opening_element (identifier) @tag (#match? @tag "^[a-z][^.]*$")) -(jsx_closing_element (identifier) @tag (#match? @tag "^[a-z][^.]*$")) -(jsx_self_closing_element (identifier) @tag (#match? @tag "^[a-z][^.]*$")) - -(jsx_attribute (property_identifier) @attribute) -(jsx_opening_element (["<" ">"]) @punctuation.bracket) -(jsx_closing_element ([""]) @punctuation.bracket) -(jsx_self_closing_element (["<" "/>"]) @punctuation.bracket) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/highlights-params.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/highlights-params.scm deleted file mode 100644 index 95ffc72..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/highlights-params.scm +++ /dev/null @@ -1,12 +0,0 @@ -(formal_parameters - [ - (identifier) @variable.parameter - (array_pattern - (identifier) @variable.parameter) - (object_pattern - [ - (pair_pattern value: (identifier) @variable.parameter) - (shorthand_property_identifier_pattern) @variable.parameter - ]) - ] -) diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/highlights.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/highlights.scm deleted file mode 100644 index 613a49a..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/highlights.scm +++ /dev/null @@ -1,205 +0,0 @@ -; Special identifiers -;-------------------- - -([ - (identifier) - (shorthand_property_identifier) - (shorthand_property_identifier_pattern) - ] @constant - (#match? @constant "^[A-Z_][A-Z\\d_]+$")) - - -((identifier) @constructor - (#match? @constructor "^[A-Z]")) - -((identifier) @variable.builtin - (#match? @variable.builtin "^(arguments|module|console|window|document)$") - (#is-not? local)) - -((identifier) @function.builtin - (#eq? @function.builtin "require") - (#is-not? local)) - -; Function and method definitions -;-------------------------------- - -(function - name: (identifier) @function) -(function_declaration - name: (identifier) @function) -(method_definition - name: (property_identifier) @function.method) - -(pair - key: (property_identifier) @function.method - value: [(function) (arrow_function)]) - -(assignment_expression - left: (member_expression - property: (property_identifier) @function.method) - right: [(function) (arrow_function)]) - -(variable_declarator - name: (identifier) @function - value: [(function) (arrow_function)]) - -(assignment_expression - left: (identifier) @function - right: [(function) (arrow_function)]) - -; Function and method calls -;-------------------------- - -(call_expression - function: (identifier) @function) - -(call_expression - function: (member_expression - property: (property_identifier) @function.method)) - -; Variables -;---------- - -(identifier) @variable - -; Properties -;----------- - -(property_identifier) @property - -; Literals -;--------- - -(this) @variable.builtin -(super) @variable.builtin - -[ - (true) - (false) - (null) - (undefined) -] @constant.builtin - -(comment) @comment - -[ - (string) - (template_string) -] @string - -(regex) @string.special -(number) @number - -; Tokens -;------- - -(template_substitution - "${" @punctuation.special - "}" @punctuation.special) @embedded - -[ - ";" - (optional_chain) - "." - "," -] @punctuation.delimiter - -[ - "-" - "--" - "-=" - "+" - "++" - "+=" - "*" - "*=" - "**" - "**=" - "/" - "/=" - "%" - "%=" - "<" - "<=" - "<<" - "<<=" - "=" - "==" - "===" - "!" - "!=" - "!==" - "=>" - ">" - ">=" - ">>" - ">>=" - ">>>" - ">>>=" - "~" - "^" - "&" - "|" - "^=" - "&=" - "|=" - "&&" - "||" - "??" - "&&=" - "||=" - "??=" -] @operator - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -[ - "as" - "async" - "await" - "break" - "case" - "catch" - "class" - "const" - "continue" - "debugger" - "default" - "delete" - "do" - "else" - "export" - "extends" - "finally" - "for" - "from" - "function" - "get" - "if" - "import" - "in" - "instanceof" - "let" - "new" - "of" - "return" - "set" - "static" - "switch" - "target" - "throw" - "try" - "typeof" - "var" - "void" - "while" - "with" - "yield" -] @keyword diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/indents.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/indents.scm deleted file mode 100644 index e0aa637..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/indents.scm +++ /dev/null @@ -1,16 +0,0 @@ -; Copyright 2025 nvim-treesitter -; -; Licensed under the Apache License, Version 2.0 (the "License"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - -; inherits: ecma,jsx diff --git a/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/injections.scm b/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/injections.scm deleted file mode 100644 index 178188c..0000000 --- a/Sources/CodeEditLanguages/Resources/tree-sitter-javascript/injections.scm +++ /dev/null @@ -1,32 +0,0 @@ -; Parse the contents of tagged template literals using -; a language inferred from the tag. - -(call_expression - function: [ - (identifier) @injection.language - (member_expression - property: (property_identifier) @injection.language) - ] - arguments: (template_string) @injection.content) - -; Parse regex syntax within regex literals - -((regex_pattern) @injection.content - (#set! injection.language "regex")) - - ; Parse JSDoc annotations in comments - -((comment) @injection.content - (#set! injection.language "jsdoc")) - -; Parse Ember/Glimmer/Handlebars/HTMLBars/etc. template literals -; e.g.: await render(hbs``) -(call_expression - function: ((identifier) @_name - (#eq? @_name "hbs")) - arguments: ((template_string) @glimmer - (#offset! @glimmer 0 1 0 -1))) - -; Ember Unified