~xerool/fennel-ls#33: 
Invalid config should report problem

Currently when your config contains an incorrect value (for example :lua-version "luajit") it will crash the whole thing with a stack trace. It would be better if it displayed the problem to the end user using https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_showMessage before crashing so they don't have to dig thru the logs to find out which lua versions are accepted.

Status
REPORTED
Submitter
~technomancy
Assigned to
No-one
Submitted
3 months ago
Updated
3 months ago
Labels
No labels applied.

~technomancy 3 months ago

I took a look at this, and it's easy to detect the problem for lua-version and libraries specifically, (by pcalling get-all-globals) but I'm not sure how to report it, because the send function is not exposed anywhere I could find that can be easily detected. Plus not all configuration problems are doc config problems, so perhaps a more thorough config validation is needed?

Register here or Log in to comment, or comment via email.