Closed alvarolm closed 3 months ago
Here is the source code: testSource.zip
I have removed all configurations and started with a new installation, same versions as before, this is the output of LSP Log Panel:
:: [10:41:40.593] --> gopls initialize (1): {'processId': 8092, 'workspaceFolders': [{'uri': 'file:///home/alvarolm/Desktop/1948gen', 'name': '1948gen'}], 'rootUri': 'file:///home/alvarolm/Desktop/1948gen', 'capabilities': {'textDocument': {'synchronization': {'willSaveWaitUntil': True, 'dynamicRegistration': True, 'willSave': True, 'didSave': True}, 'completion': {'completionItemKind': {'valueSet': [2, 6, 11, 17, 10, 14, 4, 22, 24, 7, 19, 1, 18, 16, 21, 5, 8, 15, 20, 3, 9, 13, 12, 23, 25]}, 'insertTextMode': 2, 'dynamicRegistration': True, 'completionItem': {'insertTextModeSupport': {'valueSet': [2]}, 'deprecatedSupport': True, 'snippetSupport': True, 'labelDetailsSupport': True, 'resolveSupport': {'properties': ['detail', 'documentation', 'additionalTextEdits']}, 'tagSupport': {'valueSet': [1]}, 'documentationFormat': ['markdown', 'plaintext'], 'insertReplaceSupport': True}, 'completionList': {'itemDefaults': ['editRange', 'insertTextFormat', 'data']}}, 'semanticTokens': {'augmentsSyntaxTokens': True, 'formats': ['relative'], 'overlappingTokenSupport': False, 'requests': {'full': {'delta': True}, 'range': True}, 'tokenTypes': ['method', 'variable', 'class', 'function', 'parameter', 'type', 'struct', 'operator', 'property', 'comment', 'regexp', 'decorator', 'modifier', 'namespace', 'typeParameter', 'interface', 'enum', 'string', 'macro', 'enumMember', 'keyword', 'event', 'number'], 'multilineTokenSupport': True, 'dynamicRegistration': True, 'tokenModifiers': ['deprecated', 'static', 'abstract', 'readonly', 'documentation', 'declaration', 'defaultLibrary', 'async', 'definition', 'modification']}, 'typeDefinition': {'dynamicRegistration': True, 'linkSupport': True}, 'definition': {'dynamicRegistration': True, 'linkSupport': True}, 'callHierarchy': {'dynamicRegistration': True}, 'typeHierarchy': {'dynamicRegistration': True}, 'diagnostic': {'dynamicRegistration': True, 'relatedDocumentSupport': True}, 'hover': {'dynamicRegistration': True, 'contentFormat': ['markdown', 'plaintext']}, 'foldingRange': {'dynamicRegistration': True, 'foldingRangeKind': {'valueSet': ['comment', 'imports', 'region']}}, 'publishDiagnostics': {'versionSupport': True, 'tagSupport': {'valueSet': [2, 1]}, 'relatedInformation': True, 'codeDescriptionSupport': True, 'dataSupport': True}, 'documentLink': {'dynamicRegistration': True, 'tooltipSupport': True}, 'signatureHelp': {'dynamicRegistration': True, 'contextSupport': True, 'signatureInformation': {'parameterInformation': {'labelOffsetSupport': True}, 'activeParameterSupport': True, 'documentationFormat': ['markdown', 'plaintext']}}, 'documentHighlight': {'dynamicRegistration': True}, 'documentSymbol': {'hierarchicalDocumentSymbolSupport': True, 'dynamicRegistration': True, 'symbolKind': {'valueSet': [6, 13, 7, 4, 21, 9, 23, 20, 19, 18, 3, 24, 1, 14, 8, 11, 17, 10, 16, 2, 22, 25, 12, 5, 15, 26]}, 'tagSupport': {'valueSet': [1]}}, 'selectionRange': {'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True, 'rangesSupport': True}, 'inlayHint': {'resolveSupport': {'properties': ['textEdits', 'label.command']}, 'dynamicRegistration': True}, 'declaration': {'dynamicRegistration': True, 'linkSupport': True}, 'formatting': {'dynamicRegistration': True}, 'implementation': {'dynamicRegistration': True, 'linkSupport': True}, 'codeAction': {'resolveSupport': {'properties': ['edit']}, 'isPreferredSupport': True, 'dynamicRegistration': True, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.fixAll', 'source.organizeImports']}}, 'dataSupport': True}, 'rename': {'prepareSupportDefaultBehavior': 1, 'dynamicRegistration': True, 'prepareSupport': True}, 'codeLens': {'dynamicRegistration': True}, 'colorProvider': {'dynamicRegistration': True}, 'references': {'dynamicRegistration': True}}, 'general': {'markdown': {'parser': 'Python-Markdown', 'version': '3.2.2'}, 'regularExpressions': {'engine': 'ECMAScript'}}, 'window': {'workDoneProgress': True, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}, 'showDocument': {'support': True}}, 'workspace': {'diagnostics': {'refreshSupport': True}, 'workspaceFolders': True, 'inlayHint': {'refreshSupport': True}, 'symbol': {'resolveSupport': {'properties': ['location.range']}, 'dynamicRegistration': True, 'symbolKind': {'valueSet': [6, 13, 7, 4, 21, 9, 23, 20, 19, 18, 3, 24, 1, 14, 8, 11, 17, 10, 16, 2, 22, 25, 12, 5, 15, 26]}, 'tagSupport': {'valueSet': [1]}}, 'applyEdit': True, 'executeCommand': {}, 'didChangeConfiguration': {'dynamicRegistration': True}, 'semanticTokens': {'refreshSupport': True}, 'codeLens': {'refreshSupport': True}, 'configuration': True, 'workspaceEdit': {'failureHandling': 'abort', 'documentChanges': True}}}, 'rootPath': '/home/alvarolm/Desktop/1948gen', 'clientInfo': {'name': 'Sublime Text LSP', 'version': '1.29.0'}, 'initializationOptions': {}}
:: [10:41:40.666] <<< gopls (1) (duration: 73ms): {'serverInfo': {'name': 'gopls', 'version': '{"GoVersion":"go1.21.6","Path":"golang.org/x/tools/gopls","Main":{"Path":"golang.org/x/tools/gopls","Version":"v0.15.0","Sum":"h1:L0GwEHBsOERhkmi9E2Ag0xjAY7exrFsiKhQLX7mBJjM=","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.6.0","Sum":"h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=","Replace":null},{"Path":"golang.org/x/exp/typeparams","Version":"v0.0.0-20221212164502-fae10dda9338","Sum":"h1:2O2DON6y3XMJiQRAS1UWU+54aec2uopH3x7MAiqGW6Y=","Replace":null},{"Path":"golang.org/x/mod","Version":"v0.15.0","Sum":"h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8=","Replace":null},{"Path":"golang.org/x/sync","Version":"v0.6.0","Sum":"h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=","Replace":null},{"Path":"golang.org/x/telemetry","Version":"v0.0.0-20240209200032-7b892fcb8a78","Sum":"h1:vcVnuftN4J4UKLRcgetjzfU9FjjgXUUYUc3JhFplgV4=","Replace":null},{"Path":"golang.org/x/text","Version":"v0.14.0","Sum":"h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=","Replace":null},{"Path":"golang.org/x/tools","Version":"v0.18.1-0.20240221145400-a220b3b5ba60","Sum":"h1:2rj0Wb7+TXMtGEN3h6rrHno/8PmOJ/FVkLLTQSZeo4I=","Replace":null},{"Path":"golang.org/x/vuln","Version":"v1.0.1","Sum":"h1:KUas02EjQK5LTuIx1OylBQdKKZ9jeugs+HiqO5HormU=","Replace":null},{"Path":"honnef.co/go/tools","Version":"v0.4.6","Sum":"h1:oFEHCKeID7to/3autwsWfnuv69j3NsfcXbvJKuIcep8=","Replace":null},{"Path":"mvdan.cc/gofumpt","Version":"v0.6.0","Sum":"h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo=","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":"panicnil=1"},{"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.15.0"}'}, 'capabilities': {'textDocumentSync': {'save': {}, 'didOpen': {}, 'didClose': {}, 'change': {'syncKind': 2}}, 'inlayHintProvider': {}, 'executeCommandProvider': {'commands': ['gopls.add_dependency', 'gopls.add_import', 'gopls.add_telemetry_counters', 'gopls.apply_fix', 'gopls.change_signature', 'gopls.check_upgrades', 'gopls.diagnose_files', 'gopls.edit_go_directive', 'gopls.fetch_vulncheck_result', '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.regenerate_cgo', 'gopls.remove_dependency', 'gopls.reset_go_mod_diagnostics', 'gopls.run_go_work_command', 'gopls.run_govulncheck', 'gopls.run_tests', 'gopls.start_debugging', 'gopls.start_profile', 'gopls.stop_profile', 'gopls.test', 'gopls.tidy', 'gopls.toggle_gc_details', 'gopls.update_go_sum', 'gopls.upgrade_dependency', 'gopls.vendor', 'gopls.views', 'gopls.workspace_stats']}, 'documentFormattingProvider': True, 'renameProvider': {'prepareProvider': True}, 'documentSymbolProvider': True, 'foldingRangeProvider': True, 'typeDefinitionProvider': True, 'codeActionProvider': {'codeActionKinds': ['quickfix', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.fixAll', 'source.organizeImports'], 'resolveProvider': True}, 'semanticTokensProvider': {'full': True, 'legend': {'tokenModifiers': ['deprecated', 'static', 'abstract', 'readonly', 'documentation', 'declaration', 'defaultLibrary', 'async', 'definition', 'modification'], 'tokenTypes': ['method', 'variable', 'class', 'function', 'parameter', 'type', 'struct', 'operator', 'property', 'comment', 'regexp', 'decorator', 'modifier', 'namespace', 'typeParameter', 'interface', 'enum', 'string', 'macro', 'enumMember', 'keyword', 'event', 'number']}, 'range': True}, 'definitionProvider': True, 'documentLinkProvider': {}, 'signatureHelpProvider': {'triggerCharacters': ['(', ',']}, 'workspace': {'workspaceFolders': {'changeNotifications': 'workspace/didChangeWorkspaceFolders', 'supported': True}}, 'referencesProvider': True, 'callHierarchyProvider': True, 'implementationProvider': True, 'codeLensProvider': {}, 'completionProvider': {'triggerCharacters': ['.']}, 'hoverProvider': True, 'documentHighlightProvider': True, 'workspaceSymbolProvider': True, 'selectionRangeProvider': True}}
:: [10:41:40.666] -> gopls initialized: {}
:: [10:41:40.668] -> gopls workspace/didChangeConfiguration: {'settings': {'manageGoplsBinary': True, 'runTestsInPanel': True, 'gopls': {'buildFlags': [], 'expandWorkspaceToModule': True, 'vulncheck': 'Off', 'allowImplicitNetworkAccess': False, 'usePlaceholders': False, 'linkTarget': 'pkg.go.dev', 'standaloneTags': ['ignore'], 'annotations': {'escape': True, 'bounds': True, 'nil': True, 'inline': True}, 'diagnosticsDelay': '1s', 'matcher': 'Fuzzy', 'local': '', 'codelenses': {'vendor': True, 'gc_details': False, 'tidy': True, 'generate': True, 'upgrade_dependency': True, 'regenerate_cgo': True}, 'diagnosticsTrigger': 'Edit', 'noSemanticNumber': False, 'completeFunctionCalls': True, 'analyses': {}, 'symbolScope': 'all', 'experimentalPostfixCompletions': True, 'staticcheck': False, 'allowModfileModifications': False, 'linksInHover': True, 'templateExtensions': [], 'symbolStyle': 'Dynamic', 'completionBudget': '100ms', 'env': {}, 'hoverKind': 'FullDocumentation', 'verboseOutput': False, 'analysisProgressReporting': True, 'directoryFilters': ['-**/node_modules'], 'importShortcut': 'Both', 'memoryMode': '', 'hints': {}, 'semanticTokens': False, 'gofumpt': False, 'symbolMatcher': 'FastFuzzy', 'noSemanticString': False}, 'closeTestResultsWhenFinished': False}}
:: [10:41:40.669] <-- gopls window/workDoneProgress/create (1): {'token': '4128902986973328157'}
:: [10:41:40.669] >>> gopls (1) (duration: 0ms): None
:: [10:41:40.682] -> gopls textDocument/didOpen: {'textDocument': {'uri': 'file:///home/alvarolm/Desktop/1948gen/main.go', 'text': 'package main\n\nimport (\n\t"log"\n)\n\nvar s = 0\n\nfunc main() {\n\tlog.Println("hello!", s)\n}\n', 'languageId': 'go', 'version': 0}}
:: [10:41:40.696] --> gopls textDocument/documentLink (2): {'textDocument': {'uri': 'file:///home/alvarolm/Desktop/1948gen/main.go'}}
:: [10:41:40.700] --> gopls textDocument/codeLens (3): {'textDocument': {'uri': 'file:///home/alvarolm/Desktop/1948gen/main.go'}}
:: [10:41:40.703] <- gopls $/progress: {'value': {'kind': 'begin', 'title': 'Setting up workspace', 'message': 'Loading packages...'}, 'token': '4128902986973328157'}
:: [10:41:40.706] <-- gopls workspace/configuration (2): {'items': [{'scopeUri': 'file:///home/alvarolm/Desktop/1948gen', 'section': 'gopls'}]}
:: [10:41:40.708] >>> gopls (2) (duration: 1ms): [{'buildFlags': [], 'expandWorkspaceToModule': True, 'vulncheck': 'Off', 'allowImplicitNetworkAccess': False, 'usePlaceholders': False, 'linkTarget': 'pkg.go.dev', 'standaloneTags': ['ignore'], 'annotations': {'escape': True, 'bounds': True, 'nil': True, 'inline': True}, 'diagnosticsDelay': '1s', 'matcher': 'Fuzzy', 'local': '', 'codelenses': {'vendor': True, 'gc_details': False, 'tidy': True, 'generate': True, 'upgrade_dependency': True, 'regenerate_cgo': True}, 'diagnosticsTrigger': 'Edit', 'noSemanticNumber': False, 'completeFunctionCalls': True, 'analyses': {}, 'symbolScope': 'all', 'experimentalPostfixCompletions': True, 'staticcheck': False, 'allowModfileModifications': False, 'linksInHover': True, 'templateExtensions': [], 'symbolStyle': 'Dynamic', 'completionBudget': '100ms', 'env': {}, 'hoverKind': 'FullDocumentation', 'verboseOutput': False, 'analysisProgressReporting': True, 'directoryFilters': ['-**/node_modules'], 'importShortcut': 'Both', 'memoryMode': '', 'hints': {}, 'semanticTokens': False, 'gofumpt': False, 'symbolMatcher': 'FastFuzzy', 'noSemanticString': False}]
:: [10:41:40.709] <- gopls window/showMessage: {'message': 'Invalid settings: gopls setting "allowModfileModifications" is deprecated.\nPlease comment on https://go.dev/issue/65546 if this impacts your workflow.; gopls setting "memoryMode" is deprecated', 'type': 2}
gopls: 2024/03/19 10:41:40 go info for /home/alvarolm/Desktop/1948gen
(view type GoModView)
(root dir /home/alvarolm/Desktop/1948gen)
(go version go version go1.22.1 linux/amd64)
(build flags: [])
(go env: {GOOS:linux GOARCH:amd64 GOCACHE:/home/alvarolm/.cache/go-build GOMODCACHE:/home/alvarolm/dev/assets/go/pkg/mod GOPATH:/home/alvarolm/dev/assets/go GOPRIVATE: GOFLAGS: GO111MODULE: GoVersion:22 GoVersionOutput:go version go1.22.1 linux/amd64
GOWORK: GOPACKAGESDRIVER:})
(env overlay: map[])
:: [10:41:40.730] <- gopls window/logMessage: {'message': '2024/03/19 10:41:40 go info for /home/alvarolm/Desktop/1948gen\n(view type GoModView)\n(root dir /home/alvarolm/Desktop/1948gen)\n(go version go version go1.22.1 linux/amd64)\n(build flags: [])\n(go env: {GOOS:linux GOARCH:amd64 GOCACHE:/home/alvarolm/.cache/go-build GOMODCACHE:/home/alvarolm/dev/assets/go/pkg/mod GOPATH:/home/alvarolm/dev/assets/go GOPRIVATE: GOFLAGS: GO111MODULE: GoVersion:22 GoVersionOutput:go version go1.22.1 linux/amd64\n GOWORK: GOPACKAGESDRIVER:})\n(env overlay: map[])\n\n', 'type': 3}
gopls: 2024/03/19 10:41:40 go/packages.Load #1
snapshot=0
directory=file:///home/alvarolm/Desktop/1948gen
query=[/home/alvarolm/Desktop/1948gen/... builtin]
packages=2
:: [10:41:40.874] <- gopls window/logMessage: {'message': '2024/03/19 10:41:40 go/packages.Load #1\n\tsnapshot=0\n\tdirectory=file:///home/alvarolm/Desktop/1948gen\n\tquery=[/home/alvarolm/Desktop/1948gen/... builtin]\n\tpackages=2\n', 'type': 3}
gopls: 2024/03/19 10:41:40 go/packages.Load #1: updating metadata for 48 packages
:: [10:41:40.877] <- gopls window/logMessage: {'message': '2024/03/19 10:41:40 go/packages.Load #1: updating metadata for 48 packages\n', 'type': 3}
:: [10:41:40.913] <- gopls $/progress: {'value': {'kind': 'end', 'message': 'Finished loading packages.'}, 'token': '4128902986973328157'}
:: [10:41:40.914] <-- gopls client/registerCapability (3): {'registrations': [{'method': 'workspace/didChangeConfiguration', 'id': 'workspace/didChangeConfiguration'}]}
:: [10:41:40.914] >>> gopls (3) (duration: 0ms): None
:: [10:41:40.918] <-- gopls workspace/configuration (4): {'items': [{'section': 'gopls'}]}
:: [10:41:40.928] >>> gopls (4) (duration: 9ms): [{'buildFlags': [], 'expandWorkspaceToModule': True, 'vulncheck': 'Off', 'allowImplicitNetworkAccess': False, 'usePlaceholders': False, 'linkTarget': 'pkg.go.dev', 'standaloneTags': ['ignore'], 'annotations': {'escape': True, 'bounds': True, 'nil': True, 'inline': True}, 'diagnosticsDelay': '1s', 'matcher': 'Fuzzy', 'local': '', 'codelenses': {'vendor': True, 'gc_details': False, 'tidy': True, 'generate': True, 'upgrade_dependency': True, 'regenerate_cgo': True}, 'diagnosticsTrigger': 'Edit', 'noSemanticNumber': False, 'completeFunctionCalls': True, 'analyses': {}, 'symbolScope': 'all', 'experimentalPostfixCompletions': True, 'staticcheck': False, 'allowModfileModifications': False, 'linksInHover': True, 'templateExtensions': [], 'symbolStyle': 'Dynamic', 'completionBudget': '100ms', 'env': {}, 'hoverKind': 'FullDocumentation', 'verboseOutput': False, 'analysisProgressReporting': True, 'directoryFilters': ['-**/node_modules'], 'importShortcut': 'Both', 'memoryMode': '', 'hints': {}, 'semanticTokens': False, 'gofumpt': False, 'symbolMatcher': 'FastFuzzy', 'noSemanticString': False}]
:: [10:41:40.932] <- gopls window/showMessage: {'message': 'Invalid settings: gopls setting "allowModfileModifications" is deprecated.\nPlease comment on https://go.dev/issue/65546 if this impacts your workflow.; gopls setting "memoryMode" is deprecated', 'type': 2}
:: [10:41:40.932] <-- gopls workspace/configuration (5): {'items': [{'scopeUri': 'file:///home/alvarolm/Desktop/1948gen', 'section': 'gopls'}]}
:: [10:41:40.945] >>> gopls (5) (duration: 12ms): [{'buildFlags': [], 'expandWorkspaceToModule': True, 'vulncheck': 'Off', 'allowImplicitNetworkAccess': False, 'usePlaceholders': False, 'linkTarget': 'pkg.go.dev', 'standaloneTags': ['ignore'], 'annotations': {'escape': True, 'bounds': True, 'nil': True, 'inline': True}, 'diagnosticsDelay': '1s', 'matcher': 'Fuzzy', 'local': '', 'codelenses': {'vendor': True, 'gc_details': False, 'tidy': True, 'generate': True, 'upgrade_dependency': True, 'regenerate_cgo': True}, 'diagnosticsTrigger': 'Edit', 'noSemanticNumber': False, 'completeFunctionCalls': True, 'analyses': {}, 'symbolScope': 'all', 'experimentalPostfixCompletions': True, 'staticcheck': False, 'allowModfileModifications': False, 'linksInHover': True, 'templateExtensions': [], 'symbolStyle': 'Dynamic', 'completionBudget': '100ms', 'env': {}, 'hoverKind': 'FullDocumentation', 'verboseOutput': False, 'analysisProgressReporting': True, 'directoryFilters': ['-**/node_modules'], 'importShortcut': 'Both', 'memoryMode': '', 'hints': {}, 'semanticTokens': False, 'gofumpt': False, 'symbolMatcher': 'FastFuzzy', 'noSemanticString': False}]
:: [10:41:40.947] <- gopls window/showMessage: {'message': 'Invalid settings: gopls setting "allowModfileModifications" is deprecated.\nPlease comment on https://go.dev/issue/65546 if this impacts your workflow.; gopls setting "memoryMode" is deprecated', 'type': 2}
gopls: 2024/03/19 10:41:40 go info for /home/alvarolm/Desktop/1948gen
(view type GoModView)
(root dir /home/alvarolm/Desktop/1948gen)
(go version go version go1.22.1 linux/amd64)
(build flags: [])
(go env: {GOOS:linux GOARCH:amd64 GOCACHE:/home/alvarolm/.cache/go-build GOMODCACHE:/home/alvarolm/dev/assets/go/pkg/mod GOPATH:/home/alvarolm/dev/assets/go GOPRIVATE: GOFLAGS: GO111MODULE: GoVersion:22 GoVersionOutput:go version go1.22.1 linux/amd64
GOWORK: GOPACKAGESDRIVER:})
(env overlay: map[])
:: [10:41:40.969] <- gopls window/logMessage: {'message': '2024/03/19 10:41:40 go info for /home/alvarolm/Desktop/1948gen\n(view type GoModView)\n(root dir /home/alvarolm/Desktop/1948gen)\n(go version go version go1.22.1 linux/amd64)\n(build flags: [])\n(go env: {GOOS:linux GOARCH:amd64 GOCACHE:/home/alvarolm/.cache/go-build GOMODCACHE:/home/alvarolm/dev/assets/go/pkg/mod GOPATH:/home/alvarolm/dev/assets/go GOPRIVATE: GOFLAGS: GO111MODULE: GoVersion:22 GoVersionOutput:go version go1.22.1 linux/amd64\n GOWORK: GOPACKAGESDRIVER:})\n(env overlay: map[])\n\n', 'type': 3}
gopls: 2024/03/19 10:41:41 go/packages.Load #2
snapshot=0
directory=file:///home/alvarolm/Desktop/1948gen
query=[/home/alvarolm/Desktop/1948gen/... builtin]
packages=2
:: [10:41:41.077] <- gopls window/logMessage: {'message': '2024/03/19 10:41:41 go/packages.Load #2\n\tsnapshot=0\n\tdirectory=file:///home/alvarolm/Desktop/1948gen\n\tquery=[/home/alvarolm/Desktop/1948gen/... builtin]\n\tpackages=2\n', 'type': 3}
gopls: 2024/03/19 10:41:41 go/packages.Load #2: updating metadata for 48 packages
:: [10:41:41.081] <- gopls window/logMessage: {'message': '2024/03/19 10:41:41 go/packages.Load #2: updating metadata for 48 packages\n', 'type': 3}
:: [10:41:41.089] <<< gopls (2) (duration: -): [{'target': 'https://pkg.go.dev/log', 'range': {'end': {'line': 3, 'character': 5}, 'start': {'line': 3, 'character': 2}}}]
:: [10:41:41.090] <<< gopls (3) (duration: -): None
:: [10:41:41.131] <- gopls textDocument/publishDiagnostics: {'uri': 'file:///home/alvarolm/Desktop/1948gen/main.go', 'diagnostics': []}
:: [10:41:48.611] --> gopls textDocument/hover (4): {'textDocument': {'uri': 'file:///home/alvarolm/Desktop/1948gen/main.go'}, 'position': {'line': 9, 'character': 9}}
:: [10:41:48.617] --> gopls textDocument/codeAction (5): {'textDocument': {'uri': 'file:///home/alvarolm/Desktop/1948gen/main.go'}, 'context': {'diagnostics': [], 'triggerKind': 2}, 'range': {'end': {'line': 9, 'character': 9}, 'start': {'line': 9, 'character': 9}}}
:: [10:41:48.619] <<< gopls (4) (duration: 7ms): None
:: [10:41:48.622] <<< gopls (5) (duration: 5ms): None
:: [10:41:55.290] --> gopls textDocument/hover (6): {'textDocument': {'uri': 'file:///home/alvarolm/Desktop/1948gen/main.go'}, 'position': {'line': 9, 'character': 9}}
:: [10:41:55.294] <<< gopls (6) (duration: 4ms): None
:: [10:41:58.964] --> gopls textDocument/hover (7): {'textDocument': {'uri': 'file:///home/alvarolm/Desktop/1948gen/main.go'}, 'position': {'line': 9, 'character': 9}}
:: [10:41:58.967] <<< gopls (7) (duration: 3ms): None
I will test your source tonight. My initial gut feeling is this is gopls and not our plugin.
@alvarolm Sorry for the delay. But I can not replicate your issues. This is working as expected for me.
https://github.com/sublimelsp/LSP-gopls/assets/32599364/dbc98ac3-0934-493d-b131-ca45a65bfaaf
Currently im working with a fresh installation of debian 12 Now there is an issue with discovering the path, sometimes it works, seems to be pretty random.
I ended up specifying the path in the project settings:
"LSP":
{
"gopls":
{
"env":
{
"PATH": "/home/xxxxx/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/xxxxxxx/go/bin:/usr/local/go/bin",
},
}
},
there is no issue with any other IDEs like vscode
This is not a plugin issue. That would be a Sublime text issue
UPDATE:
I have removed go and re-installed it again, now its working. must be a local issue with my go configuration, even do this doesn't happens with vscode.
LSP-gopls should detect these edge cases and handle them like vscode does. or at least emit a warning. its sad with all this tooling there is no evident clue to grasp at first sight.
UPDATE:
I have isolated the issue to the go version in the go.mod file, it only works for 1.21.8 and below, is there any reason for this behavior.
Original issue:
for some reason I can't figure out why it seems to work partially on module, when hovering over the imported packages it displays the symbol info correctly but any other doesn't display anything and even "go to definition" throws: No results found.
works correctly with: when using a module and go.work when not using any module
here are some a brief videos:
working partially: https://github.com/sublimelsp/LSP-gopls/assets/2561547/58fad7f6-8635-40dd-a94e-2b0cbf7baeed
working ok: https://github.com/sublimelsp/LSP-gopls/assets/2561547/9e703ea3-35fc-4730-8910-ec5b9b68a1c6
any help is appreciated !
versions: sublime: 4169 LSP: 1.29.0 LSP-gopls: 1.15.0
lsp log panel:
LSP settings:
LSP-gopls settings: