mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
add basic queries for bibtex
This commit is contained in:
parent
71e3391a8c
commit
ebdd43b68d
3 changed files with 62 additions and 0 deletions
3
queries/bibtex/folds.scm
Normal file
3
queries/bibtex/folds.scm
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[
|
||||
(entry)
|
||||
] @fold
|
||||
49
queries/bibtex/highlights.scm
Normal file
49
queries/bibtex/highlights.scm
Normal 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
|
||||
10
queries/bibtex/indents.scm
Normal file
10
queries/bibtex/indents.scm
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[
|
||||
(entry)
|
||||
] @indent
|
||||
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
] @branch
|
||||
|
||||
(comment) @ignore
|
||||
Loading…
Add table
Add a link
Reference in a new issue