diff options
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 9 | ||||
| -rw-r--r-- | queries/beancount/folds.scm | 3 | ||||
| -rw-r--r-- | queries/beancount/highlights.scm | 26 | ||||
| -rw-r--r-- | queries/beancount/locals.scm | 3 |
4 files changed, 41 insertions, 0 deletions
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 690348ff..d98daaee 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -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 } diff --git a/queries/beancount/folds.scm b/queries/beancount/folds.scm new file mode 100644 index 00000000..25eb27b9 --- /dev/null +++ b/queries/beancount/folds.scm @@ -0,0 +1,3 @@ +[ + (transaction) +] @fold diff --git a/queries/beancount/highlights.scm b/queries/beancount/highlights.scm new file mode 100644 index 00000000..d16b586a --- /dev/null +++ b/queries/beancount/highlights.scm @@ -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 diff --git a/queries/beancount/locals.scm b/queries/beancount/locals.scm new file mode 100644 index 00000000..ffe5b264 --- /dev/null +++ b/queries/beancount/locals.scm @@ -0,0 +1,3 @@ +(transaction + (date) @definition.date + (txn_strings) @definition.payee) @definition.transaction |
