mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-04 04:20:09 -04:00
add highlights tests
This commit is contained in:
parent
317f5c7471
commit
d5147a608a
1 changed files with 59 additions and 0 deletions
59
tests/query/highlights/hocon/test.conf
Normal file
59
tests/query/highlights/hocon/test.conf
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
HOCON = Human-Optimized Config Object Notation
|
||||
// ^field
|
||||
// ^string
|
||||
// ^string
|
||||
// ^string
|
||||
// ^string
|
||||
|
||||
"it's": "a JSON\nsuperset",
|
||||
// ^string
|
||||
// ^string.escape
|
||||
// ^punctuation.delimiter
|
||||
|
||||
features: [
|
||||
// ^operator
|
||||
// ^punctuation.bracket
|
||||
less noisy / less pedantic syntax
|
||||
// ^string
|
||||
ability to refer to another part of the configuration
|
||||
import/include another configuration file into the current file
|
||||
a mapping to a flat properties list such as Java's system properties
|
||||
ability to get values from environment variables
|
||||
# ability to write comments
|
||||
// ^comment
|
||||
// ^comment
|
||||
// this is also a comment
|
||||
// ^comment
|
||||
// ^comment
|
||||
]
|
||||
|
||||
specs url: "https://github.com/lightbend/config/blob/master/HOCON.md"
|
||||
includes: {
|
||||
include required(file("~/prog/tree-sitter-hocon/grammar.js"))
|
||||
// ^keyword
|
||||
//^include
|
||||
// ^punctuation.bracket
|
||||
// ^punctuation.bracket
|
||||
override = true
|
||||
// ^boolean
|
||||
}
|
||||
|
||||
it's: ${it's}. A ${HOCON}
|
||||
// ^punctuation.special
|
||||
// ^punctuation.special
|
||||
// ^punctuation.special
|
||||
// ^string
|
||||
// ^string
|
||||
// ^punctuation.special
|
||||
// ^punctuation.special
|
||||
|
||||
this.is.a."long.key" = null,
|
||||
// ^punctuation.delimiter
|
||||
// ^punctuation.delimiter
|
||||
// ^punctuation.delimiter
|
||||
// ^constant.builtin
|
||||
week = 7 days
|
||||
// ^number
|
||||
// ^keyword
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue