diff options
author | Eric Crosson | 2023-01-30 14:56:42 +0000 |
---|---|---|
committer | GitHub | 2023-01-30 14:56:42 +0000 |
commit | 447909e4d0b865a1177babe2214536979fdbeb7c (patch) | |
tree | be6656c3aa46f20bb642ada1d13316e6ac504e20 | |
parent | 8b25f44f0570c7b430d632108126a91f1939de65 (diff) |
Modify env language to extend bash (#5720)
Additionally, add `.envrc` to the `env`-supported file types.
-rw-r--r-- | languages.toml | 7 | ||||
-rw-r--r-- | runtime/queries/env/highlights.scm | 20 |
2 files changed, 3 insertions, 24 deletions
diff --git a/languages.toml b/languages.toml index 495acfec..755f577f 100644 --- a/languages.toml +++ b/languages.toml @@ -2007,15 +2007,12 @@ source = { git = "https://github.com/hh9527/tree-sitter-wit", rev = "c917790ab9a [[language]] name = "env" scope = "source.env" -file-types = [".env", ".env.local", ".env.development", ".env.production"] +file-types = [".env", ".env.local", ".env.development", ".env.production", ".envrc"] injection-regex = "env" comment-token = "#" indent = { tab-width = 4, unit = "\t" } roots = [] - -[[grammar]] -name = "env" -source = { git = "https://github.com/seshotake/tree-sitter-env", rev = "e6c6bb1e7b51d481cba463fe949f083cf22d81f7" } +grammar = "bash" [[language]] name = "ini" diff --git a/runtime/queries/env/highlights.scm b/runtime/queries/env/highlights.scm index 6a27e8e5..8a70c41c 100644 --- a/runtime/queries/env/highlights.scm +++ b/runtime/queries/env/highlights.scm @@ -1,19 +1 @@ -(env_variable (quoted_string)) @string -(env_variable (unquoted_string)) @string - -(env_key) @keyword - -((variable) @keyword - (#match? @keyword "^([A-Z][A-Z_0-9]*)$")) - -[ - "{" - "}" -] @punctuation.bracket - -[ - "$" - "=" -] @operator - -(comment) @comment
\ No newline at end of file +; inherits: bash
\ No newline at end of file |