provide a "language server protocol" (lsp) to be able to use zotero directly from editors
The language server protocol (lsp) standard is increasingly becoming the standard way to provide completion / linting / popup etc to advanced editors: https://en.wikipedia.org/wiki/Language_Server_Protocol .
Can / would it be possible to have a Zotero lsp that would for example provide completion, preview (show the bibtex entry over hoover as a documentation), linting, etc, of the citations available in Zotero?
I.e., as a user, I would like to be able to enable a Zotero lsp in visual studio code / vim / helix / other, so that when I type \cite{ or \citep{ or \citet{ or similar, I get autocompletion from the running Zotero app.
As a user, I would also like, if I hoover over a citation like \cite{some_bibtex_id} , to be able to "go to definition" or "show documentation" on the some_bibtex_id, which would display either the pdf of the bibtex entry.
Can / would it be possible to have a Zotero lsp that would for example provide completion, preview (show the bibtex entry over hoover as a documentation), linting, etc, of the citations available in Zotero?
I.e., as a user, I would like to be able to enable a Zotero lsp in visual studio code / vim / helix / other, so that when I type \cite{ or \citep{ or \citet{ or similar, I get autocompletion from the running Zotero app.
As a user, I would also like, if I hoover over a citation like \cite{some_bibtex_id} , to be able to "go to definition" or "show documentation" on the some_bibtex_id, which would display either the pdf of the bibtex entry.
How would this be different from BBT "Keep updated" + a BibTeX editor plugin?
I may be wrong of course, but I think that this has evolved quite a bit and that dedicated plugins are a thing mostly of the past now :) . Some editors support LSPs out of the box in their core feature (see for example https://code.visualstudio.com/api/language-extensions/language-server-extension-guide
https://s3.amazonaws.com/zotero.org/images/forums/u7216216/uso2co23kzv94q0islvs.png
, https://docs.helix-editor.com/lang-support.html , https://zed.dev/docs/configuring-zed#lsp , https://neovim.io/doc/user/lsp.html , etc ), while some others require installing a general plugin to enable LSPs but this is just a single plugin to interact with any LSP from there (https://github.com/prabirshrestha/vim-lsp ).
> But the lsp plugin would also have to parse latex or markdown no?
and
> If it's just reacting to some lsp verbs I can give it a shot for stuff relating to latex
Agree that it could be made to simply react to \cite{ , \citep{ , \citet{ control sequences to open the LSP Zotero autocomplete functionality. Maybe providing a config in the form of a JSON file of admitted prefixes triggering Zotero LSP autocomplete would be good too, so this can be customized? :) . I do not think it is necessary to go all the way to a tree-sitter parsing or similar parsing to determine where to enable the LSP autocomplete.
> Someone will have to open an issue for it on the BBT github project and be willing to help hash it out and test
which GH project does BBT refer to? :) Would be happy to help with the testing, no experience developing LSPs on my side.