add basic queries for bibtex

This commit is contained in:
Christian Clason 2021-03-22 20:18:23 +01:00 committed by Stephan Seitz
parent 71e3391a8c
commit ebdd43b68d
3 changed files with 62 additions and 0 deletions

3
queries/bibtex/folds.scm Normal file
View file

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

View file

@ -0,0 +1,49 @@
; CREDITS @pfoerster (adapted from https://github.com/latex-lsp/tree-sitter-bibtex)
[
(string_type)
(preamble_type)
(entry_type)
] @keyword
[
(junk)
(comment)
] @comment
[
"="
"#"
] @operator
(command) @function.builtin
(number) @number
(field
name: (identifier) @field)
(token
(identifier) @parameter)
[
(brace_word)
(quote_word)
] @string
[
(key_brace)
(key_paren)
] @symbol
(string
name: (identifier) @constant)
[
"{"
"}"
"("
")"
] @punctuation.bracket
"," @punctuation.delimiter

View file

@ -0,0 +1,10 @@
[
(entry)
] @indent
[
"{"
"}"
] @branch
(comment) @ignore