mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
add support for beancount files
This commit is contained in:
parent
0c12ff67fe
commit
fb75f01941
4 changed files with 41 additions and 0 deletions
|
|
@ -498,6 +498,15 @@ list.r = {
|
|||
maintainers = { "@jimhester" },
|
||||
}
|
||||
|
||||
list.beancout = {
|
||||
install_info = {
|
||||
url = "https://github.com/polarmutex/tree-sitter-beancount",
|
||||
files = { "src/parser.c" },
|
||||
branch = "master",
|
||||
},
|
||||
maintainers = { "@polarmutex" }
|
||||
}
|
||||
|
||||
local M = {
|
||||
list = list
|
||||
}
|
||||
|
|
|
|||
3
queries/beancount/folds.scm
Normal file
3
queries/beancount/folds.scm
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[
|
||||
(transaction)
|
||||
] @fold
|
||||
26
queries/beancount/highlights.scm
Normal file
26
queries/beancount/highlights.scm
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
(date) @field
|
||||
(txn) @annotation
|
||||
|
||||
(account) @type
|
||||
|
||||
(amount) @number
|
||||
(incomplete_amount) @number
|
||||
(amount_tolerance) @number
|
||||
|
||||
(currency) @property
|
||||
|
||||
(key) @label
|
||||
(string) @string
|
||||
|
||||
(tag) @constant
|
||||
(link) @constant
|
||||
|
||||
(comment) @comment
|
||||
|
||||
[
|
||||
(BALANCE) (OPEN) (CLOSE) (COMMODITY) (PAD)
|
||||
(EVENT) (PRICE) (NOTE) (DOCUMENT) (QUERY)
|
||||
(CUSTOM) (PUSHTAG) (POPTAG) (PUSHMETA)
|
||||
(POPMETA) (OPTION) (INCLUDE) (PLUGIN)
|
||||
] @keyword
|
||||
3
queries/beancount/locals.scm
Normal file
3
queries/beancount/locals.scm
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
(transaction
|
||||
(date) @definition.date
|
||||
(txn_strings) @definition.payee) @definition.transaction
|
||||
Loading…
Add table
Add a link
Reference in a new issue