I'm developing an language extension for vscode for a DSL. The architecture uses the vscode-languageserver-node infrastructure from microsoft's github, with a REST back-end that can evaluate the DSL.
I have a command called Evaluate, which should send the current opened file text to the back-end server for evaluation.
I tried modeling it as a server-side command that gets executed with onExecuteCommand
, however in the server handler for this, there isn't really a way to find out which is the current focused source file in the client. At least not that I can tell.
I suppose I could just model it as a client command and then manually call sendRequest(ExecuteCommandRequest)
with parameters that contain the info I need, to the server in that client handler, but I wonder if I'm missing something.