diff options
author | Michael Davis | 2022-01-25 06:50:34 +0000 |
---|---|---|
committer | GitHub | 2022-01-25 06:50:34 +0000 |
commit | 7bce91556afd2430c336f2fe4a6ce3f7ce555be2 (patch) | |
tree | 37f8403015217b96a30dce03c08f2f1348337dbc | |
parent | ed03be1450edd35738e5fa141dd08bb5a8326003 (diff) |
add tree-sitter-iex (#1576)
* add tree-sitter-iex
* run docgen task
* fix url for iex submodule
-rw-r--r-- | .gitmodules | 4 | ||||
-rw-r--r-- | book/src/generated/lang-support.md | 1 | ||||
m--------- | helix-syntax/languages/tree-sitter-iex | 0 | ||||
-rw-r--r-- | languages.toml | 7 | ||||
-rw-r--r-- | runtime/queries/iex/highlights.scm | 1 | ||||
-rw-r--r-- | runtime/queries/iex/injections.scm | 6 |
6 files changed, 19 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules index 780d1b63..247ac276 100644 --- a/.gitmodules +++ b/.gitmodules @@ -214,3 +214,7 @@ path = helix-syntax/languages/tree-sitter-elm url = https://github.com/elm-tooling/tree-sitter-elm shallow = true +[submodule "helix-syntax/languages/tree-sitter-iex"] + path = helix-syntax/languages/tree-sitter-iex + url = https://github.com/elixir-lang/tree-sitter-iex + shallow = true diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index e4070117..eff82226 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -21,6 +21,7 @@ | graphql | ✓ | | | | | haskell | ✓ | | | `haskell-language-server-wrapper` | | html | ✓ | | | | +| iex | ✓ | | | | | java | ✓ | | | | | javascript | ✓ | | ✓ | `typescript-language-server` | | json | ✓ | | ✓ | | diff --git a/helix-syntax/languages/tree-sitter-iex b/helix-syntax/languages/tree-sitter-iex new file mode 160000 +Subproject 3ec55082cf0be015d03148be8edfdfa8c56e77f diff --git a/languages.toml b/languages.toml index a589d7b8..02c64732 100644 --- a/languages.toml +++ b/languages.toml @@ -586,3 +586,10 @@ auto-format = true comment-token = "--" language-server = { command = "elm-language-server" } indent = { tab-width = 4, unit = " " } + +[[language]] +name = "iex" +scope = "source.iex" +injection-regex = "iex" +file-types = ["iex"] +roots = [] diff --git a/runtime/queries/iex/highlights.scm b/runtime/queries/iex/highlights.scm new file mode 100644 index 00000000..2847fbff --- /dev/null +++ b/runtime/queries/iex/highlights.scm @@ -0,0 +1 @@ +(prompt) @comment diff --git a/runtime/queries/iex/injections.scm b/runtime/queries/iex/injections.scm new file mode 100644 index 00000000..48863d9d --- /dev/null +++ b/runtime/queries/iex/injections.scm @@ -0,0 +1,6 @@ +((evaluation_block (prompt_line (expression) @injection.content)) + (#set! injection.language "elixir") + (#set! injection.combined)) + +((result) @injection.content + (#set! injection.language "elixir")) |