on master help sign in
add highlights for env and ini file formats (#4536)
ed7ea8cseshotake
book/src/generated/lang-support.md+2
@@ -27,6 +27,7 @@
27| elixir | ✓ | ✓ | | `elixir-ls` |
27| elixir | ✓ | ✓ | | `elixir-ls` |
28| elm | ✓ | | | `elm-language-server` |
28| elm | ✓ | | | `elm-language-server` |
29| elvish | ✓ | | | `elvish` |
29| elvish | ✓ | | | `elvish` |
30+| env | ✓ | | | |
30| erb | ✓ | | | |
31| erb | ✓ | | | |
31| erlang | ✓ | ✓ | | `erlang_ls` |
32| erlang | ✓ | ✓ | | `erlang_ls` |
32| esdl | ✓ | | | |
33| esdl | ✓ | | | |
@@ -53,6 +54,7 @@
53| html | ✓ | | | `vscode-html-language-server` |
54| html | ✓ | | | `vscode-html-language-server` |
54| idris | | | | `idris2-lsp` |
55| idris | | | | `idris2-lsp` |
55| iex | ✓ | | | |
56| iex | ✓ | | | |
57+| ini | ✓ | | | |
56| java | ✓ | | | `jdtls` |
58| java | ✓ | | | `jdtls` |
57| javascript | ✓ | ✓ | ✓ | `typescript-language-server` |
59| javascript | ✓ | ✓ | ✓ | `typescript-language-server` |
58| jsdoc | ✓ | | | |
60| jsdoc | ✓ | | | |
languages.toml+26−1
@@ -1938,4 +1938,29 @@ indent = { tab-width = 2, unit = " " }
1938[[grammar]]
1938[[grammar]]
1939name = "wit"
1939name = "wit"
1940source = { git = "https://github.com/hh9527/tree-sitter-wit", rev = "c917790ab9aec50c5fd664cbfad8dd45110cfff3" }
1940source = { git = "https://github.com/hh9527/tree-sitter-wit", rev = "c917790ab9aec50c5fd664cbfad8dd45110cfff3" }
1941−
1941+
1942+[[language]]
1943+name = "env"
1944+scope = "source.env"
1945+file-types = [".env", ".env.local", ".env.development", ".env.production"]
1946+injection-regex = "env"
1947+comment-token = "#"
1948+indent = { tab-width = 4, unit = "\t" }
1949+roots = []
1950+
1951+[[grammar]]
1952+name = "env"
1953+source = { git = "https://github.com/seshotake/tree-sitter-env", rev = "e6c6bb1e7b51d481cba463fe949f083cf22d81f7" }
1954+
1955+[[language]]
1956+name = "ini"
1957+scope = "source.ini"
1958+file-types = ["ini"]
1959+injection-regex = "ini"
1960+comment-token = "#"
1961+indent = { tab-width = 4, unit = "\t" }
1962+roots = []
1963+
1964+[[grammar]]
1965+name = "ini"
1966+source = { git = "https://github.com/justinmk/tree-sitter-ini", rev = "4d247fb876b4ae6b347687de4a179511bf67fcbc" }
runtime/queries/env/highlights.scmnew file+19
@@ -0,0 +1,19 @@
1+(env_variable (quoted_string)) @string
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
runtime/queries/ini/highlights.scmnew file+6
@@ -0,0 +1,6 @@
1+(section_name) @namespace
2+
3+(setting_name) @keyword
4+(setting_value) @string
5+
6+(comment) @comment