Add support for the BibTeX file format (#5064)
This commit is contained in:
parent
37e7dd1df5
commit
d14de27709
5 changed files with 76 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
| bash | ✓ | | | `bash-language-server` |
|
||||
| bass | ✓ | | | `bass` |
|
||||
| beancount | ✓ | | | |
|
||||
| bibtex | ✓ | | | `texlab` |
|
||||
| bicep | ✓ | | | `bicep-langserver` |
|
||||
| c | ✓ | ✓ | ✓ | `clangd` |
|
||||
| c-sharp | ✓ | ✓ | | `OmniSharp` |
|
||||
|
|
|
@ -576,6 +576,34 @@ indent = { tab-width = 4, unit = "\t" }
|
|||
name = "latex"
|
||||
source = { git = "https://github.com/latex-lsp/tree-sitter-latex", rev = "8c75e93cd08ccb7ce1ccab22c1fbd6360e3bcea6" }
|
||||
|
||||
[[language]]
|
||||
name = "bibtex"
|
||||
scope = "source.bib"
|
||||
injection-regex = "bib"
|
||||
file-types = ["bib"]
|
||||
roots = []
|
||||
comment-token = "%"
|
||||
language-server = { command = "texlab" }
|
||||
indent = { tab-width = 4, unit = "\t" }
|
||||
auto-format = true
|
||||
|
||||
[language.formatter]
|
||||
command = 'bibtex-tidy'
|
||||
args = [
|
||||
"-",
|
||||
"--curly",
|
||||
"--drop-all-caps",
|
||||
"--remove-empty-fields",
|
||||
"--sort-fields",
|
||||
"--sort=year,author,id",
|
||||
"--strip-enclosing-braces",
|
||||
"--trailing-commas",
|
||||
]
|
||||
|
||||
[[grammar]]
|
||||
name = "bibtex"
|
||||
source = { git = "https://github.com/latex-lsp/tree-sitter-bibtex", rev = "ccfd77db0ed799b6c22c214fe9d2937f47bc8b34" }
|
||||
|
||||
[[language]]
|
||||
name = "lean"
|
||||
scope = "source.lean"
|
||||
|
|
47
runtime/queries/bibtex/highlights.scm
Normal file
47
runtime/queries/bibtex/highlights.scm
Normal file
|
@ -0,0 +1,47 @@
|
|||
[
|
||||
(string_type)
|
||||
(preamble_type)
|
||||
(entry_type)
|
||||
] @keyword
|
||||
|
||||
[
|
||||
(junk)
|
||||
(comment)
|
||||
] @comment
|
||||
|
||||
[
|
||||
"="
|
||||
"#"
|
||||
] @operator
|
||||
|
||||
(command) @function.builtin
|
||||
|
||||
(number) @constant.numeric
|
||||
|
||||
(field
|
||||
name: (identifier) @variable.builtin)
|
||||
|
||||
(token
|
||||
(identifier) @variable.parameter)
|
||||
|
||||
[
|
||||
(brace_word)
|
||||
(quote_word)
|
||||
] @string
|
||||
|
||||
[
|
||||
(key_brace)
|
||||
(key_paren)
|
||||
] @attribute
|
||||
|
||||
(string
|
||||
name: (identifier) @constant)
|
||||
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
"("
|
||||
")"
|
||||
] @punctuation.bracket
|
||||
|
||||
"," @punctuation.delimiter
|
0
runtime/queries/bibtex/locals.scm
Normal file
0
runtime/queries/bibtex/locals.scm
Normal file
0
runtime/queries/bibtex/tags.scm
Normal file
0
runtime/queries/bibtex/tags.scm
Normal file
Loading…
Reference in a new issue