mirror of https://github.com/helix-editor/helix
languages: add Java .properties file support (#13874)
parent
6c6607ef62
commit
9789b27461
|
@ -184,6 +184,7 @@
|
||||||
| powershell | ✓ | | | |
|
| powershell | ✓ | | | |
|
||||||
| prisma | ✓ | ✓ | | `prisma-language-server` |
|
| prisma | ✓ | ✓ | | `prisma-language-server` |
|
||||||
| prolog | ✓ | | ✓ | `swipl` |
|
| prolog | ✓ | | ✓ | `swipl` |
|
||||||
|
| properties | ✓ | ✓ | | |
|
||||||
| protobuf | ✓ | ✓ | ✓ | `buf`, `pb`, `protols` |
|
| protobuf | ✓ | ✓ | ✓ | `buf`, `pb`, `protols` |
|
||||||
| prql | ✓ | | | |
|
| prql | ✓ | | | |
|
||||||
| pug | ✓ | | | |
|
| pug | ✓ | | | |
|
||||||
|
|
|
@ -4450,3 +4450,14 @@ auto-format = true
|
||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "caddyfile"
|
name = "caddyfile"
|
||||||
source = { git = "https://github.com/caddyserver/tree-sitter-caddyfile", rev = "b04bdb4ec53e40c44afbf001e15540f60a296aef" }
|
source = { git = "https://github.com/caddyserver/tree-sitter-caddyfile", rev = "b04bdb4ec53e40c44afbf001e15540f60a296aef" }
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "properties"
|
||||||
|
scope = "source.properties"
|
||||||
|
injection-regex = "properties"
|
||||||
|
file-types = ["properties", "prefs"]
|
||||||
|
comment-tokens = ["#"]
|
||||||
|
|
||||||
|
[[grammar]]
|
||||||
|
name = "properties"
|
||||||
|
source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-properties", rev = "579b62f5ad8d96c2bb331f07d1408c92767531d9" }
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
(comment) @comment
|
||||||
|
|
||||||
|
(key) @attribute
|
||||||
|
|
||||||
|
(value) @string
|
||||||
|
|
||||||
|
(value (escape) @constant.character.escape)
|
||||||
|
|
||||||
|
((index) @constant.numeric.integer
|
||||||
|
(#match? @constant.numeric.integer "^[0-9]+$"))
|
||||||
|
|
||||||
|
((substitution (key) @constant)
|
||||||
|
(#match? @constant "^[A-Z0-9_]+"))
|
||||||
|
|
||||||
|
((value) @constant.builtin.boolean
|
||||||
|
(#any-of? @constant.builtin.boolean "true" "false" "enabled" "disabled"))
|
||||||
|
|
||||||
|
((value) @constant.numeric.integer
|
||||||
|
(#match? @constant.numeric.integer "^-?[0-9]+$"))
|
||||||
|
|
||||||
|
((value) @constant.numeric.float
|
||||||
|
(#match? @constant.numeric.float "^-?[0-9]+\.[0-9]$"))
|
||||||
|
|
||||||
|
((value) @string.special.path
|
||||||
|
(#match? @string.special.path "^(\.{1,2})?/"))
|
||||||
|
|
||||||
|
(substitution
|
||||||
|
(key) @function
|
||||||
|
"::" @punctuation.special
|
||||||
|
(secret) @string.special.symbol)
|
||||||
|
|
||||||
|
(property [ "=" ":" ] @keyword.operator)
|
||||||
|
|
||||||
|
[ "${" "}" ] @punctuation.special
|
||||||
|
|
||||||
|
(substitution ":" @punctuation.special)
|
||||||
|
|
||||||
|
[ "[" "]" ] @punctuation.bracket
|
||||||
|
|
||||||
|
[ "." "\\" ] @punctuation.delimiter
|
|
@ -0,0 +1,2 @@
|
||||||
|
((comment) @injection.content
|
||||||
|
(#set! injection.language "comment"))
|
|
@ -0,0 +1,5 @@
|
||||||
|
(property
|
||||||
|
(key) @local.definition.attribute)
|
||||||
|
|
||||||
|
(substitution
|
||||||
|
(key) @local.reference)
|
|
@ -0,0 +1,4 @@
|
||||||
|
(comment) @comment.inside
|
||||||
|
(comment)+ @comment.around
|
||||||
|
|
||||||
|
(property (key) @parameter.inside) @parameter.around
|
Loading…
Reference in New Issue