Support hjson

This commit is contained in:
kghugo
2021-09-18 21:15:37 +01:00
committed by Stephan Seitz
parent 5fa6e27427
commit d5e87dde10
7 changed files with 32 additions and 0 deletions

1
ftdetect/hjson.vim Normal file
View File

@@ -0,0 +1 @@
autocmd BufNewFile,BufRead *.hjson set filetype=hjson

View File

@@ -720,6 +720,15 @@ list.pioasm = {
maintainers = { "@leo60228" },
}
list.hjson = {
install_info = {
url = "https://github.com/winston0410/tree-sitter-hjson",
files = { "src/parser.c" },
generate_requires_npm = true,
},
maintainers = { "@winston0410" },
}
local M = {
list = list,
}

1
queries/hjson/folds.scm Normal file
View File

@@ -0,0 +1 @@
; inherits: json

View File

@@ -0,0 +1,16 @@
(true) @boolean
(false) @boolean
(null) @constant.builtin
(number) @number
(pair key: (string) @label)
(pair value: (string) @string)
(array (string) @string)
; (string_content (escape_sequence) @string.escape)
(ERROR) @error
; "," @punctuation.delimiter
"[" @punctuation.bracket
"]" @punctuation.bracket
"{" @punctuation.bracket
"}" @punctuation.bracket
(comment) @comment

View File

@@ -0,0 +1,3 @@
; inherits: json
(comment) @ignore

View File

@@ -0,0 +1 @@
(comment) @comment

1
queries/hjson/locals.scm Normal file
View File

@@ -0,0 +1 @@
; inherits: json