mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-25 10:56:19 +04:00
Add language: beancount (#3297)
Co-authored-by: erasin <erasinoo@gmail.com> Co-authored-by: Michael Davis <mcarsondavis@gmail.com> Co-authored-by: Erasin <erasinoo@gmail.com>
This commit is contained in:
parent
d9321134f6
commit
4ce5a94552
@ -1,6 +1,7 @@
|
|||||||
| Language | Syntax Highlighting | Treesitter Textobjects | Auto Indent | Default LSP |
|
| Language | Syntax Highlighting | Treesitter Textobjects | Auto Indent | Default LSP |
|
||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
| bash | ✓ | | | `bash-language-server` |
|
| bash | ✓ | | | `bash-language-server` |
|
||||||
|
| beancount | ✓ | | | |
|
||||||
| c | ✓ | ✓ | ✓ | `clangd` |
|
| c | ✓ | ✓ | ✓ | `clangd` |
|
||||||
| c-sharp | ✓ | | | `OmniSharp` |
|
| c-sharp | ✓ | | | `OmniSharp` |
|
||||||
| cairo | ✓ | | | |
|
| cairo | ✓ | | | |
|
||||||
|
@ -599,6 +599,19 @@ indent = { tab-width = 4, unit = " " }
|
|||||||
name = "ledger"
|
name = "ledger"
|
||||||
source = { git = "https://github.com/cbarrete/tree-sitter-ledger", rev = "1f864fb2bf6a87fe1b48545cc6adc6d23090adf7" }
|
source = { git = "https://github.com/cbarrete/tree-sitter-ledger", rev = "1f864fb2bf6a87fe1b48545cc6adc6d23090adf7" }
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "beancount"
|
||||||
|
scope = "source.beancount"
|
||||||
|
injection-regex = "beancount"
|
||||||
|
file-types = ["beancount", "bean"]
|
||||||
|
roots = []
|
||||||
|
comment-token = ";"
|
||||||
|
indent = { tab-width = 2, unit = " " }
|
||||||
|
|
||||||
|
[[grammar]]
|
||||||
|
name = "beancount"
|
||||||
|
source = { git = "https://github.com/polarmutex/tree-sitter-beancount", rev = "4cbd1f09cd07c1f1fabf867c2cf354f9da53cc4c" }
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "ocaml"
|
name = "ocaml"
|
||||||
scope = "source.ocaml"
|
scope = "source.ocaml"
|
||||||
|
4
runtime/queries/beancount/folds.scm
Normal file
4
runtime/queries/beancount/folds.scm
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[
|
||||||
|
(transaction)
|
||||||
|
(section)
|
||||||
|
] @fold
|
49
runtime/queries/beancount/highlights.scm
Normal file
49
runtime/queries/beancount/highlights.scm
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
(date) @variable.builtin
|
||||||
|
(txn) @variable.builtin
|
||||||
|
|
||||||
|
(account) @type
|
||||||
|
|
||||||
|
[
|
||||||
|
(amount)
|
||||||
|
(incomplete_amount)
|
||||||
|
(amount_tolerance)
|
||||||
|
(number)
|
||||||
|
] @constant.numeric
|
||||||
|
|
||||||
|
|
||||||
|
[(key_value) (key)] @variable.other.member
|
||||||
|
(string) @string
|
||||||
|
|
||||||
|
[
|
||||||
|
(currency)
|
||||||
|
(tag)
|
||||||
|
(link)
|
||||||
|
] @constant
|
||||||
|
|
||||||
|
(comment) @comment
|
||||||
|
|
||||||
|
[
|
||||||
|
(minus)
|
||||||
|
(plus)
|
||||||
|
] @operator
|
||||||
|
|
||||||
|
[
|
||||||
|
(balance) (open) (close) (commodity) (pad)
|
||||||
|
(event) (price) (note) (document) (query)
|
||||||
|
(custom) (pushtag) (poptag) (pushmeta)
|
||||||
|
(popmeta) (option) (include) (plugin)
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
|
||||||
|
((headline item: (item) @markup.heading.6) @markup.heading.marker
|
||||||
|
(#match? @markup.heading.marker "^\\*\\*\\*\\*\\*\\*"))
|
||||||
|
((headline item: (item) @markup.heading.5) @markup.heading.marker
|
||||||
|
(#match? @markup.heading.marker "^\\*\\*\\*\\*\\*"))
|
||||||
|
((headline item: (item) @markup.heading.4) @markup.heading.marker
|
||||||
|
(#match? @markup.heading.marker "^\\*\\*\\*\\*"))
|
||||||
|
((headline item: (item) @markup.heading.3) @markup.heading.marker
|
||||||
|
(#match? @markup.heading.marker "^\\*\\*\\*"))
|
||||||
|
((headline item: (item) @markup.heading.2) @markup.heading.marker
|
||||||
|
(#match? @markup.heading.marker "^\\*\\*"))
|
||||||
|
((headline item: (item) @markup.heading.1) @markup.heading.marker
|
||||||
|
(#match? @markup.heading.marker "^\\*"))
|
Loading…
Reference in New Issue
Block a user