on master help sign in
Add support for the BibTeX file format (#5064)
d14de27Felipe S. S. Schneider
book/src/generated/lang-support.md+1
@@ -5,6 +5,7 @@
5| bash | ✓ | | | `bash-language-server` |
5| bash | ✓ | | | `bash-language-server` |
6| bass | ✓ | | | `bass` |
6| bass | ✓ | | | `bass` |
7| beancount | ✓ | | | |
7| beancount | ✓ | | | |
8+| bibtex | ✓ | | | `texlab` |
8| bicep | ✓ | | | `bicep-langserver` |
9| bicep | ✓ | | | `bicep-langserver` |
9| c | ✓ | ✓ | ✓ | `clangd` |
10| c | ✓ | ✓ | ✓ | `clangd` |
10| c-sharp | ✓ | ✓ | | `OmniSharp` |
11| c-sharp | ✓ | ✓ | | `OmniSharp` |
languages.toml+28
@@ -576,6 +576,34 @@ indent = { tab-width = 4, unit = "\t" }
576name = "latex"
576name = "latex"
577source = { git = "https://github.com/latex-lsp/tree-sitter-latex", rev = "8c75e93cd08ccb7ce1ccab22c1fbd6360e3bcea6" }
577source = { git = "https://github.com/latex-lsp/tree-sitter-latex", rev = "8c75e93cd08ccb7ce1ccab22c1fbd6360e3bcea6" }
578
578
579+[[language]]
580+name = "bibtex"
581+scope = "source.bib"
582+injection-regex = "bib"
583+file-types = ["bib"]
584+roots = []
585+comment-token = "%"
586+language-server = { command = "texlab" }
587+indent = { tab-width = 4, unit = "\t" }
588+auto-format = true
589+
590+[language.formatter]
591+command = 'bibtex-tidy'
592+args = [
593+ "-",
594+ "--curly",
595+ "--drop-all-caps",
596+ "--remove-empty-fields",
597+ "--sort-fields",
598+ "--sort=year,author,id",
599+ "--strip-enclosing-braces",
600+ "--trailing-commas",
601+]
602+
603+[[grammar]]
604+name = "bibtex"
605+source = { git = "https://github.com/latex-lsp/tree-sitter-bibtex", rev = "ccfd77db0ed799b6c22c214fe9d2937f47bc8b34" }
606+
579[[language]]
607[[language]]
580name = "lean"
608name = "lean"
581scope = "source.lean"
609scope = "source.lean"
runtime/queries/bibtex/highlights.scmnew file+47
@@ -0,0 +1,47 @@
1+[
2+ (string_type)
3+ (preamble_type)
4+ (entry_type)
5+] @keyword
6+
7+[
8+ (junk)
9+ (comment)
10+] @comment
11+
12+[
13+ "="
14+ "#"
15+] @operator
16+
17+(command) @function.builtin
18+
19+(number) @constant.numeric
20+
21+(field
22+ name: (identifier) @variable.builtin)
23+
24+(token
25+ (identifier) @variable.parameter)
26+
27+[
28+ (brace_word)
29+ (quote_word)
30+] @string
31+
32+[
33+ (key_brace)
34+ (key_paren)
35+] @attribute
36+
37+(string
38+ name: (identifier) @constant)
39+
40+[
41+ "{"
42+ "}"
43+ "("
44+ ")"
45+] @punctuation.bracket
46+
47+"," @punctuation.delimiter
runtime/queries/bibtex/locals.scmnew file

No changes to the content.

runtime/queries/bibtex/tags.scmnew file

No changes to the content.