diff options
| author | Christian Clason <christian.clason@uni-due.de> | 2021-03-22 20:18:23 +0100 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2021-03-22 22:19:10 +0100 |
| commit | ebdd43b68dcb086e3c199c1ac52a581d6c7f79f7 (patch) | |
| tree | 7b01494c7153e36b4e6a3621fb3a855f26a8bd12 | |
| parent | Add indents for php (diff) | |
| download | nvim-treesitter-ebdd43b68dcb086e3c199c1ac52a581d6c7f79f7.tar nvim-treesitter-ebdd43b68dcb086e3c199c1ac52a581d6c7f79f7.tar.gz nvim-treesitter-ebdd43b68dcb086e3c199c1ac52a581d6c7f79f7.tar.bz2 nvim-treesitter-ebdd43b68dcb086e3c199c1ac52a581d6c7f79f7.tar.lz nvim-treesitter-ebdd43b68dcb086e3c199c1ac52a581d6c7f79f7.tar.xz nvim-treesitter-ebdd43b68dcb086e3c199c1ac52a581d6c7f79f7.tar.zst nvim-treesitter-ebdd43b68dcb086e3c199c1ac52a581d6c7f79f7.zip | |
add basic queries for bibtex
| -rw-r--r-- | queries/bibtex/folds.scm | 3 | ||||
| -rw-r--r-- | queries/bibtex/highlights.scm | 49 | ||||
| -rw-r--r-- | queries/bibtex/indents.scm | 10 |
3 files changed, 62 insertions, 0 deletions
diff --git a/queries/bibtex/folds.scm b/queries/bibtex/folds.scm new file mode 100644 index 000000000..3b24d5fea --- /dev/null +++ b/queries/bibtex/folds.scm @@ -0,0 +1,3 @@ +[ + (entry) +] @fold diff --git a/queries/bibtex/highlights.scm b/queries/bibtex/highlights.scm new file mode 100644 index 000000000..00cae314d --- /dev/null +++ b/queries/bibtex/highlights.scm @@ -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 diff --git a/queries/bibtex/indents.scm b/queries/bibtex/indents.scm new file mode 100644 index 000000000..af652160e --- /dev/null +++ b/queries/bibtex/indents.scm @@ -0,0 +1,10 @@ +[ + (entry) +] @indent + +[ + "{" + "}" +] @branch + +(comment) @ignore |
