diff options
author | Ollie Charles | 2023-04-12 13:38:11 +0000 |
---|---|---|
committer | GitHub | 2023-04-12 13:38:11 +0000 |
commit | 92c5f5f18cfafa8e9f6cb6cf0f6b584977af8eb2 (patch) | |
tree | 487206d76ac864afda6459700b5aac6c9383904a | |
parent | d5fec302c9fc6a6e334a0d518c6d10f7dbeb26a7 (diff) |
Initial Cabal language support (#6485)
-rw-r--r-- | book/src/generated/lang-support.md | 1 | ||||
-rw-r--r-- | languages.toml | 13 | ||||
-rw-r--r-- | runtime/queries/cabal/highlights.scm | 15 |
3 files changed, 28 insertions, 1 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 3f56dd60..28dfeb04 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -9,6 +9,7 @@ | bicep | ✓ | | | `bicep-langserver` | | c | ✓ | ✓ | ✓ | `clangd` | | c-sharp | ✓ | ✓ | | `OmniSharp` | +| cabal | ✓ | | | | | cairo | ✓ | | | | | capnp | ✓ | | ✓ | | | clojure | ✓ | | | `clojure-lsp` | diff --git a/languages.toml b/languages.toml index 479777f9..e7c37499 100644 --- a/languages.toml +++ b/languages.toml @@ -2438,6 +2438,18 @@ name = "nim" source = { git = "https://github.com/aMOPel/tree-sitter-nim", rev = "240239b232550e431d67de250d1b5856209e7f06" } [[language]] +name = "cabal" +scope = "source.cabal" +file-types = [ "cabal" ] +roots = ["cabal.project", "Setup.hs"] +indent = { tab-width = 2, unit = " " } +comment-token = "--" + +[[grammar]] +name = "cabal" +source = { git = "https://gitlab.com/magus/tree-sitter-cabal/", rev = "7d5fa6887ae05a0b06d046f1e754c197c8ad869b" } + +[[language]] name = "hurl" scope = "source.hurl" injection-regex = "hurl" @@ -2449,4 +2461,3 @@ indent = { tab-width = 2, unit = " " } [[grammar]] name = "hurl" source = { git = "https://github.com/pfeiferj/tree-sitter-hurl", rev = "264c42064b61ee21abe88d0061f29a0523352e22" } - diff --git a/runtime/queries/cabal/highlights.scm b/runtime/queries/cabal/highlights.scm new file mode 100644 index 00000000..d6b9f462 --- /dev/null +++ b/runtime/queries/cabal/highlights.scm @@ -0,0 +1,15 @@ +(comment) @comment + +[ + "cabal-version" + (field_name) +] @type + +(section_name) @type + +[ + (section_type) + "if" + "elseif" + "else" +] @keyword |