Add ledger tree-sitter (#572)

Might need to update later since the current one highlight does not
work very well yet.
This commit is contained in:
Ivan Tham 2021-08-16 10:03:57 +08:00 committed by GitHub
parent 3bde65c599
commit aaccc9419a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 0 deletions

4
.gitmodules vendored
View File

@ -94,3 +94,7 @@
path = helix-syntax/languages/tree-sitter-latex
url = https://github.com/latex-lsp/tree-sitter-latex
shallow = true
[submodule "helix-syntax/languages/tree-sitter-ledger"]
path = helix-syntax/languages/tree-sitter-ledger
url = https://github.com/cbarrete/tree-sitter-ledger
shallow = true

@ -0,0 +1 @@
Subproject commit 72319504776f14193472a6ad14abec0af0225cbe

View File

@ -205,6 +205,15 @@ file-types = ["java"]
roots = []
indent = { tab-width = 4, unit = " " }
[[language]]
name = "ledger"
scope = "source.ledger"
injection-regex = "ledger"
file-types = ["ldg", "ledger", "journal"]
roots = []
comment-token = ";"
indent = { tab-width = 4, unit = " " }
# [[language]]
# name = "haskell"
# scope = "source.haskell"

View File

@ -0,0 +1,38 @@
[
(comment)
(note)
] @comment
[
(date)
(interval)
(quantity)
] @number
((account) @field)
((commodity) @text.literal)
"include" @include
[
"account"
"alias"
"assert"
"check"
"commodity"
"def"
"default"
"end"
"eval"
"format"
"nomarket"
"note"
"payee"
"check"
"A"
"Y"
"N"
"D"
"C"
"P"
] @keyword

View File

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