on master help sign in
Modify env language to extend bash (#5720)
447909eEric Crosson
languages.toml+2−5
@@ -2007,15 +2007,12 @@ source = { git = "https://github.com/hh9527/tree-sitter-wit", rev = "c917790ab9a
2007[[language]]
2007[[language]]
2008name = "env"
2008name = "env"
2009scope = "source.env"
2009scope = "source.env"
2010−file-types = [".env", ".env.local", ".env.development", ".env.production"]
2010+file-types = [".env", ".env.local", ".env.development", ".env.production", ".envrc"]
2011injection-regex = "env"
2011injection-regex = "env"
2012comment-token = "#"
2012comment-token = "#"
2013indent = { tab-width = 4, unit = "\t" }
2013indent = { tab-width = 4, unit = "\t" }
2014roots = []
2014roots = []
2015−
2016−[[grammar]]
2015+grammar = "bash"
2017−name = "env"
2018−source = { git = "https://github.com/seshotake/tree-sitter-env", rev = "e6c6bb1e7b51d481cba463fe949f083cf22d81f7" }
2019
2016
2020[[language]]
2017[[language]]
2021name = "ini"
2018name = "ini"
runtime/queries/env/highlights.scm+1−19
@@ -1,19 +1 @@
1−(env_variable (quoted_string)) @string
1+; inherits: bash
2−(env_variable (unquoted_string)) @string
3−
4−(env_key) @keyword
5−
6−((variable) @keyword
7− (#match? @keyword "^([A-Z][A-Z_0-9]*)$"))
8−
9−[
10− "{"
11− "}"
12−] @punctuation.bracket
13−
14−[
15− "$"
16− "="
17−] @operator
18−
19−(comment) @comment