Skip to content

Instantly share code, notes, and snippets.

@ankitrgadiya
Created August 25, 2025 18:01
Show Gist options
  • Select an option

  • Save ankitrgadiya/cf7bf083bfd7c9165acf100fb6e3b11a to your computer and use it in GitHub Desktop.

Select an option

Save ankitrgadiya/cf7bf083bfd7c9165acf100fb6e3b11a to your computer and use it in GitHub Desktop.
Eglot occur-mode
[jsonrpc] D[23:14:54.887] Running language server: gopls
[jsonrpc] e[23:14:54.888] --> initialize[1] {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"processId":479135,"clientInfo":{"name":"Eglot","version":"1.18"},"rootPath":"/home/ankit/Downloads/","rootUri":"file:///home/ankit/Downloads","initializationOptions":{},"capabilities":{"workspace":{"applyEdit":true,"executeCommand":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":false},"configuration":true,"workspaceFolders":true},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":false,"deprecatedSupport":true,"resolveSupport":{"properties":["documentation","details","additionalTextEdits"]},"tagSupport":{"valueSet":[1]},"insertReplaceSupport":true},"contextSupport":true},"hover":{"dynamicRegistration":false,"contentFormat":["plaintext"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true},"documentationFormat":["plaintext"],"activeParameterSupport":true}},"references":{"dynamicRegistration":false},"definition":{"dynamicRegistration":false,"linkSupport":true},"declaration":{"dynamicRegistration":false,"linkSupport":true},"implementation":{"dynamicRegistration":false,"linkSupport":true},"typeDefinition":{"dynamicRegistration":false,"linkSupport":true},"documentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"documentHighlight":{"dynamicRegistration":false},"codeAction":{"dynamicRegistration":false,"resolveSupport":{"properties":["edit","command"]},"dataSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPreferredSupport":true},"formatting":{"dynamicRegistration":false},"rangeFormatting":{"dynamicRegistration":false},"rename":{"dynamicRegistration":false},"inlayHint":{"dynamicRegistration":false},"callHierarchy":{"dynamicRegistration":false},"typeHierarchy":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":false,"versionSupport":true,"codeDescriptionSupport":false,"tagSupport":{"valueSet":[1,2]}}},"window":{"showDocument":{"support":true},"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"workDoneProgress":true},"general":{"positionEncodings":["utf-32","utf-8","utf-16"]},"experimental":{}},"workspaceFolders":[{"uri":"file:///home/ankit/Downloads","name":"~/Downloads/"}]}}
[jsonrpc] e[23:14:54.976] <-- initialize[1] {"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":["gopls.doc.features","quickfix","refactor.extract.constant","refactor.extract.constant-all","refactor.extract.function","refactor.extract.method","refactor.extract.toNewFile","refactor.extract.variable","refactor.extract.variable-all","refactor.inline.call","refactor.rewrite.changeQuote","refactor.rewrite.fillStruct","refactor.rewrite.fillSwitch","refactor.rewrite.invertIf","refactor.rewrite.joinLines","refactor.rewrite.removeUnusedParam","refactor.rewrite.splitLines","source.assembly","source.doc","source.fixAll","source.freesymbols","source.organizeImports"],"resolveProvider":true},"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"renameProvider":true,"foldingRangeProvider":true,"selectionRangeProvider":true,"executeCommandProvider":{"commands":["gopls.add_dependency","gopls.add_import","gopls.add_telemetry_counters","gopls.add_test","gopls.apply_fix","gopls.assembly","gopls.change_signature","gopls.check_upgrades","gopls.client_open_url","gopls.diagnose_files","gopls.doc","gopls.edit_go_directive","gopls.extract_to_new_file","gopls.fetch_vulncheck_result","gopls.free_symbols","gopls.gc_details","gopls.generate","gopls.go_get_package","gopls.list_imports","gopls.list_known_packages","gopls.maybe_prompt_for_telemetry","gopls.mem_stats","gopls.modules","gopls.package_symbols","gopls.packages","gopls.regenerate_cgo","gopls.remove_dependency","gopls.reset_go_mod_diagnostics","gopls.run_go_work_command","gopls.run_govulncheck","gopls.run_tests","gopls.scan_imports","gopls.start_debugging","gopls.start_profile","gopls.stop_profile","gopls.tidy","gopls.update_go_sum","gopls.upgrade_dependency","gopls.vendor","gopls.views","gopls.vulncheck","gopls.workspace_stats"]},"callHierarchyProvider":true,"semanticTokensProvider":{"legend":{"tokenTypes":["namespace","type","typeParameter","parameter","variable","function","method","macro","keyword","comment","string","number","operator","label"],"tokenModifiers":["definition","readonly","defaultLibrary","array","bool","chan","format","interface","map","number","pointer","signature","slice","string","struct"]},"range":true,"full":true},"inlayHintProvider":{},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"{\"GoVersion\":\"go1.24.1\",\"Path\":\"golang.org/x/tools/gopls\",\"Main\":{\"Path\":\"golang.org/x/tools/gopls\",\"Version\":\"v0.18.1\",\"Sum\":\"h1:2xJBNzdImS5u/kV/ZzqDLSvlBSeZX+pWY9uKVP7Pask=\",\"Replace\":null},\"Deps\":[{\"Path\":\"github.com/BurntSushi/toml\",\"Version\":\"v1.4.1-0.20240526193622-a339e1f7089c\",\"Sum\":\"h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs=\",\"Replace\":null},{\"Path\":\"github.com/google/go-cmp\",\"Version\":\"v0.6.0\",\"Sum\":\"h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=\",\"Replace\":null},{\"Path\":\"golang.org/x/exp/typeparams\",\"Version\":\"v0.0.0-20241210194714-1829a127f884\",\"Sum\":\"h1:1xaZTydL5Gsg78QharTwKfA9FY9CZ1VQj6D/AZEvHR0=\",\"Replace\":null},{\"Path\":\"golang.org/x/mod\",\"Version\":\"v0.23.0\",\"Sum\":\"h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM=\",\"Replace\":null},{\"Path\":\"golang.org/x/sync\",\"Version\":\"v0.11.0\",\"Sum\":\"h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=\",\"Replace\":null},{\"Path\":\"golang.org/x/telemetry\",\"Version\":\"v0.0.0-20241220003058-cc96b6e0d3d9\",\"Sum\":\"h1:L2k9GUV2TpQKVRGMjN94qfUMgUwOFimSQ6gipyJIjKw=\",\"Replace\":null},{\"Path\":\"golang.org/x/text\",\"Version\":\"v0.22.0\",\"Sum\":\"h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=\",\"Replace\":null},{\"Path\":\"golang.org/x/tools\",\"Version\":\"v0.30.1-0.20250221230316-5055f70f240c\",\"Sum\":\"h1:Ja/5gV5a9Vvho3p2NC/T2TtxhHjrWS/2DvCKMvA0a+Y=\",\"Replace\":null},{\"Path\":\"golang.org/x/vuln\",\"Version\":\"v1.1.3\",\"Sum\":\"h1:NPGnvPOTgnjBc9HTaUx+nj+EaUYxl5SJOWqaDYGaFYw=\",\"Replace\":null},{\"Path\":\"honnef.co/go/tools\",\"Version\":\"v0.5.1\",\"Sum\":\"h1:4bH5o3b5ZULQ4UrBmP+63W9r7qIkqJClEA9ko5YKx+I=\",\"Replace\":null},{\"Path\":\"mvdan.cc/gofumpt\",\"Version\":\"v0.7.0\",\"Sum\":\"h1:bg91ttqXmi9y2xawvkuMXyvAA/1ZGJqYAEGjXuP0JXU=\",\"Replace\":null},{\"Path\":\"mvdan.cc/xurls/v2\",\"Version\":\"v2.5.0\",\"Sum\":\"h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8=\",\"Replace\":null}],\"Settings\":[{\"Key\":\"-buildmode\",\"Value\":\"exe\"},{\"Key\":\"-compiler\",\"Value\":\"gc\"},{\"Key\":\"DefaultGODEBUG\",\"Value\":\"gotestjsonbuildtext=1,multipathtcp=0,randseednop=0,rsa1024min=0,tlsmlkem=0,x509rsacrt=0,x509usepolicies=0\"},{\"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.18.1\"}"}},"id":1}
[jsonrpc] e[23:14:54.976] --> initialized {"jsonrpc":"2.0","method":"initialized","params":{}}
[jsonrpc] e[23:14:54.977] --> textDocument/didOpen {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/ankit/Downloads/main.go","version":0,"languageId":"go","text":"package main\n\nimport \"fmt\"\n\nfunc main() {\n\tname := \"John Doe\"\n\n\tfmt.Println(\"Hello\")\n}\n"}}}
[jsonrpc] e[23:14:54.977] --> workspace/didChangeConfiguration {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{}}}
[jsonrpc] e[23:14:54.995] --> textDocument/inlayHint[2] {"jsonrpc":"2.0","id":2,"method":"textDocument/inlayHint","params":{"textDocument":{"uri":"file:///home/ankit/Downloads/main.go"},"range":{"start":{"line":0,"character":0},"end":{"line":9,"character":0}}}}
[jsonrpc] e[23:14:55.002] <-- window/workDoneProgress/create[1] {"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"8078192255802394189"},"id":1}
[jsonrpc] e[23:14:55.002] --> window/workDoneProgress/create[1] {"jsonrpc":"2.0","id":1,"result":null}
[jsonrpc] e[23:14:55.003] <-- $/progress {"jsonrpc":"2.0","method":"$/progress","params":{"token":"8078192255802394189","value":{"kind":"begin","title":"Setting up workspace","message":"Loading packages..."}}}
[jsonrpc] e[23:14:55.006] <-- workspace/configuration[2] {"jsonrpc":"2.0","method":"workspace/configuration","params":{"items":[{"scopeUri":"file:///home/ankit/Downloads","section":"gopls"}]},"id":2}
[jsonrpc] e[23:14:55.006] --> workspace/configuration[2] {"jsonrpc":"2.0","id":2,"result":[null]}
[jsonrpc] e[23:14:55.027] <-- window/logMessage {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2025/08/25 23:14:55 Created View (#1)\n\tdirectory=/home/ankit/Downloads\n\tview_type=\"AdHoc\"\n\troot_dir=\"file:///home/ankit/Downloads\"\n\tgo_version=\"go version go1.24.4 linux/amd64\"\n\tbuild_flags=[]\n\tenv={GOOS:linux GOARCH:amd64 GOCACHE:/home/ankit/.cache/go-build GOMODCACHE:/home/ankit/.local/go/pkg/mod GOPATH:/home/ankit/.local/go GOPRIVATE:bitbucket.org/rapyutians,github.com/rapyuta-robotics GOFLAGS: GO111MODULE:auto GOTOOLCHAIN:auto GOROOT:/usr/lib/go GoVersion:24 GoVersionOutput:go version go1.24.4 linux/amd64\n ExplicitGOWORK: EffectiveGOPACKAGESDRIVER:}\n\tenv_overlay=[]\n"}}
[jsonrpc] e[23:14:55.172] <-- window/logMessage {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2025/08/25 23:14:55 go/packages.Load #1\n\tview_id=\"1\"\n\tsnapshot=0\n\tdirectory=/home/ankit/Downloads\n\tquery=[./ builtin]\n\tpackages=2\n\tduration=145.566571ms\n"}}
[jsonrpc] e[23:14:55.187] <-- $/progress {"jsonrpc":"2.0","method":"$/progress","params":{"token":"8078192255802394189","value":{"kind":"end","message":"Finished loading packages."}}}
[jsonrpc] e[23:14:55.196] <-- client/registerCapability[3] {"jsonrpc":"2.0","method":"client/registerCapability","params":{"registrations":[{"id":"workspace/didChangeWatchedFiles-0","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"**/*.{mod,work}","kind":7},{"globPattern":"**/*.{go,mod,sum,work}","kind":7}]}}]},"id":3}
[jsonrpc] e[23:14:55.391] --> client/registerCapability[3] {"jsonrpc":"2.0","id":3,"result":null}
[jsonrpc] e[23:14:55.391] <-- textDocument/publishDiagnostics {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/ankit/Downloads/main.go","diagnostics":[{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":5}},"severity":1,"code":"UnusedVar","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#UnusedVar"},"source":"compiler","message":"declared and not used: name","tags":[1]}]}}
[jsonrpc] e[23:14:55.402] <-- workspace/configuration[4] {"jsonrpc":"2.0","method":"workspace/configuration","params":{"items":[{"section":"gopls"}]},"id":4}
[jsonrpc] e[23:14:55.403] --> workspace/configuration[4] {"jsonrpc":"2.0","id":4,"result":[null]}
[jsonrpc] e[23:14:55.403] <-- textDocument/publishDiagnostics {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/ankit/Downloads/main.go","diagnostics":[{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":5}},"severity":1,"code":"UnusedVar","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#UnusedVar"},"source":"compiler","message":"declared and not used: name","tags":[1]}]}}
[jsonrpc] e[23:14:55.405] <-- workspace/configuration[5] {"jsonrpc":"2.0","method":"workspace/configuration","params":{"items":[{"scopeUri":"file:///home/ankit/Downloads","section":"gopls"}]},"id":5}
[jsonrpc] e[23:14:55.410] --> workspace/configuration[5] {"jsonrpc":"2.0","id":5,"result":[null]}
[jsonrpc] e[23:14:55.416] <-- textDocument/inlayHint[2] {"jsonrpc":"2.0","result":null,"id":2}
[jsonrpc] e[23:14:55.495] --> textDocument/codeAction[3] {"jsonrpc":"2.0","id":3,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///home/ankit/Downloads/main.go"},"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":7}},"context":{"diagnostics":[],"triggerKind":2}}}
[jsonrpc] e[23:14:55.495] --> textDocument/documentHighlight[4] {"jsonrpc":"2.0","id":4,"method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///home/ankit/Downloads/main.go"},"position":{"line":0,"character":0}}}
[jsonrpc] e[23:14:55.495] --> textDocument/hover[5] {"jsonrpc":"2.0","id":5,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/ankit/Downloads/main.go"},"position":{"line":0,"character":0}}}
[jsonrpc] e[23:14:55.495] --> textDocument/signatureHelp[6] {"jsonrpc":"2.0","id":6,"method":"textDocument/signatureHelp","params":{"textDocument":{"uri":"file:///home/ankit/Downloads/main.go"},"position":{"line":0,"character":0}}}
[jsonrpc] e[23:14:55.504] <-- textDocument/codeAction[3] {"jsonrpc":"2.0","result":null,"id":3}
[jsonrpc] e[23:14:55.504] <-- textDocument/documentHighlight[4] {"jsonrpc":"2.0","result":null,"id":4}
[jsonrpc] e[23:14:55.504] <-- textDocument/hover[5] {"jsonrpc":"2.0","result":null,"id":5}
[jsonrpc] e[23:14:55.505] <-- textDocument/signatureHelp[6] {"jsonrpc":"2.0","result":null,"id":6}
[jsonrpc] e[23:15:25.035] <-- window/logMessage {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2025/08/25 23:15:25 background imports cache refresh starting\n"}}
[jsonrpc] e[23:15:25.038] <-- window/logMessage {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2025/08/25 23:15:25 background refresh finished after 11.018783ms\n"}}
[jsonrpc] e[23:20:34.009] --> textDocument/codeAction[7] {"jsonrpc":"2.0","id":7,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///home/ankit/Downloads/main.go"},"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":7}},"context":{"diagnostics":[],"triggerKind":2}}}
[jsonrpc] e[23:20:34.009] --> textDocument/documentHighlight[8] {"jsonrpc":"2.0","id":8,"method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///home/ankit/Downloads/main.go"},"position":{"line":0,"character":0}}}
[jsonrpc] e[23:20:34.009] --> textDocument/hover[9] {"jsonrpc":"2.0","id":9,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/ankit/Downloads/main.go"},"position":{"line":0,"character":0}}}
[jsonrpc] e[23:20:34.009] --> textDocument/signatureHelp[10] {"jsonrpc":"2.0","id":10,"method":"textDocument/signatureHelp","params":{"textDocument":{"uri":"file:///home/ankit/Downloads/main.go"},"position":{"line":0,"character":0}}}
[jsonrpc] e[23:20:34.014] <-- textDocument/codeAction[7] {"jsonrpc":"2.0","result":null,"id":7}
[jsonrpc] e[23:20:34.014] <-- textDocument/documentHighlight[8] {"jsonrpc":"2.0","result":null,"id":8}
[jsonrpc] e[23:20:34.014] <-- textDocument/hover[9] {"jsonrpc":"2.0","result":null,"id":9}
[jsonrpc] e[23:20:34.014] <-- textDocument/signatureHelp[10] {"jsonrpc":"2.0","result":null,"id":10}
package main
import "fmt"
func main() {
name := "John Doe"
fmt.Println("Hello")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment