Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modifiedCodeLanguagesContainer.xcframework.zip
Binary file not shown.
98 changes: 62 additions & 36 deletions Sources/CodeEditLanguages/CodeLanguage+Definitions.swift
Original file line numberDiff line numberDiff line change
Expand Up@@ -62,7 +62,8 @@ public extension CodeLanguage{
tsName: "agda",
extensions: ["agda"],
lineCommentString: "--",
rangeCommentStrings: ("{-", "-}")
rangeCommentStrings: ("{-", "-}"),
highlights: ["folds", "injections"]
)

/// A language structure for `Bash`
Expand All@@ -71,7 +72,8 @@ public extension CodeLanguage{
tsName: "bash",
extensions: ["sh", "bash"],
lineCommentString: "#",
rangeCommentStrings: (":'", "'")
rangeCommentStrings: (":'", "'"),
highlights: ["folds", "injections", "locals"]
)

/// A language structure for `C`
Expand All@@ -80,7 +82,8 @@ public extension CodeLanguage{
tsName: "c",
extensions: ["c", "h"],
lineCommentString: "//",
rangeCommentStrings: ("/*", "*/")
rangeCommentStrings: ("/*", "*/"),
highlights: ["folds", "indents", "injections", "locals", "tags"]
)

/// A language structure for `C++`
Expand All@@ -92,7 +95,7 @@ public extension CodeLanguage{
rangeCommentStrings: CodeLanguage.c.rangeCommentStrings,
documentationCommentStrings: [.pair(("/**", "*/"))],
parentURL: CodeLanguage.c.queryURL,
highlights: ["injections"]
highlights: ["folds", "indents", "injections", "locals", "tags"]
)

/// A language structure for `C#`
Expand All@@ -101,7 +104,8 @@ public extension CodeLanguage{
tsName: "c-sharp",
extensions: ["cs"],
lineCommentString: "//",
rangeCommentStrings: ("/*", "*/")
rangeCommentStrings: ("/*", "*/"),
highlights: ["folds", "injections", "locals", "tags"]
)

/// A language structure for `CSS`
Expand All@@ -110,7 +114,8 @@ public extension CodeLanguage{
tsName: "css",
extensions: ["css"],
lineCommentString: "",
rangeCommentStrings: ("/*", "*/")
rangeCommentStrings: ("/*", "*/"),
highlights: ["folds", "indents", "injections"]
)

/// A language structure for `Dart`
Expand All@@ -119,7 +124,8 @@ public extension CodeLanguage{
tsName: "dart",
extensions: ["dart"],
lineCommentString: "//",
rangeCommentStrings: ("/*", "*/")
rangeCommentStrings: ("/*", "*/"),
highlights: ["folds", "indents", "injections", "locals", "tags"]
)

/// A language structure for `Dockerfile`
Expand All@@ -128,7 +134,8 @@ public extension CodeLanguage{
tsName: "dockerfile",
extensions: ["Dockerfile"],
lineCommentString: "#",
rangeCommentStrings: ("", "")
rangeCommentStrings: ("", ""),
highlights: ["injections"]
)

/// A language structure for `Elixir`
Expand All@@ -139,7 +146,7 @@ public extension CodeLanguage{
lineCommentString: "#",
rangeCommentStrings: ("", ""),
documentationCommentStrings: [.pair(("\"\"\"", "\"\"\""))],
highlights: ["injections"]
highlights: ["folds", "indents", "injections", "locals", "tags"]
)

/// A language structure for `Go`
Expand All@@ -148,7 +155,8 @@ public extension CodeLanguage{
tsName: "go",
extensions: ["go"],
lineCommentString: "//",
rangeCommentStrings: ("/*", "*/")
rangeCommentStrings: ("/*", "*/"),
highlights: ["folds", "indents", "injections", "locals", "tags"]
)

/// A language structure for `GoMod`
Expand All@@ -166,7 +174,8 @@ public extension CodeLanguage{
tsName: "haskell",
extensions: ["hs"],
lineCommentString: "--",
rangeCommentStrings: ("{-", "-}")
rangeCommentStrings: ("{-", "-}"),
highlights: ["folds", "injections", "locals"]
)

/// A language structure for `HTML`
Expand All@@ -176,7 +185,7 @@ public extension CodeLanguage{
extensions: ["html", "htm", "shtml"],
lineCommentString: "",
rangeCommentStrings: ("<!--", "-->"),
highlights: ["injections"]
highlights: ["folds", "indents", "injections", "locals"]
)

/// A language structure for `Java`
Expand All@@ -186,7 +195,8 @@ public extension CodeLanguage{
extensions: ["java", "jav"],
lineCommentString: "//",
rangeCommentStrings: ("/*", "*/"),
documentationCommentStrings: [.pair(("/**", "*/"))]
documentationCommentStrings: [.pair(("/**", "*/"))],
highlights: ["folds", "indents", "injections", "locals", "tags"]
)

/// A language structure for `JavaScript`
Expand All@@ -197,7 +207,7 @@ public extension CodeLanguage{
lineCommentString: "//",
rangeCommentStrings: ("/*", "*/"),
documentationCommentStrings: [.pair(("/**", "*/"))],
highlights: ["injections"],
highlights: ["folds", "indents", "injections", "locals", "tags"],
additionalIdentifiers: ["node", "deno"]
)

Expand All@@ -216,7 +226,8 @@ public extension CodeLanguage{
tsName: "json",
extensions: ["json"],
lineCommentString: "//",
rangeCommentStrings: ("/*", "*/")
rangeCommentStrings: ("/*", "*/"),
highlights: ["folds", "indents", "locals"]
)

/// A language structure for `JSX`
Expand All@@ -226,7 +237,7 @@ public extension CodeLanguage{
extensions: ["jsx"],
lineCommentString: "//",
rangeCommentStrings: ("/*", "*/"),
highlights: ["highlights-jsx", "injections"]
highlights: ["folds", "highlights-jsx", "indents", "injections", "locals", "tags"]
)

/// A language structure for `Julia`
Expand All@@ -235,7 +246,8 @@ public extension CodeLanguage{
tsName: "julia",
extensions: ["jl"],
lineCommentString: "#",
rangeCommentStrings: ("#=", "=#")
rangeCommentStrings: ("#=", "=#"),
highlights: ["folds", "indents", "injections", "locals"]
)

/// A language structure for `Kotlin`
Expand All@@ -244,7 +256,8 @@ public extension CodeLanguage{
tsName: "kotlin",
extensions: ["kt", "kts"],
lineCommentString: "//",
rangeCommentStrings: ("/*", "*/")
rangeCommentStrings: ("/*", "*/"),
highlights: ["folds", "injections", "locals"]
)

/// A language structure for `Lua`
Expand All@@ -254,7 +267,7 @@ public extension CodeLanguage{
extensions: ["lua"],
lineCommentString: "--",
rangeCommentStrings: ("-[[", "]]--"),
highlights: ["injections"]
highlights: ["folds", "indents", "injections", "locals", "tags"]
)

/// A language structure for `Markdown`
Expand All@@ -264,7 +277,7 @@ public extension CodeLanguage{
extensions: ["md", "mkd", "mkdn", "mdwn", "mdown", "markdown"],
lineCommentString: "[comment]: #",
rangeCommentStrings: ("", ""),
highlights: ["injections"]
highlights: ["folds", "indents", "injections"]
)

/// A language structure for `Markdown Inline`
Expand All@@ -285,7 +298,7 @@ public extension CodeLanguage{
lineCommentString: "//",
rangeCommentStrings: ("/*", "*/"),
parentURL: CodeLanguage.c.queryURL,
highlights: ["injections"]
highlights: ["folds", "indents", "injections", "locals"]
)

/// A language structure for `OCaml`
Expand All@@ -295,7 +308,8 @@ public extension CodeLanguage{
extensions: ["ml"],
lineCommentString: "",
rangeCommentStrings: ("(*", "*)"),
documentationCommentStrings: [.pair(("(**", "*)"))]
documentationCommentStrings: [.pair(("(**", "*)"))],
highlights: ["folds", "indents", "injections", "locals", "tags"]
)

/// A language structure for `OCaml Interface`
Expand All@@ -304,7 +318,8 @@ public extension CodeLanguage{
tsName: "ocaml",
extensions: ["mli"],
lineCommentString: "",
rangeCommentStrings: ("", "")
rangeCommentStrings: ("", ""),
highlights: ["folds", "indents", "injections", "locals", "tags"]
)

/// A language structure for `Perl`
Expand All@@ -313,7 +328,8 @@ public extension CodeLanguage{
tsName: "perl",
extensions: ["pl", "pm"],
lineCommentString: "#",
rangeCommentStrings: ("=pod", "=cut")
rangeCommentStrings: ("=pod", "=cut"),
highlights: ["folds", "injections"]
)

/// A language structure for `PHP`
Expand All@@ -323,7 +339,7 @@ public extension CodeLanguage{
extensions: ["php"],
lineCommentString: "//",
rangeCommentStrings: ("/*", "*/"),
highlights: ["injections"]
highlights: ["folds", "indents", "injections", "locals", "tags"]
)

/// A language structure for `Python`
Expand All@@ -334,6 +350,7 @@ public extension CodeLanguage{
lineCommentString: "#",
rangeCommentStrings: ("", ""),
documentationCommentStrings: [.pair(("\"\"\"", "\"\"\""))],
highlights: ["folds", "indents", "injections", "locals", "tags"],
additionalIdentifiers: ["python2", "python3"]
)

Expand All@@ -352,7 +369,8 @@ public extension CodeLanguage{
tsName: "ruby",
extensions: ["rb"],
lineCommentString: "#",
rangeCommentStrings: ("=begin", "=end")
rangeCommentStrings: ("=begin", "=end"),
highlights: ["folds", "indents", "injections", "locals", "tags"]
)

/// A language structure for `Rust`
Expand All@@ -368,7 +386,7 @@ public extension CodeLanguage{
.pair(("/**", "*/")),
.pair(("/*!", "*/"))
],
highlights: ["injections"]
highlights: ["folds", "indents", "injections", "locals", "tags"]
)

/// A language structure for `Scala`
Expand All@@ -377,7 +395,8 @@ public extension CodeLanguage{
tsName: "scala",
extensions: ["scala", "sc"],
lineCommentString: "//",
rangeCommentStrings: ("/*", "*/")
rangeCommentStrings: ("/*", "*/"),
highlights: ["folds", "injections", "locals"]
)

/// A language structure for `SQL`
Expand All@@ -386,7 +405,8 @@ public extension CodeLanguage{
tsName: "sql",
extensions: ["sql"],
lineCommentString: "--",
rangeCommentStrings: ("/*", "*/")
rangeCommentStrings: ("/*", "*/"),
highlights: ["folds", "indents", "injections"]
)

/// A language structure for `Swift`
Expand All@@ -396,7 +416,8 @@ public extension CodeLanguage{
extensions: ["swift"],
lineCommentString: "//",
rangeCommentStrings: ("/*", "*/"),
documentationCommentStrings: [.single("///"), .pair(("/**", "*/"))]
documentationCommentStrings: [.single("///"), .pair(("/**", "*/"))],
highlights: ["folds", "indents", "injections", "locals", "tags"]
)

/// A language structure for `TOML`
Expand All@@ -405,7 +426,8 @@ public extension CodeLanguage{
tsName: "toml",
extensions: ["toml"],
lineCommentString: "#",
rangeCommentStrings: ("", "")
rangeCommentStrings: ("", ""),
highlights: ["folds", "indents", "injections", "locals"]
)

/// A language structure for `TSX`
Expand All@@ -415,7 +437,8 @@ public extension CodeLanguage{
extensions: ["tsx"],
lineCommentString: "//",
rangeCommentStrings: ("/*", "*/"),
parentURL: CodeLanguage.jsx.queryURL
parentURL: CodeLanguage.jsx.queryURL,
highlights: ["folds", "indents", "injections", "locals", "tags"]
)

/// A language structure for `Typescript`
Expand All@@ -425,7 +448,8 @@ public extension CodeLanguage{
extensions: ["ts", "cts", "mts"],
lineCommentString: "//",
rangeCommentStrings: ("/*", "*/"),
parentURL: CodeLanguage.javascript.queryURL
parentURL: CodeLanguage.javascript.queryURL,
highlights: ["folds", "indents", "injections", "locals", "tags"]
)

/// A language structure for `Verilog`
Expand All@@ -434,7 +458,8 @@ public extension CodeLanguage{
tsName: "verilog",
extensions: ["v"],
lineCommentString: "//",
rangeCommentStrings: ("/*", "*/")
rangeCommentStrings: ("/*", "*/"),
highlights: ["folds", "injections"]
)

/// A language structure for `YAML`
Expand All@@ -443,7 +468,8 @@ public extension CodeLanguage{
tsName: "yaml",
extensions: ["yml", "yaml"],
lineCommentString: "#",
rangeCommentStrings: ("", "")
rangeCommentStrings: ("", ""),
highlights: ["folds", "indents", "injections", "locals"]
)

/// A language structure for `Zig`
Expand All@@ -454,7 +480,7 @@ public extension CodeLanguage{
lineCommentString: "//",
rangeCommentStrings: ("", ""),
documentationCommentStrings: [.single("///"), .single("//!")],
highlights: ["injections"]
highlights: ["folds", "indents", "injections", "locals"]
)

/// The default language (plain text)
Expand Down
19 changes: 19 additions & 0 deletions Sources/CodeEditLanguages/Resources/tree-sitter-agda/folds.scm
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
; 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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
; 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"))
Loading