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>
pull/8717/merge
Jaakko Paju 6 months ago committed by GitHub
parent f8ae2bc61b
commit a32d537d0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

@ -0,0 +1,10 @@
[
(object)
(array)
] @indent
[
"]"
"}"
] @outdent
Loading…
Cancel
Save