-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Closed
Labels
FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.
Milestone
Description
gopls version v0.6.5
When vscode user selects 'Refactor...' context menu entry, vscode requests codeAction with "context": { ... "only": ["refactor"]}. Gopls doesn't return anything even though there are possible refactoring actions applicable to the selected range.
[Trace - 14:38:03.583 PM] Sending request 'textDocument/codeAction - (10)'.
Params: {
"textDocument":{"uri":"file:///Users/hakim/projects/w/main.go"},
"range":{"start":{"line":6,"character":0},"end":{"line":8,"character":3}},
"context":{"diagnostics":[],"only":["refactor"]}}
[Trace - 14:38:03.584 PM] Received response 'textDocument/codeAction - (10)' in 1ms.
Result: null
Compare against the result for the previous codeAction request on the same range:
[Trace - 14:37:57.484 PM] Sending request 'textDocument/codeAction - (8)'.
Params: {
"textDocument":{"uri":"file:///Users/hakim/projects/w/main.go"},
"range":{"start":{"line":6,"character":0},"end":{"line":8,"character":3}},
"context":{"diagnostics":[]}}
[Trace - 14:37:57.485 PM] Received response 'textDocument/codeAction - (8)' in 0ms.
Result: [{
"title":"Extract to function",
"kind":"refactor.extract","edit":{},
"command":{"title":"","command":"gopls.extract_function","arguments":["file:///Users/hakim/projects/w/main.go",{"start":{"line":6,"character":0},"end":{"line":8,"character":3}}]}}]
notmgsk
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.