mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 09:26:19 +04:00
Add HOCON language support (#9203)
* Add HOCON language support * Remove error query Co-authored-by: Michael Davis <mcarsondavis@gmail.com> * Change include query * Fix query error --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
This commit is contained in:
parent
f8ae2bc61b
commit
a32d537d0a
@ -68,6 +68,7 @@
|
||||
| haskell-persistent | ✓ | | | |
|
||||
| hcl | ✓ | | ✓ | `terraform-ls` |
|
||||
| heex | ✓ | ✓ | | `elixir-ls` |
|
||||
| hocon | ✓ | | ✓ | |
|
||||
| hosts | ✓ | | | |
|
||||
| html | ✓ | | | `vscode-html-language-server` |
|
||||
| hurl | ✓ | | ✓ | |
|
||||
|
@ -3013,3 +3013,15 @@ file-types = ["janet"]
|
||||
comment-token = "#"
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
grammar = "clojure"
|
||||
|
||||
[[language]]
|
||||
name = "hocon"
|
||||
scope = "source.conf"
|
||||
file-types = ["conf"]
|
||||
comment-token = "#"
|
||||
auto-format = true
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
|
||||
[[grammar]]
|
||||
name = "hocon"
|
||||
source = { git = "https://github.com/antosha417/tree-sitter-hocon", rev = "c390f10519ae69fdb03b3e5764f5592fb6924bcc" }
|
||||
|
31
runtime/queries/hocon/highlights.scm
Normal file
31
runtime/queries/hocon/highlights.scm
Normal file
@ -0,0 +1,31 @@
|
||||
(comment) @comment
|
||||
|
||||
(null) @constant.builtin
|
||||
[(true) (false)] @constant.builtin.boolean
|
||||
(number) @constant.numeric
|
||||
(string) @string
|
||||
(multiline_string) @string
|
||||
(string (escape_sequence) @constant.character.escape)
|
||||
(unquoted_string) @string
|
||||
|
||||
(value [":" "=" "+=" ] @operator)
|
||||
|
||||
(substitution (_) @string)
|
||||
(substitution ["${" "${?" "}"] @punctuation.special)
|
||||
|
||||
[
|
||||
"url"
|
||||
"file"
|
||||
"classpath"
|
||||
"required"
|
||||
] @function.builtin
|
||||
|
||||
(include) @keyword.directive
|
||||
|
||||
[ "(" ")" "[" "]" "{" "}" ] @punctuation.bracket
|
||||
|
||||
(unit) @keyword
|
||||
(path (_) @keyword)
|
||||
(unquoted_path "." @punctuation.delimiter)
|
||||
[ "," ] @punctuation.delimiter
|
||||
|
10
runtime/queries/hocon/indents.scm
Normal file
10
runtime/queries/hocon/indents.scm
Normal file
@ -0,0 +1,10 @@
|
||||
[
|
||||
(object)
|
||||
(array)
|
||||
] @indent
|
||||
|
||||
[
|
||||
"]"
|
||||
"}"
|
||||
] @outdent
|
||||
|
Loading…
Reference in New Issue
Block a user