You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I trace k8s source code until jump into stage/src dir, lsp report many errors like xxx undefined
Editor and settings
M.gopls= {
cmd= { "gopls", "serve", "-debug=localhost:8098" },
filetypes= { "go", "gomod" },
root_dir=util.root_pattern("go.work", "go.mod", ".git"),
settings= {
gopls= {
symbolStyle="Full", -- Full| Dynamic | Package---------------------------------------------------- Analyses Setting------------------------------------------------analyses= {
unusedparams=true,
unreachable=true,
fillstruct=true,
},
---------------------------------------------------- Complete Setting------------------------------------------------usePlaceholders=true, -- placeholders enables placeholders for function parameters or struct fields in completion responses.-- completionBudget = "0ms", -- completionBudget is the soft latency goal for completion requestsmatcher="Fuzzy", -- matcher sets the algorithm that is used when calculating completion candidates. CaseInsensitive | CaseSensitive | FuzzycompleteUnimported=true,
deepCompletion=true, -- If true, this turns on the ability to return completions from deep inside relevant entities, rather than just the locally accessible ones.-- experimentalWatchedFileDelay = "10ms"---------------------------------------------------- Inlayhint------------------------------------------------hints= {
assignVariableTypes=true, -- i/* int*/, j/* int*/ := 0, len(r)-1compositeLiteralFields=true, -- {/*in: */"Hello, world", /*want: */"dlrow ,olleH"}compositeLiteralTypes=true, -- /*struct{ in string; want string }*/{"Hello, world", "dlrow ,olleH"},constantValues=true, -- KindNone Kind = iota/* = 0*/functionTypeParameters=true, -- myFoo/*[int, string]*/(1, "hello")parameterNames=true, -- parseInt(/* str: */ "123", /* radix: */ 8)rangeVariableTypes=true, -- for k/* int*/, v/* string*/ := range []string{} {
},
},
},
single_file_support=true,
}
Logs
nvim cat lsp.log
[START][2023-06-16 18:04:33] LSP logging initiated
[ERROR][2023-06-16 18:04:33] ...lsp/handlers.lua:535 "2023/06/16 18:04:33 no signature help: cannot find an enclosing function\n\tposition=0:0\n"
[ERROR][2023-06-16 18:04:33] ...lsp/handlers.lua:535 "2023/06/16 18:04:33 no signature help: cannot find an enclosing function\n\tposition=32:16\n"
[ERROR][2023-06-16 18:04:33] ...lsp/handlers.lua:535 "2023/06/16 18:04:33 no signature help: cannot find an enclosing function\n\tposition=32:16\n"
[ERROR][2023-06-16 18:04:33] ...lsp/handlers.lua:535 "2023/06/16 18:04:33 no signature help: cannot find an enclosing function\n\tposition=32:16\n"
[ERROR][2023-06-16 18:04:34] ...lsp/handlers.lua:535 "2023/06/16 18:04:34 no signature help: cannot find an enclosing function\n\tposition=85:5\n"
[ERROR][2023-06-16 18:04:35] ...lsp/handlers.lua:535 "2023/06/16 18:04:35 no signature help: cannot find an enclosing function\n\tposition=87:2\n"
[ERROR][2023-06-16 18:04:38] ...lsp/handlers.lua:535 "2023/06/16 18:04:38 no signature help: cannot find an enclosing function\n\tposition=147:2\n"
[ERROR][2023-06-16 18:04:39] ...lsp/handlers.lua:535 "2023/06/16 18:04:39 no signature help: cannot find an enclosing function\n\tposition=147:2\n"
[ERROR][2023-06-16 18:04:40] ...lsp/handlers.lua:535 "2023/06/16 18:04:40 no signature help: cannot find an enclosing function\n\tposition=171:0\n"
[ERROR][2023-06-16 18:04:41] ...lsp/handlers.lua:535 "2023/06/16 18:04:41 no signature help: cannot find an enclosing function\n\tposition=166:0\n"
[ERROR][2023-06-16 18:04:43] ...lsp/handlers.lua:535 "2023/06/16 18:04:43 no signature help: cannot find an enclosing function\n\tposition=167:8\n"
[ERROR][2023-06-16 18:04:44] ...lsp/handlers.lua:535 "2023/06/16 18:04:44 no signature help: cannot find an enclosing function\n\tposition=181:5\n"
[ERROR][2023-06-16 18:04:46] ...lsp/handlers.lua:535 "2023/06/16 18:04:46 no signature help: cannot find an enclosing function\n\tposition=185:1\n"
[ERROR][2023-06-16 18:04:46] ...lsp/handlers.lua:535 "2023/06/16 18:04:46 no signature help: cannot find an enclosing function\n\tposition=186:1\n"
[ERROR][2023-06-16 18:04:47] ...lsp/handlers.lua:535 "2023/06/16 18:04:47 no signature help: cannot find an enclosing function\n\tposition=183:21\n"
[ERROR][2023-06-16 18:04:48] ...lsp/handlers.lua:535 "2023/06/16 18:04:48 no signature help: cannot find an enclosing function\n\tposition=183:21\n"
[ERROR][2023-06-16 18:04:52] ...lsp/handlers.lua:535 "2023/06/16 18:04:52 no signature help: cannot find an enclosing function\n\tposition=133:25\n"
[ERROR][2023-06-16 18:04:52] ...lsp/handlers.lua:535 "2023/06/16 18:04:52 no signature help: cannot find an enclosing function\n\tposition=139:22\n"
[ERROR][2023-06-16 18:04:53] ...lsp/handlers.lua:535 "2023/06/16 18:04:53 no signature help: cannot find an enclosing function\n\tposition=134:15\n"
[ERROR][2023-06-16 18:04:59] ...lsp/handlers.lua:535 "2023/06/16 18:04:59 no signature help: cannot find an enclosing function\n\tposition=667:25\n"
[ERROR][2023-06-16 18:04:59] ...lsp/handlers.lua:535 "2023/06/16 18:04:59 no signature help: cannot find an enclosing function\n\tposition=668:22\n"
[ERROR][2023-06-16 18:04:59] ...lsp/handlers.lua:535 "2023/06/16 18:04:59 no signature help: cannot find an enclosing function\n\tposition=667:78\n"
[ERROR][2023-06-16 18:05:00] ...lsp/handlers.lua:535 "2023/06/16 18:05:00 no signature help: cannot find an enclosing function\n\tposition=667:78\n"
The text was updated successfully, but these errors were encountered:
gopherbot
added
Tools
This label describes issues relating to any tools in the x/tools repository.
gopls
Issues related to the Go language server, gopls.
labels
Jun 16, 2023
gopls cannot work well in kubernetes source code stage dir; it cannot jump to definitions when trace source go into stage dir(vendor).
gopls version
➜ vendor git:(master) ✗ gopls version golang.org/x/tools/gopls v0.12.1 golang.org/x/tools/gopls@(devel)
go env
What did you do?
I trace k8s source code until jump into
stage/src
dir, lsp report many errors likexxx undefined
Editor and settings
Logs
The text was updated successfully, but these errors were encountered: