Pavel Korytov :emacs:☮️ on Nostr: A lot of trouble with the new #Vue #LSP. First, it disables all other typescript ...
A lot of trouble with the new #Vue #LSP.
First, it disables all other typescript LSPs, even if there is no Vue in the project; fortunately, this can be fixed with:
(setq lsp-volar-take-over-mode nil)
Maybe a better way would be to advise `lsp-volar--activate-p' to detect Vue by parsing package.json.
Second, somehow the server sends empty "textDocument/publishDiagnostics" messages about a second after sending one with diagnostics! As a result, the diagnostics appear for a second and then disappear.
For now, I've worked around that by advising `lsp--on-diagnostics' to ignore empty messages if they come less than five seconds after a non-empty one. Not sure where to go next with this.
The code:
https://sqrtminusone.xyz/configs/emacs/#fix-vue-semantic-serverFinally, the server sometimes crashes randomly. It happened once or twice today.
#Emacs
Published at
2025-04-20 21:54:47Event JSON
{
"id": "8c2a4426b01da57d829bbcb5d47aaf0991ced3d41ed70a8a1a706498fc04b268",
"pubkey": "a0beb2d46e7c459f153950cf3af3c6e29ba1d316d08d9e92c9317c0687c99b55",
"created_at": 1745186087,
"kind": 1,
"tags": [
[
"t",
"vue"
],
[
"t",
"lsp"
],
[
"t",
"emacs"
],
[
"proxy",
"https://mastodon.bsd.cafe/users/sqrtminusone/statuses/114372515446062898",
"activitypub"
],
[
"client",
"Mostr",
"31990:6be38f8c63df7dbf84db7ec4a6e6fbbd8d19dca3b980efad18585c46f04b26f9:mostr",
"wss://relay.mostr.pub"
]
],
"content": "A lot of trouble with the new #Vue #LSP.\n\nFirst, it disables all other typescript LSPs, even if there is no Vue in the project; fortunately, this can be fixed with:\n\n(setq lsp-volar-take-over-mode nil)\n\nMaybe a better way would be to advise `lsp-volar--activate-p' to detect Vue by parsing package.json.\n\nSecond, somehow the server sends empty \"textDocument/publishDiagnostics\" messages about a second after sending one with diagnostics! As a result, the diagnostics appear for a second and then disappear.\n\nFor now, I've worked around that by advising `lsp--on-diagnostics' to ignore empty messages if they come less than five seconds after a non-empty one. Not sure where to go next with this.\n\nThe code: https://sqrtminusone.xyz/configs/emacs/#fix-vue-semantic-server\n\nFinally, the server sometimes crashes randomly. It happened once or twice today.\n\n#Emacs",
"sig": "1884f7540a22501e0d3d8415a6dd006ef954425ada854396949d870a3592bebd2bc583c580d2c2b9bbcaccd116ba7ad41d7f05c4dbcbfa345eba8bef65cba4ab"
}