Beancount syntax highlighting (#7389)
Release Notes: - Added syntax highlighting for [Beancount](https://beancount.github.io)
This commit is contained in:
parent
4195f27964
commit
e2e8e52ec4
6 changed files with 37 additions and 0 deletions
|
@ -108,6 +108,7 @@ thiserror.workspace = true
|
|||
tiny_http = "0.8"
|
||||
toml.workspace = true
|
||||
tree-sitter-bash.workspace = true
|
||||
tree-sitter-beancount.workspace = true
|
||||
tree-sitter-c-sharp.workspace = true
|
||||
tree-sitter-c.workspace = true
|
||||
tree-sitter-cpp.workspace = true
|
||||
|
|
|
@ -67,6 +67,7 @@ pub fn init(
|
|||
};
|
||||
|
||||
language("bash", tree_sitter_bash::language(), vec![]);
|
||||
language("beancount", tree_sitter_beancount::language(), vec![]);
|
||||
language(
|
||||
"c",
|
||||
tree_sitter_c::language(),
|
||||
|
|
3
crates/zed/src/languages/beancount/config.toml
Normal file
3
crates/zed/src/languages/beancount/config.toml
Normal file
|
@ -0,0 +1,3 @@
|
|||
name = "Beancount"
|
||||
path_suffixes = ["beancount"]
|
||||
brackets = [{ start = "\"", end = "\"", close = false, newline = false }]
|
21
crates/zed/src/languages/beancount/highlights.scm
Normal file
21
crates/zed/src/languages/beancount/highlights.scm
Normal file
|
@ -0,0 +1,21 @@
|
|||
(comment) @comment
|
||||
(headline) @comment
|
||||
[
|
||||
(payee)
|
||||
(narration)
|
||||
(string)
|
||||
] @string
|
||||
|
||||
(number) @number
|
||||
(date) @function
|
||||
(currency) @constant
|
||||
(account) @identifier
|
||||
|
||||
[
|
||||
(option)
|
||||
(include)
|
||||
(open)
|
||||
(balance)
|
||||
(pad)
|
||||
(close)
|
||||
] @keyword
|
Loading…
Add table
Add a link
Reference in a new issue