add highlights for env and ini file formats (#4536)

pull/4329/head
seshotake 2 years ago committed by GitHub
parent 9df4358492
commit ed7ea8c9ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,6 +27,7 @@
| elixir | ✓ | ✓ | | `elixir-ls` | | elixir | ✓ | ✓ | | `elixir-ls` |
| elm | ✓ | | | `elm-language-server` | | elm | ✓ | | | `elm-language-server` |
| elvish | ✓ | | | `elvish` | | elvish | ✓ | | | `elvish` |
| env | ✓ | | | |
| erb | ✓ | | | | | erb | ✓ | | | |
| erlang | ✓ | ✓ | | `erlang_ls` | | erlang | ✓ | ✓ | | `erlang_ls` |
| esdl | ✓ | | | | | esdl | ✓ | | | |
@ -53,6 +54,7 @@
| html | ✓ | | | `vscode-html-language-server` | | html | ✓ | | | `vscode-html-language-server` |
| idris | | | | `idris2-lsp` | | idris | | | | `idris2-lsp` |
| iex | ✓ | | | | | iex | ✓ | | | |
| ini | ✓ | | | |
| java | ✓ | | | `jdtls` | | java | ✓ | | | `jdtls` |
| javascript | ✓ | ✓ | ✓ | `typescript-language-server` | | javascript | ✓ | ✓ | ✓ | `typescript-language-server` |
| jsdoc | ✓ | | | | | jsdoc | ✓ | | | |

@ -1938,4 +1938,29 @@ indent = { tab-width = 2, unit = " " }
[[grammar]] [[grammar]]
name = "wit" name = "wit"
source = { git = "https://github.com/hh9527/tree-sitter-wit", rev = "c917790ab9aec50c5fd664cbfad8dd45110cfff3" } source = { git = "https://github.com/hh9527/tree-sitter-wit", rev = "c917790ab9aec50c5fd664cbfad8dd45110cfff3" }
[[language]]
name = "env"
scope = "source.env"
file-types = [".env", ".env.local", ".env.development", ".env.production"]
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" }
[[language]]
name = "ini"
scope = "source.ini"
file-types = ["ini"]
injection-regex = "ini"
comment-token = "#"
indent = { tab-width = 4, unit = "\t" }
roots = []
[[grammar]]
name = "ini"
source = { git = "https://github.com/justinmk/tree-sitter-ini", rev = "4d247fb876b4ae6b347687de4a179511bf67fcbc" }

@ -0,0 +1,19 @@
(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

@ -0,0 +1,6 @@
(section_name) @namespace
(setting_name) @keyword
(setting_value) @string
(comment) @comment
Loading…
Cancel
Save