TypeFox / yang-lsp

A Language Server for YANG
http://www.yang-central.org
Apache License 2.0
52 stars 13 forks source link

Command extensions not working #94

Closed JanKoehnlein closed 6 years ago

JanKoehnlein commented 6 years ago

https://github.com/theia-ide/yang-lsp/pull/95

JanKoehnlein commented 6 years ago

The problem was that the URI passed as parameter to the command on the LSP was determined using the selection provider. When the current selection is in the file browser, as it is after startup, that URI was the workspace URI resulting in an exception on the server (no resource factory). We now use the currentEditor instead which seems to work fine. We use that also for the visibility of the menu entry, such that it only appears in the context menu of yang editors.

https://github.com/theia-ide/yangster/pull/49

JanKoehnlein commented 6 years ago

Note that the context menu entry does not pop up until the LS is initialized. You my have to retrigger the context menu.