Comments (10)
Well, if nothing else, texlab and vim-lsp are excellent stress tests for each other 😁
from texlab.
Building after save is now disabled by default. We never intended it to be enabled by default. One can opt-in/opt-out using the workspace/configuration request. Unfortunately, vim-lsp does not seem to support this request (yet). A list of all settings can be found on our website.
from texlab.
Thank you! I'll be happy to open an issue about that on vim-lsp.
(It seems that the promise of LSP interoperability quickly turns to dust once you leave the beaten path between VS Code and TypeScript servers...)
from texlab.
Hmm... vim-lsp claims to support configuration: https://github.com/prabirshrestha/vim-lsp/blob/d542bbc5a3b0b2d78552a11f4edfee1c55fc3796/doc/vim-lsp.txt#L552
Is that not enough, or is that simply not working (properly)?
from texlab.
Hmm, I think they support the initialziationOptions
field of the InitializeParams
interface (see https://microsoft.github.io/language-server-protocol/specification#initialize). However, this is not the same as the workspace/configuration request. vim-lsp responds with a "method not found" error if TexLab sends this request (which it does not do anymore if the client does not support it).
The log from issue #22 shows that vim-lsp does not support this request:
Thu 27 Jun 2019 02:40:55 PM CEST:["--->", 5, "texlab", {"method": "textDocument/formatting", "on_notification": "---funcref---", "sync": 0, "params": {"options": {"insertSpaces": true, "tabSize": 8}, "textDocument": {"uri": "file:///home/clason/Dropbox/tex/NonsmoothBook/nonsmooth.bib"}}}]
Thu 27 Jun 2019 02:40:55 PM CEST:["<---", 5, {"method": "workspace/configuration", "jsonrpc": "2.0", "id": 1, "params": {"items": [{"section": "bibtex.formatting"}]}}]
Thu 27 Jun 2019 02:40:55 PM CEST:["--->", 5, "texlab", {"id": 1, "error": {"code": -32601, "message": "Method not found"}}]
Thu 27 Jun 2019 02:40:55 PM CEST:["<---(stderr)", 5, "texlab", ["TRACE - Received message:", "{\"id\": 2, \"jsonrpc\": \"2.0\", \"method\": \"textDocument/formatting\", \"params\": {\"options\": {\"insertSpaces\": true, \"tabSize\": 8}, \"textDocument\": {\"uri\": \"file:///home/clason/Dropbox/tex/NonsmoothBook/nonsmooth.bib\"}}}", "TRACE - Sent message:", "Content-Length: 112\r", "\r", "{\"jsonrpc\":\"2.0\",\"method\":\"workspace/configuration\",\"params\":{\"items\":[{\"section\":\"bibtex.formatting\"}]},\"id\":1}", ""]]
Thu 27 Jun 2019 02:40:55 PM CEST:["invalid response id. ignoring message", {"id": null, "jsonrpc": "2.0", "error": {"code": -32700, "message": "Could not parse the input"}}]
Thu 27 Jun 2019 02:40:55 PM CEST:["<---(stderr)", 5, "texlab", ["TRACE - Received message:", "{\"id\": 1, \"jsonrpc\": \"2.0\", \"error\": {\"code\": -32601, \"message\": \"Method not found\"}}", "TRACE - Sent message:", "Content-Length: 89\r", "\r", "{\"jsonrpc\":\"2.0\",\"error\":{\"code\":-32700,\"message\":\"Could not parse the input\"},\"id\":null}", ""]]
from texlab.
Thanks, reported up(down?)stream: prabirshrestha/vim-lsp#426
from texlab.
Is there some standardized way for client and server to announce the version of the protocol they are supporting? Looking at the changelog, the specification gets so much churn, I wonder how LSP is actually supposed to work in practice...
from texlab.
Both client and server send a list of capabilities they support when initializing the connection.
See the ClientCapabilities
and ServerCapabilities
interfaces for more information (https://microsoft.github.io/language-server-protocol/specification#initialize).
from texlab.
Ah, ok, that makes sense! So this was not working because vim-lsp (still) does not send properly formatted json 2.0 messages.
from texlab.
Yeah, we falsely assumed that all clients support the workspace/configuration request.
After requesting the configuration, vim-lsp does not send a properly formatted JSONRPC-2.0 message, which in turn crashes our server.
from texlab.
Related Issues (20)
- Syntax extension of the \label command when using cleveref package
- Regression? finding project root HOT 10
- Autocomplete in \ref{} is empty when using colon in Neovim. HOT 2
- Thmtool's \declaretheorem should also accept list of environment names HOT 1
- ConcealLevel Support? HOT 2
- Custom LaTeX Commands Misinterpreted as Citations Causing Errors
- Support more macros for defining commands
- Support "Go To References" for commands
- Generic inverse search using show document request
- Disabling individual warnings HOT 1
- Allow extending label commands (not just ref)
- Lsp panics after deleting last line of a file HOT 6
- Forward search broken with empty latexmkrc
- project detection: .latexmkrc in higher level parent directory HOT 2
- texlab reports dublicate and unused label in macro definition
- Feature request: support apastyle prenotes
- BibLaTeX globbing patterns (`\addbibresource[glob]{}`) do not seem to read the `.bib` files under `nvim` HOT 1
- Diagnostics not displayed with `$aux_dir`
- Texlab lsp server exits on unicode letter 1F582 HOT 4
- ignore single warnings/errors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from texlab.