Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/gopls: provide a way to run ExecuteCommand features in one step #40438
What version of Go are you using (
We do still need to look into how these code action kinds work, and maybe we will use them. Still, I think that a client executing commands directly will always be prone to errors and incompatibilities, at least until the protocol has a way to tell the client which arguments should be provided to which commands.
I'm not sure if this is something that the protocol will support, but microsoft/language-server-protocol#642 and microsoft/language-server-protocol#430 are relevant. It may be worth filing an issue for this specifically, as I'm sure that every language has to deal with this issue.
Unless something changes, the only "correct" way to call fillstruct will be to first call codeAction, as that's the only correct way of getting the command and checking if it's available to call.
Code actions that apply convenience fixes were filtered by the start line so it wasn't possible to narrow the scope to a specific range. This change allows clients to send a specific range (or cursor position) to filter all fixes where the range doesn't intersect with the provided range. It also widens the diagnostic returned by fillstruct analysis. The idea is to provide a way to narrow the scope without breaking clients that do want to ask for code actions using the entire line. Updates golang/go#40438 Change-Id: Ifd984a092a4a3bf0b3a2a5426d3e65023ba4eebc Reviewed-on: https://go-review.googlesource.com/c/tools/+/244519 Run-TryBot: Pontus Leitzler <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com> Reviewed-by: Rebecca Stambler <firstname.lastname@example.org>
Yes, the purpose here would be to provide a way for the client to ask for
I think that would be needed in the case of
If the user want to extract to function they call
That's why I suggest adding