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:
parent
3bde65c599
commit
aaccc9419a
5 changed files with 53 additions and 0 deletions
4
.gitmodules
vendored
4
.gitmodules
vendored
|
@ -94,3 +94,7 @@
|
||||||
path = helix-syntax/languages/tree-sitter-latex
|
path = helix-syntax/languages/tree-sitter-latex
|
||||||
url = https://github.com/latex-lsp/tree-sitter-latex
|
url = https://github.com/latex-lsp/tree-sitter-latex
|
||||||
shallow = true
|
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
|
||||||
|
|
1
helix-syntax/languages/tree-sitter-ledger
Submodule
1
helix-syntax/languages/tree-sitter-ledger
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 72319504776f14193472a6ad14abec0af0225cbe
|
|
@ -205,6 +205,15 @@ file-types = ["java"]
|
||||||
roots = []
|
roots = []
|
||||||
indent = { tab-width = 4, unit = " " }
|
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]]
|
# [[language]]
|
||||||
# name = "haskell"
|
# name = "haskell"
|
||||||
# scope = "source.haskell"
|
# scope = "source.haskell"
|
||||||
|
|
38
runtime/queries/ledger/highlights.scm
Normal file
38
runtime/queries/ledger/highlights.scm
Normal 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
|
1
runtime/queries/ledger/injections.scm
Normal file
1
runtime/queries/ledger/injections.scm
Normal file
|
@ -0,0 +1 @@
|
||||||
|
(comment) @comment
|
Loading…
Add table
Reference in a new issue