A simple LSP server for your bibliographies
Project description
Bibli Language Server
A Language Server that brings bibliographies into your notes.
Supported LSP capabilities
| LSP Features | Behavior |
|---|---|
| textDocument/definition | Go to the first definition found in the .bib files. |
| textDocument/references | Find appearance of prefix + ID with ripgrep. |
| textDocument/hover | Show metadata from .bib files based on configurations. |
| textDocument/completion | Triggered by the cite_prefix configuration. Show completion of citation ID for bibtex entries and their documentation. |
| textDocument/diagnoistic | Find citations without a proper entry in the bibfile. |
Configuration
Create a configuration file .bibli.toml at the root of your note directory. Here is a sample configuration:
bibfiles = ["references.bib"] # Relative/Absolute path to your bibliographies
[cite]
prefix = "@" #
[hover.doc_format]
show_fields = ["abstract", "year", "booktitle", "url"]
format = "table" # Available formats: "table" and "list" (markdown)
[completion.doc_format]
show_fields = ["abstract", "year", "booktitle"]
format = "list"
Installation
Install the latest release of bibli-ls through pip:
pip install bibli-ls
Neovim
Automatic configuration through lspconfig has yet to be supported. To enable bibli-ls, put the following code in your Neovim config.
local lspconfig = require("lspconfig")
local configs = require("lspconfig.configs")
if not configs.bibli_ls then
configs.bibli_ls = {
default_config = {
cmd = { "bibli_ls" },
filetypes = { "markdown" },
root_dir = lspconfig.util.root_pattern(".bibli.toml"),
},
}
end
lspconfig.bibli_ls.setup({})
Planned Features (TODO)
- Universal: Works with any note format
- LSP-native configurations
- Per-document bibliographies
- More LSP capabilities
- mkdnflow.nvim-like opening of URL
- Code actions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bibli_ls-0.1.4.1.tar.gz.
File metadata
- Download URL: bibli_ls-0.1.4.1.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fe4d2848b281b1581a14b9a9d995f8230159cf7767c9a6274a366827cb7e9c5
|
|
| MD5 |
84d37d3bcce557f383c092ba08665015
|
|
| BLAKE2b-256 |
0b87792fda22afe269cb7060005948dbe89f8bbcd76895886754a2b56de0f32d
|
File details
Details for the file bibli_ls-0.1.4.1-py3-none-any.whl.
File metadata
- Download URL: bibli_ls-0.1.4.1-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8960013baf00a15587c26a336c10b9acc020f4b01e8e66da971811e87cf623f1
|
|
| MD5 |
1095a00595007a7562dc5ed704ef8a3c
|
|
| BLAKE2b-256 |
d271f2b880e238b9cec57c2aa4091874f4c5f573bb901cb1633cbd0b1f623925
|