Modify env language to extend bash (#5720)

Additionally, add `.envrc` to the `env`-supported file types.
This commit is contained in:
Eric Crosson 2023-01-30 08:56:42 -06:00 committed by GitHub
parent 8b25f44f05
commit 447909e4d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 24 deletions

View file

@ -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"

View file

@ -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
; inherits: bash