For certain filetypes, I'm getting a continuous spinner for the filetype indicator, and I'm now also getting an error on screen.
It looks to be because the code below checks if Oni has language server config setup for the current file type, but not if the current machine is capable of running this LSP.
Ie, for Python and C++, Oni has default config for these LSPs, but my machine does not have either of these language servers installed, meaning the code is ran and errors.
In reality, the check should be if pyls is available, but not sure how easy that would be to add, or how robust.
Feels like this sort of issue would benefit from some form of information notification ie Pyls can not be started but that requires a system for the notifications and also a system to show it once, and not every time a buffer is swapped into (which is how often the error is shown).
In reality, the check should be if pyls is available, but not sure how easy that would be to add, or how robust.
Definitely! I was thinking about adding a setting like language.python.languageServer.testCommand and language.python.languageServer.testArguments. These should be really simple commands - perhaps for pyls it's like pyls --version.
In addition, I'd like to add a configuration like: language.python.languageServer.instructionsUrl. This would work with the test command - we'd try the test command out, and if it failed to launch, we'd pop up a notification saying "Hey, we noticed you don't have pyls installed. Click here for instructions".
Most helpful comment
Definitely! I was thinking about adding a setting like
language.python.languageServer.testCommandandlanguage.python.languageServer.testArguments. These should be really simple commands - perhaps forpylsit's likepyls --version.In addition, I'd like to add a configuration like:
language.python.languageServer.instructionsUrl. This would work with the test command - we'd try the test command out, and if it failed to launch, we'd pop up a notification saying "Hey, we noticed you don't havepylsinstalled. Click here for instructions".