Skip to main content

A simple LSP server for your bibliographies

Project description

Logo

Bibli Language Server

A Language Server that brings bibliographies into your notes.

image-version image-license image-python-versions

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bibli_ls-0.1.4.1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bibli_ls-0.1.4.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

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

Hashes for bibli_ls-0.1.4.1.tar.gz
Algorithm Hash digest
SHA256 8fe4d2848b281b1581a14b9a9d995f8230159cf7767c9a6274a366827cb7e9c5
MD5 84d37d3bcce557f383c092ba08665015
BLAKE2b-256 0b87792fda22afe269cb7060005948dbe89f8bbcd76895886754a2b56de0f32d

See more details on using hashes here.

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

Hashes for bibli_ls-0.1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8960013baf00a15587c26a336c10b9acc020f4b01e8e66da971811e87cf623f1
MD5 1095a00595007a7562dc5ed704ef8a3c
BLAKE2b-256 d271f2b880e238b9cec57c2aa4091874f4c5f573bb901cb1633cbd0b1f623925

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page