lervag / vimtex

VimTeX: A modern Vim and neovim filetype plugin for LaTeX files.
MIT License
5.42k stars 389 forks source link

[Feature request] Support texlab language server #1371

Closed krishnakumarg1984 closed 5 years ago

krishnakumarg1984 commented 5 years ago

I had lots of fun using vimtex for writing a paper and my PhD thesis :). Thank you for developing and maintaining this modern plugin.

It is 2019 and Language servers are here! VSCode seems to be having a runaway success due to sharing common origins at the same company that formulated the nicely documented, open & editor-agnostic language server protocol (LSP).

Servers

The idea is that all aspects that are specific to a particular programming language are left to a dedicated language server. A compatible client (i.e. a text editor) can simply ask questions to the server and populate its UI with the response received. Various common tasks such as completions, hover-text, and go-to-definitions are thus offloaded to the server. Though not all language servers are mature yet, the well-documented, open specification means that these get continuous refinements from the community. The official set of language servers for various programming languages is available here.

Clients (for vim)

For vim, the language server capability (i.e. the client functionality that understands LSP lingo) is provided by a couple of plugins, notably languageclient-neovim (python) and vim-lsp (vimscript). A pull-request to bring in native LSP functionality to neovim is fairly mature & scheduled to land for v0.5.

LaTeX-specific information

The officially supported language server for LaTeX is TexLab which also handles BibTeX. I have had a positive experience using it in VSCode for which there exists a client plugin bearing the same name (TexLab).

Question

Can vimtex provide support for (i.e. play nicely with) TexLab? Already the modular codebase & design goals of vimtex instruct to use dedicated plugins for tasks such as completion, folding and reference doc. Instead of using a variety of plugins, using a language server might be a really good idea.

I am not sure what vimtex needs to do to support LSP. At the least, this possibility should be mentioned in the documentation (but only after testing).

clason commented 1 year ago

Those links were never meant to be public; just some snippets I shared privately.

At the risk of sounding like a broken record: there's nothing special about using VimTeX and Texlab in parallel; you just set each of them up as you like it.

lervag commented 1 year ago

Just wanted to let you know that the links to the gists for configuring for the co-existence of texlab and vimtex are now invalid, and give 404 errors.

Are you referring to something in the docs; i.e., should I update the docs?

krishnakumarg1984 commented 1 year ago

No. Just clason's links in this thread. VimTeX's doc mentions this thread, and when I tried to follow the gists linked here, they are gone. This could be frustrating for others who similarly come to this thread by following the documentation.