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
You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain
Bug description
gopls offers test method generation autocompletion by typing in func Tes. But for some reason after test method is generated the text used for method generation gets copied outside of the method declation, please see this video:
go_autocomplete.mov
Steps to reproduce
open any go test file (xxx_test.go)
type in func Tes to see the autocompletion popup
press Enter
Expected behavior
test method should get generated without copying text to the end of the method declaration
Which Language Server did you use?
lsp-go with gopls
OS
MacOS
Error callstack
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered:
[Trace - 16:49:00.821 PM] Received response 'textDocument/completion - (3947)' in 0ms.
Result: {"isIncomplete":true,"itemDefaults":{"editRange":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}}},"items":[{"label":"TestSome(t *testing.T)","labelDetails":{},"kind":3,"documentation":"complete the parameter","preselect":true,"sortText":"00000","filterText":"TestSome(t *testing.T)","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":5},"end":{"line":2,"character":5}},"newText":"TestSome(t *testing.T)"}}]}
If I understand LSP correctly then having start == end like in "textEdit":{"range":{"start":{"line":2,"character":5},"end":{"line":2,"character":5}} means the completion will just insert text.
Thank you for the bug report
lsp-mode
related packages.M-x lsp-start-plain
Bug description
gopls offers test method generation autocompletion by typing in
func Tes
. But for some reason after test method is generated the text used for method generation gets copied outside of the method declation, please see this video:go_autocomplete.mov
Steps to reproduce
xxx_test.go
)func Tes
to see the autocompletion popupExpected behavior
test method should get generated without copying text to the end of the method declaration
Which Language Server did you use?
lsp-go with gopls
OS
MacOS
Error callstack
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: