-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash On Unrecognized CompletionItemKind #460
Comments
Hmmm, we do assume that enumerations have fixed sets of values unless the spec says that they're extensible. The new, machine-readable version of the spec even has a special property for enumerations that allow custom values - and |
Thanks, it seems like this is indeed a bug, and all enumerations are expected to be open. I'll fix this in my metamodel-generation branch, but I probably won't fix this in current versions of |
Thanks @michaelpj, When you say it won't be fixed in current versions of |
Sorry, I meant the "current design" I guess. I have a very large PR that redoes almost the whole package, I'm not planning to modify the existing code until that hits. That said, if this is a real blocker for you I'd accept a PR and do a minor release. |
Argh, I did not in fact fix this! I forgot about this insanity where literally all enums are open. Still need to do it. |
I am attempting to build a language client against haskell-language-server in Visual Studio 2019.
When I follow the instructions for doing so however, haskell-language-server-wrapper fails with the following error
Upon further investigation, it seems the issue is that in the
CompletionItemKind
enumeration defined inMicrosoft.VisualStudio.LanguageServer.Protocol.dll
, the first element of this enumeration isNone
. Visual Studio attempts to pass all members of this enumeration as supported completion kinds to the language server. In the A.FromJSON declaration,None
is not a valid identifier, resulting infail "CompletionItemKind"
being called, which I believe is what leads to the exception above.According to the LSP Specifiaction:
There are actually 13 "additional" values in the
CompletionItemKind
enum ofMicrosoft.VisualStudio.LanguageServer.Protocol.dll
, so I believe the key issue here is that haskell/lsp (and by extension haskell-language-server) do not correctly ignore unknown enumeration values as recommended by the LSP specification. This may potentially affect other LSP enumeration kinds implemented by this project as wellAttached is the log output of haskell-language-server-wrapper that generated this error
log.log
The text was updated successfully, but these errors were encountered: