Add ledger parser, folds and highlights queries

This commit is contained in:
Cédric Barreteau
2021-01-28 22:42:07 +01:00
committed by Thomas Vigouroux
parent 32e39094b9
commit 459173e5c7
5 changed files with 31 additions and 0 deletions

View File

@@ -153,6 +153,7 @@ We are looking for maintainers to add more parsers and to write query files for
- [x] [json](https://github.com/tree-sitter/tree-sitter-json) (maintained by @steelsojka)
- [x] [julia](https://github.com/tree-sitter/tree-sitter-julia) (maintained by @mroavi, @theHamsta)
- [x] [kotlin](https://github.com/QthCN/tree-sitter-kotlin) (maintained by @tormodatt)
- [x] [ledger](https://github.com/cbarrete/tree-sitter-ledger) (maintained by @cbarrete)
- [x] [lua](https://github.com/nvim-treesitter/tree-sitter-lua) (maintained by @vigoux)
- [x] [nix](https://github.com/cstrahan/tree-sitter-nix) (maintained by @leo60228)
- [x] [ocaml](https://github.com/tree-sitter/tree-sitter-ocaml) (maintained by @undu)

View File

@@ -62,6 +62,9 @@
"kotlin": {
"revision": "b72933c0c0ff25f2de35bb3acabfe6979333187e"
},
"ledger": {
"revision": "e09aad33e577674cc623672b7b2d48c70eade3d7"
},
"lua": {
"revision": "97b757ad3546d68dc1131e6ffb9b1d2a750eea29"
},

View File

@@ -71,6 +71,14 @@ list.rust = {
maintainers = {"@vigoux"},
}
list.ledger = {
install_info = {
url = "https://github.com/cbarrete/tree-sitter-ledger",
files = { "src/parser.c" }
},
maintainers = {"@cbarrete"},
}
list.lua = {
install_info = {
url = "https://github.com/nvim-treesitter/tree-sitter-lua",

3
queries/ledger/folds.scm Normal file
View File

@@ -0,0 +1,3 @@
[
(xact)
] @fold

View File

@@ -0,0 +1,16 @@
((comment) @comment)
((date) @number)
((account) @variable)
((note) @comment)
((amount_expr) @keyword)
((quantity) @number)
((commodity) @string)
"include" @include
[
"account"
"end"
"def"
] @keyword