Skip to content
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

golang incorrect indentation after select keyword #5610

Closed
TuM0xA-S opened this issue Jan 20, 2023 · 1 comment · Fixed by #5713
Closed

golang incorrect indentation after select keyword #5610

TuM0xA-S opened this issue Jan 20, 2023 · 1 comment · Fixed by #5713
Labels
A-language-support Area: Support for programming/text languages C-bug Category: This is a bug E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors

Comments

@TuM0xA-S
Copy link

TuM0xA-S commented Jan 20, 2023

Summary

initial code

package main

func main() {
}

after entering select, opening bracket, and pressing enter

package main

func main() {
	select {
	
}
}

Reproduction Steps

I tried this:

  1. hx <code like in example>
  2. press "jjoselect {"

I expected this to happen:
correct indentation of closing bracket
Instead, this happened:
bracket indented incorrectly

Helix log

~/.cache/helix/helix.log
2023-01-20T22:11:01.300 helix_loader [DEBUG] Located configuration folders: []
2023-01-20T22:11:01.326 helix_view::clipboard [INFO] Using xclip to interact with the system and selection (primary) clipboard
2023-01-20T22:11:01.341 mio::poll [TRACE] registering event source with poller: token=Token(0), interests=READABLE | WRITABLE
2023-01-20T22:11:01.341 mio::poll [TRACE] registering event source with poller: token=Token(1), interests=READABLE | WRITABLE
2023-01-20T22:11:01.341 mio::poll [TRACE] registering event source with poller: token=Token(2), interests=READABLE | WRITABLE
2023-01-20T22:11:01.341 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"completion":{"completionItem":{"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":false},"completionItemKind":{}},"hover":{"contentFormat":["markdown"]},"publishDiagnostics":{},"rename":{"dynamicRegistration":false,"honorsChangeAnnotations":false,"prepareSupport":false},"signatureHelp":{"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown"],"parameterInformation":{"labelOffsetSupport":true}}}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":false},"executeCommand":{"dynamicRegistration":false},"symbol":{"dynamicRegistration":false},"workspaceFolders":true}},"clientInfo":{"name":"helix","version":"22.12 (051cd786)"},"processId":263990,"rootPath":"/home/tum0xa/src/golearn","rootUri":"file:///home/tum0xa/src/golearn","workspaceFolders":[{"name":"golearn","uri":"file:///home/tum0xa/src/golearn"}]},"id":0}
2023-01-20T22:11:01.342 helix_view::editor [DEBUG] editor status: Loaded 1 file.
2023-01-20T22:11:01.342 mio::poll [TRACE] registering event source with poller: token=Token(3), interests=READABLE | WRITABLE
2023-01-20T22:11:01.342 mio::poll [TRACE] registering event source with poller: token=Token(4), interests=READABLE | WRITABLE
2023-01-20T22:11:01.342 mio::poll [TRACE] registering event source with poller: token=Token(0), interests=READABLE
2023-01-20T22:11:01.342 mio::poll [TRACE] registering event source with poller: token=Token(1), interests=READABLE
2023-01-20T22:11:01.342 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:01.398 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor.extract","refactor.rewrite","source.fixAll","source.organizeImports"]},"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"renameProvider":true,"foldingRangeProvider":true,"executeCommandProvider":{"commands":["gopls.add_dependency","gopls.add_import","gopls.apply_fix","gopls.check_upgrades","gopls.edit_go_directive","gopls.fetch_vulncheck_result","gopls.gc_details","gopls.generate","gopls.generate_gopls_mod","gopls.go_get_package","gopls.list_imports","gopls.list_known_packages","gopls.regenerate_cgo","gopls.remove_dependency","gopls.reset_go_mod_diagnostics","gopls.run_govulncheck","gopls.run_tests","gopls.start_debugging","gopls.test","gopls.tidy","gopls.toggle_gc_details","gopls.update_go_sum","gopls.upgrade_dependency","gopls.vendor"]},"callHierarchyProvider":true,"inlayHintProvider":{},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"},"fileOperations":{}}},"serverInfo":{"name":"gopls","version":"{\"GoVersion\":\"go1.18.1\",\"Path\":\"golang.org/x/tools/gopls\",\"Main\":{\"Path\":\"golang.org/x/tools/gopls\",\"Version\":\"v0.11.0\",\"Sum\":\"h1:/nvKHdTtePQmrv9XN3gIUN9MOdUrKzO/dcqgbG6x8EY=\",\"Replace\":null},\"Deps\":[{\"Path\":\"github.com/BurntSushi/toml\",\"Version\":\"v1.2.1\",\"Sum\":\"h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=\",\"Replace\":null},{\"Path\":\"github.com/google/go-cmp\",\"Version\":\"v0.5.9\",\"Sum\":\"h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=\",\"Replace\":null},{\"Path\":\"github.com/sergi/go-diff\",\"Version\":\"v1.1.0\",\"Sum\":\"h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=\",\"Replace\":null},{\"Path\":\"golang.org/x/exp\",\"Version\":\"v0.0.0-20221031165847-c99f073a8326\",\"Sum\":\"h1:QfTh0HpN6hlw6D3vu8DAwC8pBIwikq0AI1evdm+FksE=\",\"Replace\":null},{\"Path\":\"golang.org/x/exp/typeparams\",\"Version\":\"v0.0.0-20221031165847-c99f073a8326\",\"Sum\":\"h1:fl8k2zg28yA23264d82M4dp+YlJ3ngDcpuB1bewkQi4=\",\"Replace\":null},{\"Path\":\"golang.org/x/mod\",\"Version\":\"v0.7.0\",\"Sum\":\"h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA=\",\"Replace\":null},{\"Path\":\"golang.org/x/sync\",\"Version\":\"v0.1.0\",\"Sum\":\"h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=\",\"Replace\":null},{\"Path\":\"golang.org/x/sys\",\"Version\":\"v0.2.0\",\"Sum\":\"h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=\",\"Replace\":null},{\"Path\":\"golang.org/x/text\",\"Version\":\"v0.4.0\",\"Sum\":\"h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=\",\"Replace\":null},{\"Path\":\"golang.org/x/tools\",\"Version\":\"v0.3.1-0.20221213193459-ca17b2c27ca8\",\"Sum\":\"h1:7/HkGkN/2ktghBCSRRgp31wAww4syfsW52tj7yirjWk=\",\"Replace\":null},{\"Path\":\"golang.org/x/vuln\",\"Version\":\"v0.0.0-20221109205719-3af8368ee4fe\",\"Sum\":\"h1:qptQiQwEpETwDiz85LKtChqif9xhVkAm8Nhxs0xnTww=\",\"Replace\":null},{\"Path\":\"honnef.co/go/tools\",\"Version\":\"v0.3.3\",\"Sum\":\"h1:oDx7VAwstgpYpb3wv0oxiZlxY+foCpRAwY7Vk6XpAgA=\",\"Replace\":null},{\"Path\":\"mvdan.cc/gofumpt\",\"Version\":\"v0.4.0\",\"Sum\":\"h1:JVf4NN1mIpHogBj7ABpgOyZc65/UUOkKQFkoURsz4MM=\",\"Replace\":null},{\"Path\":\"mvdan.cc/xurls/v2\",\"Version\":\"v2.4.0\",\"Sum\":\"h1:tzxjVAj+wSBmDcF6zBB7/myTy3gX9xvi8Tyr28AuQgc=\",\"Replace\":null}],\"Settings\":[{\"Key\":\"-compiler\",\"Value\":\"gc\"},{\"Key\":\"CGO_ENABLED\",\"Value\":\"1\"},{\"Key\":\"CGO_CFLAGS\",\"Value\":\"\"},{\"Key\":\"CGO_CPPFLAGS\",\"Value\":\"\"},{\"Key\":\"CGO_CXXFLAGS\",\"Value\":\"\"},{\"Key\":\"CGO_LDFLAGS\",\"Value\":\"\"},{\"Key\":\"GOARCH\",\"Value\":\"amd64\"},{\"Key\":\"GOOS\",\"Value\":\"linux\"},{\"Key\":\"GOAMD64\",\"Value\":\"v1\"}],\"Version\":\"v0.11.0\"}"}},"id":0}
2023-01-20T22:11:01.398 helix_lsp::transport [INFO] <- {"capabilities":{"callHierarchyProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor.extract","refactor.rewrite","source.fixAll","source.organizeImports"]},"codeLensProvider":{},"completionProvider":{"triggerCharacters":["."]},"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{},"documentSymbolProvider":true,"executeCommandProvider":{"commands":["gopls.add_dependency","gopls.add_import","gopls.apply_fix","gopls.check_upgrades","gopls.edit_go_directive","gopls.fetch_vulncheck_result","gopls.gc_details","gopls.generate","gopls.generate_gopls_mod","gopls.go_get_package","gopls.list_imports","gopls.list_known_packages","gopls.regenerate_cgo","gopls.remove_dependency","gopls.reset_go_mod_diagnostics","gopls.run_govulncheck","gopls.run_tests","gopls.start_debugging","gopls.test","gopls.tidy","gopls.toggle_gc_details","gopls.update_go_sum","gopls.upgrade_dependency","gopls.vendor"]},"foldingRangeProvider":true,"hoverProvider":true,"implementationProvider":true,"inlayHintProvider":{},"referencesProvider":true,"renameProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"textDocumentSync":{"change":2,"openClose":true,"save":{}},"typeDefinitionProvider":true,"workspace":{"fileOperations":{},"workspaceFolders":{"changeNotifications":"workspace/didChangeWorkspaceFolders","supported":true}},"workspaceSymbolProvider":true},"serverInfo":{"name":"gopls","version":"{\"GoVersion\":\"go1.18.1\",\"Path\":\"golang.org/x/tools/gopls\",\"Main\":{\"Path\":\"golang.org/x/tools/gopls\",\"Version\":\"v0.11.0\",\"Sum\":\"h1:/nvKHdTtePQmrv9XN3gIUN9MOdUrKzO/dcqgbG6x8EY=\",\"Replace\":null},\"Deps\":[{\"Path\":\"github.com/BurntSushi/toml\",\"Version\":\"v1.2.1\",\"Sum\":\"h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=\",\"Replace\":null},{\"Path\":\"github.com/google/go-cmp\",\"Version\":\"v0.5.9\",\"Sum\":\"h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=\",\"Replace\":null},{\"Path\":\"github.com/sergi/go-diff\",\"Version\":\"v1.1.0\",\"Sum\":\"h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=\",\"Replace\":null},{\"Path\":\"golang.org/x/exp\",\"Version\":\"v0.0.0-20221031165847-c99f073a8326\",\"Sum\":\"h1:QfTh0HpN6hlw6D3vu8DAwC8pBIwikq0AI1evdm+FksE=\",\"Replace\":null},{\"Path\":\"golang.org/x/exp/typeparams\",\"Version\":\"v0.0.0-20221031165847-c99f073a8326\",\"Sum\":\"h1:fl8k2zg28yA23264d82M4dp+YlJ3ngDcpuB1bewkQi4=\",\"Replace\":null},{\"Path\":\"golang.org/x/mod\",\"Version\":\"v0.7.0\",\"Sum\":\"h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA=\",\"Replace\":null},{\"Path\":\"golang.org/x/sync\",\"Version\":\"v0.1.0\",\"Sum\":\"h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=\",\"Replace\":null},{\"Path\":\"golang.org/x/sys\",\"Version\":\"v0.2.0\",\"Sum\":\"h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=\",\"Replace\":null},{\"Path\":\"golang.org/x/text\",\"Version\":\"v0.4.0\",\"Sum\":\"h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=\",\"Replace\":null},{\"Path\":\"golang.org/x/tools\",\"Version\":\"v0.3.1-0.20221213193459-ca17b2c27ca8\",\"Sum\":\"h1:7/HkGkN/2ktghBCSRRgp31wAww4syfsW52tj7yirjWk=\",\"Replace\":null},{\"Path\":\"golang.org/x/vuln\",\"Version\":\"v0.0.0-20221109205719-3af8368ee4fe\",\"Sum\":\"h1:qptQiQwEpETwDiz85LKtChqif9xhVkAm8Nhxs0xnTww=\",\"Replace\":null},{\"Path\":\"honnef.co/go/tools\",\"Version\":\"v0.3.3\",\"Sum\":\"h1:oDx7VAwstgpYpb3wv0oxiZlxY+foCpRAwY7Vk6XpAgA=\",\"Replace\":null},{\"Path\":\"mvdan.cc/gofumpt\",\"Version\":\"v0.4.0\",\"Sum\":\"h1:JVf4NN1mIpHogBj7ABpgOyZc65/UUOkKQFkoURsz4MM=\",\"Replace\":null},{\"Path\":\"mvdan.cc/xurls/v2\",\"Version\":\"v2.4.0\",\"Sum\":\"h1:tzxjVAj+wSBmDcF6zBB7/myTy3gX9xvi8Tyr28AuQgc=\",\"Replace\":null}],\"Settings\":[{\"Key\":\"-compiler\",\"Value\":\"gc\"},{\"Key\":\"CGO_ENABLED\",\"Value\":\"1\"},{\"Key\":\"CGO_CFLAGS\",\"Value\":\"\"},{\"Key\":\"CGO_CPPFLAGS\",\"Value\":\"\"},{\"Key\":\"CGO_CXXFLAGS\",\"Value\":\"\"},{\"Key\":\"CGO_LDFLAGS\",\"Value\":\"\"},{\"Key\":\"GOARCH\",\"Value\":\"amd64\"},{\"Key\":\"GOOS\",\"Value\":\"linux\"},{\"Key\":\"GOAMD64\",\"Value\":\"v1\"}],\"Version\":\"v0.11.0\"}"}}
2023-01-20T22:11:01.398 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"initialized","params":{}}
2023-01-20T22:11:01.398 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: None, method: "initialized", params: None })))
2023-01-20T22:11:01.398 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"go","text":"package main\n\nfunc main() {\n}","uri":"file:///home/tum0xa/src/golearn/main.go","version":0}}}
2023-01-20T22:11:01.398 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:01.398 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"5577006791947779410"},"id":1}
2023-01-20T22:11:01.398 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, MethodCall(MethodCall { jsonrpc: Some(V2), method: "window/workDoneProgress/create", params: Map({"token": String("5577006791947779410")}), id: Num(1) })))
2023-01-20T22:11:01.399 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","result":null,"id":1}
2023-01-20T22:11:01.399 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"$/progress","params":{"token":"5577006791947779410","value":{"kind":"begin","title":"Setting up workspace","message":"Loading packages..."}}}
2023-01-20T22:11:01.399 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "$/progress", params: Map({"token": String("5577006791947779410"), "value": Object {"kind": String("begin"), "message": String("Loading packages..."), "title": String("Setting up workspace")}}) })))
2023-01-20T22:11:01.399 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"workspace/configuration","params":{"items":[{"scopeUri":"file:///home/tum0xa/src/golearn","section":"gopls"}]},"id":2}
2023-01-20T22:11:01.399 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, MethodCall(MethodCall { jsonrpc: Some(V2), method: "workspace/configuration", params: Map({"items": Array [Object {"scopeUri": String("file:///home/tum0xa/src/golearn"), "section": String("gopls")}]}), id: Num(2) })))
2023-01-20T22:11:01.399 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","result":[null],"id":2}
2023-01-20T22:11:01.417 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2023/01/20 22:11:01 go env for /home/tum0xa/src/golearn\n(root /home/tum0xa/src/golearn)\n(go version go version go1.18.1 linux/amd64)\n(valid build configuration = true)\n(build flags: [])\nGOSUMDB=sum.golang.org\nGOPRIVATE=\nGOPATH=/home/tum0xa/go\nGOROOT=/usr/lib/go-1.18\nGOINSECURE=\nGONOSUMDB=\nGOMOD=/home/tum0xa/src/golearn/go.mod\nGO111MODULE=\nGOWORK=\nGOFLAGS=\nGOMODCACHE=/home/tum0xa/go/pkg/mod\nGONOPROXY=\nGOPROXY=https://proxy.golang.org,direct\nGOCACHE=/home/tum0xa/.cache/go-build\n\n"}}
2023-01-20T22:11:01.417 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "window/logMessage", params: Map({"message": String("2023/01/20 22:11:01 go env for /home/tum0xa/src/golearn\n(root /home/tum0xa/src/golearn)\n(go version go version go1.18.1 linux/amd64)\n(valid build configuration = true)\n(build flags: [])\nGOSUMDB=sum.golang.org\nGOPRIVATE=\nGOPATH=/home/tum0xa/go\nGOROOT=/usr/lib/go-1.18\nGOINSECURE=\nGONOSUMDB=\nGOMOD=/home/tum0xa/src/golearn/go.mod\nGO111MODULE=\nGOWORK=\nGOFLAGS=\nGOMODCACHE=/home/tum0xa/go/pkg/mod\nGONOPROXY=\nGOPROXY=https://proxy.golang.org,direct\nGOCACHE=/home/tum0xa/.cache/go-build\n\n"), "type": Number(3)}) })))
2023-01-20T22:11:01.417 helix_term::application [INFO] window/logMessage: LogMessageParams { typ: Info, message: "2023/01/20 22:11:01 go env for /home/tum0xa/src/golearn\n(root /home/tum0xa/src/golearn)\n(go version go version go1.18.1 linux/amd64)\n(valid build configuration = true)\n(build flags: [])\nGOSUMDB=sum.golang.org\nGOPRIVATE=\nGOPATH=/home/tum0xa/go\nGOROOT=/usr/lib/go-1.18\nGOINSECURE=\nGONOSUMDB=\nGOMOD=/home/tum0xa/src/golearn/go.mod\nGO111MODULE=\nGOWORK=\nGOFLAGS=\nGOMODCACHE=/home/tum0xa/go/pkg/mod\nGONOPROXY=\nGOPROXY=https://proxy.golang.org,direct\nGOCACHE=/home/tum0xa/.cache/go-build\n\n" }
2023-01-20T22:11:01.418 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:01.527 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2023/01/20 22:11:01 go/packages.Load #1\n\tsnapshot=0\n\tdirectory=file:///home/tum0xa/src/golearn\n\tquery=[builtin golearn/...]\n\tpackages=4\n"}}
2023-01-20T22:11:01.527 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "window/logMessage", params: Map({"message": String("2023/01/20 22:11:01 go/packages.Load #1\n\tsnapshot=0\n\tdirectory=file:///home/tum0xa/src/golearn\n\tquery=[builtin golearn/...]\n\tpackages=4\n"), "type": Number(3)}) })))
2023-01-20T22:11:01.527 helix_term::application [INFO] window/logMessage: LogMessageParams { typ: Info, message: "2023/01/20 22:11:01 go/packages.Load #1\n\tsnapshot=0\n\tdirectory=file:///home/tum0xa/src/golearn\n\tquery=[builtin golearn/...]\n\tpackages=4\n" }
2023-01-20T22:11:01.528 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:01.528 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2023/01/20 22:11:01 go/packages.Load #1: updating metadata for 43 packages\n"}}
2023-01-20T22:11:01.528 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "window/logMessage", params: Map({"message": String("2023/01/20 22:11:01 go/packages.Load #1: updating metadata for 43 packages\n"), "type": Number(3)}) })))
2023-01-20T22:11:01.528 helix_term::application [INFO] window/logMessage: LogMessageParams { typ: Info, message: "2023/01/20 22:11:01 go/packages.Load #1: updating metadata for 43 packages\n" }
2023-01-20T22:11:01.576 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"$/progress","params":{"token":"5577006791947779410","value":{"kind":"end","message":"Finished loading packages."}}}
2023-01-20T22:11:01.576 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "$/progress", params: Map({"token": String("5577006791947779410"), "value": Object {"kind": String("end"), "message": String("Finished loading packages.")}}) })))
2023-01-20T22:11:01.577 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:01.728 helix_term::application [DEBUG] received editor event: IdleTimer
2023-01-20T22:11:01.863 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:01.935 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tum0xa/src/golearn/main.go","diagnostics":[{"range":{"start":{"line":2,"character":5},"end":{"line":2,"character":9}},"severity":1,"code":"DuplicateDecl","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl"},"source":"compiler","message":"main redeclared in this block","relatedInformation":[{"location":{"uri":"file:///home/tum0xa/src/golearn/io_experiment.go","range":{"start":{"line":54,"character":5},"end":{"line":54,"character":9}}},"message":"other declaration of main"}]}]}}
2023-01-20T22:11:01.935 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "textDocument/publishDiagnostics", params: Map({"diagnostics": Array [Object {"code": String("DuplicateDecl"), "codeDescription": Object {"href": String("https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl")}, "message": String("main redeclared in this block"), "range": Object {"end": Object {"character": Number(9), "line": Number(2)}, "start": Object {"character": Number(5), "line": Number(2)}}, "relatedInformation": Array [Object {"location": Object {"range": Object {"end": Object {"character": Number(9), "line": Number(54)}, "start": Object {"character": Number(5), "line": Number(54)}}, "uri": String("file:///home/tum0xa/src/golearn/io_experiment.go")}, "message": String("other declaration of main")}], "severity": Number(1), "source": String("compiler")}], "uri": String("file:///home/tum0xa/src/golearn/main.go")}) })))
2023-01-20T22:11:01.935 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tum0xa/src/golearn/io_experiment.go","diagnostics":[{"range":{"start":{"line":54,"character":5},"end":{"line":54,"character":9}},"severity":1,"code":"DuplicateDecl","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl"},"source":"compiler","message":"main redeclared in this block (this error: other declaration of main)","relatedInformation":[{"location":{"uri":"file:///home/tum0xa/src/golearn/main.go","range":{"start":{"line":2,"character":5},"end":{"line":2,"character":9}}},"message":"main redeclared in this block"},{"location":{"uri":"file:///home/tum0xa/src/golearn/io_experiment.go","range":{"start":{"line":54,"character":5},"end":{"line":54,"character":9}}},"message":"other declaration of main (this error)"}]}]}}
2023-01-20T22:11:01.936 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:01.936 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "textDocument/publishDiagnostics", params: Map({"diagnostics": Array [Object {"code": String("DuplicateDecl"), "codeDescription": Object {"href": String("https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl")}, "message": String("main redeclared in this block (this error: other declaration of main)"), "range": Object {"end": Object {"character": Number(9), "line": Number(54)}, "start": Object {"character": Number(5), "line": Number(54)}}, "relatedInformation": Array [Object {"location": Object {"range": Object {"end": Object {"character": Number(9), "line": Number(2)}, "start": Object {"character": Number(5), "line": Number(2)}}, "uri": String("file:///home/tum0xa/src/golearn/main.go")}, "message": String("main redeclared in this block")}, Object {"location": Object {"range": Object {"end": Object {"character": Number(9), "line": Number(54)}, "start": Object {"character": Number(5), "line": Number(54)}}, "uri": String("file:///home/tum0xa/src/golearn/io_experiment.go")}, "message": String("other declaration of main (this error)")}], "severity": Number(1), "source": String("compiler")}], "uri": String("file:///home/tum0xa/src/golearn/io_experiment.go")}) })))
2023-01-20T22:11:01.993 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tum0xa/src/golearn/go.mod","diagnostics":[{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":34}},"severity":2,"source":"go mod tidy","message":"github.com/davecgh/go-spew is not used in this module"},{"range":{"start":{"line":6,"character":36},"end":{"line":6,"character":47}},"severity":2,"source":"go mod tidy","message":"github.com/labstack/echo/v4 should be direct"},{"range":{"start":{"line":8,"character":27},"end":{"line":8,"character":38}},"severity":2,"source":"go mod tidy","message":"github.com/lib/pq should be direct"},{"range":{"start":{"line":11,"character":30},"end":{"line":11,"character":41}},"severity":2,"source":"go mod tidy","message":"github.com/pkg/errors should be direct"},{"range":{"start":{"line":12,"character":1},"end":{"line":12,"character":37}},"severity":2,"source":"go mod tidy","message":"github.com/pmezard/go-difflib is not used in this module"},{"range":{"start":{"line":13,"character":1},"end":{"line":13,"character":32}},"severity":2,"source":"go mod tidy","message":"github.com/stretchr/objx is not used in this module"},{"range":{"start":{"line":15,"character":64},"end":{"line":15,"character":75}},"severity":2,"source":"go mod tidy","message":"github.com/teris-io/shortid should be direct"},{"range":{"start":{"line":19,"character":1},"end":{"line":19,"character":52}},"severity":2,"source":"go mod tidy","message":"golang.org/x/exp is not used in this module"},{"range":{"start":{"line":23,"character":1},"end":{"line":23,"character":24}},"severity":2,"source":"go mod tidy","message":"gopkg.in/yaml.v3 is not used in this module"}]}}
2023-01-20T22:11:01.993 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "textDocument/publishDiagnostics", params: Map({"diagnostics": Array [Object {"message": String("github.com/davecgh/go-spew is not used in this module"), "range": Object {"end": Object {"character": Number(34), "line": Number(5)}, "start": Object {"character": Number(1), "line": Number(5)}}, "severity": Number(2), "source": String("go mod tidy")}, Object {"message": String("github.com/labstack/echo/v4 should be direct"), "range": Object {"end": Object {"character": Number(47), "line": Number(6)}, "start": Object {"character": Number(36), "line": Number(6)}}, "severity": Number(2), "source": String("go mod tidy")}, Object {"message": String("github.com/lib/pq should be direct"), "range": Object {"end": Object {"character": Number(38), "line": Number(8)}, "start": Object {"character": Number(27), "line": Number(8)}}, "severity": Number(2), "source": String("go mod tidy")}, Object {"message": String("github.com/pkg/errors should be direct"), "range": Object {"end": Object {"character": Number(41), "line": Number(11)}, "start": Object {"character": Number(30), "line": Number(11)}}, "severity": Number(2), "source": String("go mod tidy")}, Object {"message": String("github.com/pmezard/go-difflib is not used in this module"), "range": Object {"end": Object {"character": Number(37), "line": Number(12)}, "start": Object {"character": Number(1), "line": Number(12)}}, "severity": Number(2), "source": String("go mod tidy")}, Object {"message": String("github.com/stretchr/objx is not used in this module"), "range": Object {"end": Object {"character": Number(32), "line": Number(13)}, "start": Object {"character": Number(1), "line": Number(13)}}, "severity": Number(2), "source": String("go mod tidy")}, Object {"message": String("github.com/teris-io/shortid should be direct"), "range": Object {"end": Object {"character": Number(75), "line": Number(15)}, "start": Object {"character": Number(64), "line": Number(15)}}, "severity": Number(2), "source": String("go mod tidy")}, Object {"message": String("golang.org/x/exp is not used in this module"), "range": Object {"end": Object {"character": Number(52), "line": Number(19)}, "start": Object {"character": Number(1), "line": Number(19)}}, "severity": Number(2), "source": String("go mod tidy")}, Object {"message": String("gopkg.in/yaml.v3 is not used in this module"), "range": Object {"end": Object {"character": Number(24), "line": Number(23)}, "start": Object {"character": Number(1), "line": Number(23)}}, "severity": Number(2), "source": String("go mod tidy")}], "uri": String("file:///home/tum0xa/src/golearn/go.mod")}) })))
2023-01-20T22:11:01.993 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:02.053 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:02.454 helix_term::application [DEBUG] received editor event: IdleTimer
2023-01-20T22:11:02.588 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":13,"line":2},"start":{"character":13,"line":2}},"text":"\n\t"}],"textDocument":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":1}}}
2023-01-20T22:11:02.589 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:02.589 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/signatureHelp","params":{"position":{"character":1,"line":3},"textDocument":{"uri":"file:///home/tum0xa/src/golearn/main.go"}},"id":1}
2023-01-20T22:11:02.591 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","result":null,"id":1}
2023-01-20T22:11:02.592 helix_lsp::transport [INFO] <- null
2023-01-20T22:11:02.592 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":1,"message":"2023/01/20 22:11:02 no signature help: cannot find an enclosing function\n\tposition=3:1\n"}}
2023-01-20T22:11:02.592 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:02.592 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "window/logMessage", params: Map({"message": String("2023/01/20 22:11:02 no signature help: cannot find an enclosing function\n\tposition=3:1\n"), "type": Number(1)}) })))
2023-01-20T22:11:02.593 helix_term::application [INFO] window/logMessage: LogMessageParams { typ: Error, message: "2023/01/20 22:11:02 no signature help: cannot find an enclosing function\n\tposition=3:1\n" }
2023-01-20T22:11:02.593 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:02.845 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":1,"diagnostics":[{"range":{"start":{"line":2,"character":5},"end":{"line":2,"character":9}},"severity":1,"code":"DuplicateDecl","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl"},"source":"compiler","message":"main redeclared in this block","relatedInformation":[{"location":{"uri":"file:///home/tum0xa/src/golearn/io_experiment.go","range":{"start":{"line":54,"character":5},"end":{"line":54,"character":9}}},"message":"other declaration of main"}]}]}}
2023-01-20T22:11:02.845 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "textDocument/publishDiagnostics", params: Map({"diagnostics": Array [Object {"code": String("DuplicateDecl"), "codeDescription": Object {"href": String("https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl")}, "message": String("main redeclared in this block"), "range": Object {"end": Object {"character": Number(9), "line": Number(2)}, "start": Object {"character": Number(5), "line": Number(2)}}, "relatedInformation": Array [Object {"location": Object {"range": Object {"end": Object {"character": Number(9), "line": Number(54)}, "start": Object {"character": Number(5), "line": Number(54)}}, "uri": String("file:///home/tum0xa/src/golearn/io_experiment.go")}, "message": String("other declaration of main")}], "severity": Number(1), "source": String("compiler")}], "uri": String("file:///home/tum0xa/src/golearn/main.go"), "version": Number(1)}) })))
2023-01-20T22:11:02.846 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:02.988 helix_term::application [DEBUG] received editor event: IdleTimer
2023-01-20T22:11:02.988 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:03.542 helix_core::auto_pairs [TRACE] autopairs hook selection: Selection {
    ranges: [
        Range {
            anchor: 29,
            head: 30,
            horiz: None,
        },
    ],
    primary_index: 0,
}
2023-01-20T22:11:03.542 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":1,"line":3},"start":{"character":1,"line":3}},"text":"s"}],"textDocument":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":2}}}
2023-01-20T22:11:03.542 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:03.547 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":2,"diagnostics":[{"range":{"start":{"line":2,"character":5},"end":{"line":2,"character":9}},"severity":1,"code":"DuplicateDecl","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl"},"source":"compiler","message":"main redeclared in this block","relatedInformation":[{"location":{"uri":"file:///home/tum0xa/src/golearn/io_experiment.go","range":{"start":{"line":54,"character":5},"end":{"line":54,"character":9}}},"message":"other declaration of main"}]},{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":2}},"severity":1,"code":"UndeclaredName","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#UndeclaredName"},"source":"compiler","message":"undeclared name: s"}]}}
2023-01-20T22:11:03.547 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "textDocument/publishDiagnostics", params: Map({"diagnostics": Array [Object {"code": String("DuplicateDecl"), "codeDescription": Object {"href": String("https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl")}, "message": String("main redeclared in this block"), "range": Object {"end": Object {"character": Number(9), "line": Number(2)}, "start": Object {"character": Number(5), "line": Number(2)}}, "relatedInformation": Array [Object {"location": Object {"range": Object {"end": Object {"character": Number(9), "line": Number(54)}, "start": Object {"character": Number(5), "line": Number(54)}}, "uri": String("file:///home/tum0xa/src/golearn/io_experiment.go")}, "message": String("other declaration of main")}], "severity": Number(1), "source": String("compiler")}, Object {"code": String("UndeclaredName"), "codeDescription": Object {"href": String("https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#UndeclaredName")}, "message": String("undeclared name: s"), "range": Object {"end": Object {"character": Number(2), "line": Number(3)}, "start": Object {"character": Number(1), "line": Number(3)}}, "severity": Number(1), "source": String("compiler")}], "uri": String("file:///home/tum0xa/src/golearn/main.go"), "version": Number(2)}) })))
2023-01-20T22:11:03.548 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:03.658 helix_core::auto_pairs [TRACE] autopairs hook selection: Selection {
    ranges: [
        Range {
            anchor: 30,
            head: 31,
            horiz: None,
        },
    ],
    primary_index: 0,
}
2023-01-20T22:11:03.658 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":2,"line":3},"start":{"character":2,"line":3}},"text":"e"}],"textDocument":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":3}}}
2023-01-20T22:11:03.658 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:03.663 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":3,"diagnostics":[{"range":{"start":{"line":2,"character":5},"end":{"line":2,"character":9}},"severity":1,"code":"DuplicateDecl","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl"},"source":"compiler","message":"main redeclared in this block","relatedInformation":[{"location":{"uri":"file:///home/tum0xa/src/golearn/io_experiment.go","range":{"start":{"line":54,"character":5},"end":{"line":54,"character":9}}},"message":"other declaration of main"}]},{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":3}},"severity":1,"code":"UndeclaredName","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#UndeclaredName"},"source":"compiler","message":"undeclared name: se"}]}}
2023-01-20T22:11:03.663 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "textDocument/publishDiagnostics", params: Map({"diagnostics": Array [Object {"code": String("DuplicateDecl"), "codeDescription": Object {"href": String("https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl")}, "message": String("main redeclared in this block"), "range": Object {"end": Object {"character": Number(9), "line": Number(2)}, "start": Object {"character": Number(5), "line": Number(2)}}, "relatedInformation": Array [Object {"location": Object {"range": Object {"end": Object {"character": Number(9), "line": Number(54)}, "start": Object {"character": Number(5), "line": Number(54)}}, "uri": String("file:///home/tum0xa/src/golearn/io_experiment.go")}, "message": String("other declaration of main")}], "severity": Number(1), "source": String("compiler")}, Object {"code": String("UndeclaredName"), "codeDescription": Object {"href": String("https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#UndeclaredName")}, "message": String("undeclared name: se"), "range": Object {"end": Object {"character": Number(3), "line": Number(3)}, "start": Object {"character": Number(1), "line": Number(3)}}, "severity": Number(1), "source": String("compiler")}], "uri": String("file:///home/tum0xa/src/golearn/main.go"), "version": Number(3)}) })))
2023-01-20T22:11:03.664 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:03.826 helix_core::auto_pairs [TRACE] autopairs hook selection: Selection {
    ranges: [
        Range {
            anchor: 31,
            head: 32,
            horiz: None,
        },
    ],
    primary_index: 0,
}
2023-01-20T22:11:03.826 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":3,"line":3},"start":{"character":3,"line":3}},"text":"l"}],"textDocument":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":4}}}
2023-01-20T22:11:03.826 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:03.831 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":4,"diagnostics":[{"range":{"start":{"line":2,"character":5},"end":{"line":2,"character":9}},"severity":1,"code":"DuplicateDecl","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl"},"source":"compiler","message":"main redeclared in this block","relatedInformation":[{"location":{"uri":"file:///home/tum0xa/src/golearn/io_experiment.go","range":{"start":{"line":54,"character":5},"end":{"line":54,"character":9}}},"message":"other declaration of main"}]},{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":4}},"severity":1,"code":"UndeclaredName","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#UndeclaredName"},"source":"compiler","message":"undeclared name: sel"}]}}
2023-01-20T22:11:03.831 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "textDocument/publishDiagnostics", params: Map({"diagnostics": Array [Object {"code": String("DuplicateDecl"), "codeDescription": Object {"href": String("https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl")}, "message": String("main redeclared in this block"), "range": Object {"end": Object {"character": Number(9), "line": Number(2)}, "start": Object {"character": Number(5), "line": Number(2)}}, "relatedInformation": Array [Object {"location": Object {"range": Object {"end": Object {"character": Number(9), "line": Number(54)}, "start": Object {"character": Number(5), "line": Number(54)}}, "uri": String("file:///home/tum0xa/src/golearn/io_experiment.go")}, "message": String("other declaration of main")}], "severity": Number(1), "source": String("compiler")}, Object {"code": String("UndeclaredName"), "codeDescription": Object {"href": String("https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#UndeclaredName")}, "message": String("undeclared name: sel"), "range": Object {"end": Object {"character": Number(4), "line": Number(3)}, "start": Object {"character": Number(1), "line": Number(3)}}, "severity": Number(1), "source": String("compiler")}], "uri": String("file:///home/tum0xa/src/golearn/main.go"), "version": Number(4)}) })))
2023-01-20T22:11:03.832 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:03.886 helix_core::auto_pairs [TRACE] autopairs hook selection: Selection {
    ranges: [
        Range {
            anchor: 32,
            head: 33,
            horiz: None,
        },
    ],
    primary_index: 0,
}
2023-01-20T22:11:03.886 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":4,"line":3},"start":{"character":4,"line":3}},"text":"e"}],"textDocument":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":5}}}
2023-01-20T22:11:03.887 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:03.891 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":5,"diagnostics":[{"range":{"start":{"line":2,"character":5},"end":{"line":2,"character":9}},"severity":1,"code":"DuplicateDecl","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl"},"source":"compiler","message":"main redeclared in this block","relatedInformation":[{"location":{"uri":"file:///home/tum0xa/src/golearn/io_experiment.go","range":{"start":{"line":54,"character":5},"end":{"line":54,"character":9}}},"message":"other declaration of main"}]},{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":5}},"severity":1,"code":"UndeclaredName","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#UndeclaredName"},"source":"compiler","message":"undeclared name: sele"}]}}
2023-01-20T22:11:03.891 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "textDocument/publishDiagnostics", params: Map({"diagnostics": Array [Object {"code": String("DuplicateDecl"), "codeDescription": Object {"href": String("https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl")}, "message": String("main redeclared in this block"), "range": Object {"end": Object {"character": Number(9), "line": Number(2)}, "start": Object {"character": Number(5), "line": Number(2)}}, "relatedInformation": Array [Object {"location": Object {"range": Object {"end": Object {"character": Number(9), "line": Number(54)}, "start": Object {"character": Number(5), "line": Number(54)}}, "uri": String("file:///home/tum0xa/src/golearn/io_experiment.go")}, "message": String("other declaration of main")}], "severity": Number(1), "source": String("compiler")}, Object {"code": String("UndeclaredName"), "codeDescription": Object {"href": String("https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#UndeclaredName")}, "message": String("undeclared name: sele"), "range": Object {"end": Object {"character": Number(5), "line": Number(3)}, "start": Object {"character": Number(1), "line": Number(3)}}, "severity": Number(1), "source": String("compiler")}], "uri": String("file:///home/tum0xa/src/golearn/main.go"), "version": Number(5)}) })))
2023-01-20T22:11:03.892 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:04.064 helix_core::auto_pairs [TRACE] autopairs hook selection: Selection {
    ranges: [
        Range {
            anchor: 33,
            head: 34,
            horiz: None,
        },
    ],
    primary_index: 0,
}
2023-01-20T22:11:04.064 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":5,"line":3},"start":{"character":5,"line":3}},"text":"c"}],"textDocument":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":6}}}
2023-01-20T22:11:04.064 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:04.069 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":6,"diagnostics":[{"range":{"start":{"line":2,"character":5},"end":{"line":2,"character":9}},"severity":1,"code":"DuplicateDecl","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl"},"source":"compiler","message":"main redeclared in this block","relatedInformation":[{"location":{"uri":"file:///home/tum0xa/src/golearn/io_experiment.go","range":{"start":{"line":54,"character":5},"end":{"line":54,"character":9}}},"message":"other declaration of main"}]},{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":6}},"severity":1,"code":"UndeclaredName","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#UndeclaredName"},"source":"compiler","message":"undeclared name: selec"}]}}
2023-01-20T22:11:04.069 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "textDocument/publishDiagnostics", params: Map({"diagnostics": Array [Object {"code": String("DuplicateDecl"), "codeDescription": Object {"href": String("https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl")}, "message": String("main redeclared in this block"), "range": Object {"end": Object {"character": Number(9), "line": Number(2)}, "start": Object {"character": Number(5), "line": Number(2)}}, "relatedInformation": Array [Object {"location": Object {"range": Object {"end": Object {"character": Number(9), "line": Number(54)}, "start": Object {"character": Number(5), "line": Number(54)}}, "uri": String("file:///home/tum0xa/src/golearn/io_experiment.go")}, "message": String("other declaration of main")}], "severity": Number(1), "source": String("compiler")}, Object {"code": String("UndeclaredName"), "codeDescription": Object {"href": String("https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#UndeclaredName")}, "message": String("undeclared name: selec"), "range": Object {"end": Object {"character": Number(6), "line": Number(3)}, "start": Object {"character": Number(1), "line": Number(3)}}, "severity": Number(1), "source": String("compiler")}], "uri": String("file:///home/tum0xa/src/golearn/main.go"), "version": Number(6)}) })))
2023-01-20T22:11:04.070 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:04.306 helix_core::auto_pairs [TRACE] autopairs hook selection: Selection {
    ranges: [
        Range {
            anchor: 34,
            head: 35,
            horiz: None,
        },
    ],
    primary_index: 0,
}
2023-01-20T22:11:04.306 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":6,"line":3},"start":{"character":6,"line":3}},"text":"t"}],"textDocument":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":7}}}
2023-01-20T22:11:04.307 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:04.311 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":7,"diagnostics":[{"range":{"start":{"line":4,"character":0},"end":{"line":4,"character":0}},"severity":1,"source":"syntax","message":"expected '{', found '}'"}]}}
2023-01-20T22:11:04.311 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "textDocument/publishDiagnostics", params: Map({"diagnostics": Array [Object {"message": String("expected '{', found '}'"), "range": Object {"end": Object {"character": Number(0), "line": Number(4)}, "start": Object {"character": Number(0), "line": Number(4)}}, "severity": Number(1), "source": String("syntax")}], "uri": String("file:///home/tum0xa/src/golearn/main.go"), "version": Number(7)}) })))
2023-01-20T22:11:04.312 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:04.374 helix_core::auto_pairs [TRACE] autopairs hook selection: Selection {
    ranges: [
        Range {
            anchor: 35,
            head: 36,
            horiz: None,
        },
    ],
    primary_index: 0,
}
2023-01-20T22:11:04.374 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":7,"line":3},"start":{"character":7,"line":3}},"text":" "}],"textDocument":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":8}}}
2023-01-20T22:11:04.375 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:04.626 helix_core::auto_pairs [TRACE] autopairs hook selection: Selection {
    ranges: [
        Range {
            anchor: 36,
            head: 37,
            horiz: None,
        },
    ],
    primary_index: 0,
}
2023-01-20T22:11:04.626 helix_core::auto_pairs [TRACE] prev_bound: 36, offset: 0, len_inserted: 2
2023-01-20T22:11:04.626 helix_core::auto_pairs [DEBUG] auto pair transaction: Transaction {
    changes: ChangeSet {
        changes: [
            Retain(
                36,
            ),
            Insert(
                "{}",
            ),
            Retain(
                2,
            ),
        ],
        len: 38,
        len_after: 40,
    },
    selection: Some(
        Selection {
            ranges: [
                Range {
                    anchor: 37,
                    head: 38,
                    horiz: None,
                },
            ],
            primary_index: 0,
        },
    ),
}
2023-01-20T22:11:04.626 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":8,"line":3},"start":{"character":8,"line":3}},"text":"{}"}],"textDocument":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":9}}}
2023-01-20T22:11:04.626 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:04.630 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":9,"diagnostics":[{"range":{"start":{"line":2,"character":5},"end":{"line":2,"character":9}},"severity":1,"code":"DuplicateDecl","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl"},"source":"compiler","message":"main redeclared in this block","relatedInformation":[{"location":{"uri":"file:///home/tum0xa/src/golearn/io_experiment.go","range":{"start":{"line":54,"character":5},"end":{"line":54,"character":9}}},"message":"other declaration of main"}]}]}}
2023-01-20T22:11:04.630 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "textDocument/publishDiagnostics", params: Map({"diagnostics": Array [Object {"code": String("DuplicateDecl"), "codeDescription": Object {"href": String("https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl")}, "message": String("main redeclared in this block"), "range": Object {"end": Object {"character": Number(9), "line": Number(2)}, "start": Object {"character": Number(5), "line": Number(2)}}, "relatedInformation": Array [Object {"location": Object {"range": Object {"end": Object {"character": Number(9), "line": Number(54)}, "start": Object {"character": Number(5), "line": Number(54)}}, "uri": String("file:///home/tum0xa/src/golearn/io_experiment.go")}, "message": String("other declaration of main")}], "severity": Number(1), "source": String("compiler")}], "uri": String("file:///home/tum0xa/src/golearn/main.go"), "version": Number(9)}) })))
2023-01-20T22:11:04.631 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:05.026 helix_term::application [DEBUG] received editor event: IdleTimer
2023-01-20T22:11:05.027 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:05.558 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":9,"line":3},"start":{"character":9,"line":3}},"text":"\n\t\n"}],"textDocument":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":10}}}
2023-01-20T22:11:05.559 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:05.816 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":10,"diagnostics":[{"range":{"start":{"line":2,"character":5},"end":{"line":2,"character":9}},"severity":1,"code":"DuplicateDecl","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl"},"source":"compiler","message":"main redeclared in this block","relatedInformation":[{"location":{"uri":"file:///home/tum0xa/src/golearn/io_experiment.go","range":{"start":{"line":54,"character":5},"end":{"line":54,"character":9}}},"message":"other declaration of main"}]}]}}
2023-01-20T22:11:05.816 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: Some(V2), method: "textDocument/publishDiagnostics", params: Map({"diagnostics": Array [Object {"code": String("DuplicateDecl"), "codeDescription": Object {"href": String("https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl")}, "message": String("main redeclared in this block"), "range": Object {"end": Object {"character": Number(9), "line": Number(2)}, "start": Object {"character": Number(5), "line": Number(2)}}, "relatedInformation": Array [Object {"location": Object {"range": Object {"end": Object {"character": Number(9), "line": Number(54)}, "start": Object {"character": Number(5), "line": Number(54)}}, "uri": String("file:///home/tum0xa/src/golearn/io_experiment.go")}, "message": String("other declaration of main")}], "severity": Number(1), "source": String("compiler")}], "uri": String("file:///home/tum0xa/src/golearn/main.go"), "version": Number(10)}) })))
2023-01-20T22:11:05.817 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:05.959 helix_term::application [DEBUG] received editor event: IdleTimer
2023-01-20T22:11:05.960 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-01-20T22:11:06.626 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 1
2023-01-20T22:11:06.627 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 1
2023-01-20T22:11:07.022 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 1
2023-01-20T22:11:07.250 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 1
2023-01-20T22:11:07.298 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 1
2023-01-20T22:11:07.423 helix_term::application [DEBUG] received editor event: IdleTimer
2023-01-20T22:11:07.518 helix_term::job [DEBUG] waiting on jobs...
2023-01-20T22:11:07.518 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/formatting","params":{"options":{"insertSpaces":false,"tabSize":4},"textDocument":{"uri":"file:///home/tum0xa/src/golearn/main.go"}},"id":2}
2023-01-20T22:11:07.519 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","result":[{"range":{"start":{"line":3,"character":9},"end":{"line":4,"character":1}},"newText":"}"},{"range":{"start":{"line":6,"character":0},"end":{"line":7,"character":0}},"newText":""}],"id":2}
2023-01-20T22:11:07.519 helix_lsp::transport [INFO] <- [{"newText":"}","range":{"end":{"character":1,"line":4},"start":{"character":9,"line":3}}},{"newText":"","range":{"end":{"character":0,"line":7},"start":{"character":0,"line":6}}}]
2023-01-20T22:11:07.520 helix_view::document [DEBUG] submitting save of doc 'Some("/home/tum0xa/src/golearn/main.go")'
2023-01-20T22:11:07.520 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":1,"line":4},"start":{"character":9,"line":3}},"text":"}"}],"textDocument":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":11}}}
2023-01-20T22:11:07.520 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///home/tum0xa/src/golearn/main.go"}}}
2023-01-20T22:11:07.520 helix_view::document [DEBUG] doc 1 revision updated 0 -> 2
2023-01-20T22:11:07.520 helix_term::commands::typed [DEBUG] quitting...
2023-01-20T22:11:07.520 helix_view::document [DEBUG] id 1 modified - last saved: 2, current: 2
2023-01-20T22:11:07.520 helix_term::job [DEBUG] waiting on jobs...
2023-01-20T22:11:07.520 helix_term::job [DEBUG] waiting on jobs...
2023-01-20T22:11:07.520 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"shutdown","id":3}
2023-01-20T22:11:07.524 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/tum0xa/src/golearn/main.go","version":11,"diagnostics":[{"range":{"start":{"line":5,"character":0},"end":{"line":5,"character":0}},"severity":1,"source":"syntax","message":"expected declaration, found '}'"}]}}
2023-01-20T22:11:07.840 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","result":null,"id":3}
2023-01-20T22:11:07.840 helix_lsp::transport [INFO] <- null
2023-01-20T22:11:07.840 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2023/01/20 22:11:07 Shutdown session\n\tshutdown_session=1\n"}}
2023-01-20T22:11:07.840 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"exit"}
2023-01-20T22:11:07.840 mio::poll [TRACE] deregistering event source from poller
2023-01-20T22:11:07.840 mio::poll [TRACE] deregistering event source from poller
2023-01-20T22:11:07.841 mio::poll [TRACE] deregistering event source from poller
2023-01-20T22:11:07.842 mio::poll [TRACE] deregistering event source from poller
2023-01-20T22:11:07.842 mio::poll [TRACE] deregistering event source from poller

Platform

Linux

Terminal Emulator

GNOME Terminal 3.44.0 using VTE 0.68.0 +BIDI +GNUTLS +ICU +SYSTEMD

Helix Version

helix-term 22.12 (051cd78)

@TuM0xA-S TuM0xA-S added the C-bug Category: This is a bug label Jan 20, 2023
@the-mikedavis the-mikedavis added A-language-support Area: Support for programming/text languages E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors labels Jan 20, 2023
@askreet
Copy link
Contributor

askreet commented Jan 22, 2023

I started looking at this, but need to read up more on TreeSitter before I can find the right solution. I've got a branch here that fixes the } following the select statement, but then tries to double-indent the case branches and expands on some of the existing indentation tests.

Happy for someone else to bring it over the finish line or give some pointers on understanding this a bit better. I read the indentation queries for C but they don't seem to have special rules around case statements beyond putting them in the outdent list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages C-bug Category: This is a bug E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants