diff options
| -rw-r--r-- | ftdetect/hjson.vim | 1 | ||||
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 9 | ||||
| -rw-r--r-- | queries/hjson/folds.scm | 1 | ||||
| -rw-r--r-- | queries/hjson/highlights.scm | 16 | ||||
| -rw-r--r-- | queries/hjson/indents.scm | 3 | ||||
| -rw-r--r-- | queries/hjson/injections.scm | 1 | ||||
| -rw-r--r-- | queries/hjson/locals.scm | 1 |
7 files changed, 32 insertions, 0 deletions
diff --git a/ftdetect/hjson.vim b/ftdetect/hjson.vim new file mode 100644 index 000000000..65ed94625 --- /dev/null +++ b/ftdetect/hjson.vim @@ -0,0 +1 @@ +autocmd BufNewFile,BufRead *.hjson set filetype=hjson diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 9ad17fec4..f526fbb1d 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -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, } diff --git a/queries/hjson/folds.scm b/queries/hjson/folds.scm new file mode 100644 index 000000000..41269219e --- /dev/null +++ b/queries/hjson/folds.scm @@ -0,0 +1 @@ +; inherits: json diff --git a/queries/hjson/highlights.scm b/queries/hjson/highlights.scm new file mode 100644 index 000000000..c8eed139f --- /dev/null +++ b/queries/hjson/highlights.scm @@ -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 diff --git a/queries/hjson/indents.scm b/queries/hjson/indents.scm new file mode 100644 index 000000000..26a42eeda --- /dev/null +++ b/queries/hjson/indents.scm @@ -0,0 +1,3 @@ +; inherits: json + +(comment) @ignore diff --git a/queries/hjson/injections.scm b/queries/hjson/injections.scm new file mode 100644 index 000000000..4bb7d675d --- /dev/null +++ b/queries/hjson/injections.scm @@ -0,0 +1 @@ +(comment) @comment diff --git a/queries/hjson/locals.scm b/queries/hjson/locals.scm new file mode 100644 index 000000000..41269219e --- /dev/null +++ b/queries/hjson/locals.scm @@ -0,0 +1 @@ +; inherits: json |
