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.
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 thesend
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?