You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be good to have a LspWindowCommand, which is enabled when there is any active session with a certain name/capability in this window (i.e. attached to any existing view of the window).
An example use case is to show documentation provided by the language server in a separate tab as HtmlSheet (rendered minihtml). It might be desired to run a request to the server, when a link within the HtmlSheet is clicked, but this is not possible via a LspTextCommand, because a HtmlSheet is not a View.
I have an implementation for the Julia language server, currently with an ugly workaround to store a reference to the session in a global variable when a certain LspTextCommand is run. Later, this global variable is used from a normal sublime_plugin.WindowCommand to run the server request. This has several drawbacks:
The WindowCommand only works after the LspTextCommand has been invoked at least one time
By using a single global variable for the session, the WindowCommand is not actually bound to the particular window. It is also active for other, entirely unrelated windows, and also it would be problematic if there exist multiple sessions of the language server at the same time.
There is no way to check if the session is still alive
The text was updated successfully, but these errors were encountered:
It would be good to have a LspWindowCommand, which is enabled when there is any active session with a certain name/capability in this window (i.e. attached to any existing view of the window).
An example use case is to show documentation provided by the language server in a separate tab as
HtmlSheet
(rendered minihtml). It might be desired to run a request to the server, when a link within the HtmlSheet is clicked, but this is not possible via a LspTextCommand, because a HtmlSheet is not aView
.I have an implementation for the Julia language server, currently with an ugly workaround to store a reference to the session in a global variable when a certain LspTextCommand is run. Later, this global variable is used from a normal
sublime_plugin.WindowCommand
to run the server request. This has several drawbacks:The text was updated successfully, but these errors were encountered: