-
Notifications
You must be signed in to change notification settings - Fork 131
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
Execute command support #274
Conversation
8d91e4a
to
aff4d2f
Compare
Reports rootmodules associated to passed file
a178b53
to
a8e8c69
Compare
Implemented var=value style argument handling for executeCommand, and added version attribute to response for future flexibility. Improved diagnostic push error handling (don't panic on connection closed). Add test cases for command handlers.
53a4b6b
to
5806e33
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me besides that one comment about error/panic handling and that one failing test, which probably just needs test data updated.
82727f3
to
075bb86
Compare
All comments addressed and tests passing, taking last review as approval |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Add support for command execution (https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_executeCommand). First command is
rootmodules
which given a file uri reports if the walker is still walking and the root modules the file is associated to. Multiple rootmodule associations can occur if the file in focus is a module definition for multiple projects.This PR establishes some design for requests which should pass
"var=value"
string arguments (prevent position from causing breaking changes), variables are case insensitive, values are interpreted asfloat64
, thenbool
and fallback tostring
, they can be accessed by thecommandArgs.Get<Type>
methods.Responses are a JSON object which is what the spec supports, they should have a
version
attribute starting at zero in case there is a need for breaking changes down the road.