Comments (9)
In non-gomod project, everything is work perfectly. But in gomod project, which has go.mod
and GO111MODULE =on
, go list error.
from bingo.
Whether the '$GOPATH/pkg/mod/github.com/jinzhu/configor' directory exists?
from bingo.
There is $GOPATH/pkg/mod/github.com/jinzhu/[email protected]
.
from bingo.
New test with bingo project:
- git clone https://github.com/saibing/bingo.git to src/bingo
- export GO111MODULE=on
- open with VSCode
- error in /tmp/lspserver.log
<-- notif: textDocument/publishDiagnostics: {"uri":"file:///Users/fannheyward/src/bingo/main.go","diagnostics":[{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":1}},"severity":1,"source":"LSP: Go compiler","message":"could not import context (missing package: \"context\")"},{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":1}},"severity":1,"source":"LSP: Go compiler","message":"could not import flag (missing package: \"flag\")"},{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":1}},"severity":1,"source":"LSP: Go compiler","message":"could not import fmt (missing package: \"fmt\")"},{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":1}},"severity":1,"source":"LSP: Go compiler","message":"could not import io (missing package: \"io\")"},{"range":{"start":{"line":7,"character":1},"end":{"line":7,"character":1}},"severity":1,"source":"LSP: Go compiler","message":"could not import log (missing package: \"log\")"},{"range":{"start":{"line":8,"character":1},"end":{"line":8,"character":1}},"severity":1,"source":"LSP: Go compiler","message":"could not import net (missing package: \"net\")"},{"range":{"start":{"line":9,"character":1},"end":{"line":9,"character":1}},"severity":1,"source":"LSP: Go compiler","message":"could not import net/http (missing package: \"net/http\")"},{"range":{"start":{"line":10,"character":1},"end":{"line":10,"character":1}},"severity":1,"source":"LSP: Go compiler","message":"could not import os (missing package: \"os\")"},{"range":{"start":{"line":11,"character":1},"end":{"line":11,"character":1}},"severity":1,"source":"LSP: Go compiler","message":"could not import runtime/debug (missing package: \"runtime/debug\")"},{"range":{"start":{"line":12,"character":1},"end":{"line":12,"character":1}},"severity":1,"source":"LSP: Go compiler","message":"could not import time (missing package: \"time\")"},{"range":{"start":{"line":14,"character":1},"end":{"line":14,"character":1}},"severity":1,"source":"LSP: Go compiler","message":"could not import github.com/saibing/bingo/langserver (missing package: \"github.com/saibing/bingo/langserver\")"},{"range":{"start":{"line":15,"character":1},"end":{"line":15,"character":1}},"severity":1,"source":"LSP: Go compiler","message":"could not import github.com/sourcegraph/jsonrpc2 (missing package: \"github.com/sourcegraph/jsonrpc2\")"},{"range":{"start":{"line":17,"character":3},"end":{"line":17,"character":3}},"severity":1,"source":"LSP: Go compiler","message":"could not import net/http/pprof (missing package: \"net/http/pprof\")"}]}
^[[C--> request #1: textDocument/definition: {"textDocument":{"uri":"file:///Users/fannheyward/src/bingo/main.go"},"position":{"line":44,"character":6}}
<-- error #1: textDocument/definition: {"code":0,"message":"definition not found","data":null}
from bingo.
thank your feedback
I have fixed this bug, please try the latest version's bingo
from bingo.
Test with the latest build, after open main.go, lspserver.log error:
<-- notif: window/showMessage: {"type":1,"message":"go [list -e -json -compiled -test=true -export=false -deps=true -find=false -- /usr/local/go/src/builtin]: exit status 1: go: cannot find main module; see 'go help modules'\n"}
<-- error #0: initialize: {"code":0,"message":"go [list -e -json -compiled -test=true -export=false -deps=true -find=false -- /usr/local/go/src/builtin]: exit status 1: go: cannot find main module; see 'go help modules'\n","data":null}
from bingo.
VSCode settings:
"go.autocompleteUnimportedPackages": true,
"go.inferGopath": true,
"go.useLanguageServer": true,
"go.alternateTools": {
"go-langserver": "bingo"
},
"go.languageServerExperimentalFeatures": {
"format": true,
"autoComplete": true,
"rename": true,
"goToDefinition": true,
"hover": true,
"signatureHelp": true,
"goToTypeDefinition": true,
"goToImplementation": true,
"documentSymbols": true,
"workspaceSymbols": true,
"findReferences": true
},
from bingo.
@fannheyward
I'm very sorry for this.
please try the latest version's bingo again
from bingo.
It works! Thanks for your woking.
from bingo.
Related Issues (20)
- no diagnostic
- Bingo does not update diagnostics after saving HOT 4
- auto completion doesn't work inside Goroutines. HOT 8
- Implement diagnostics range HOT 2
- Bad snippets?
- Imported a new package cannot be completed. HOT 2
- Format structs in quick documentation on hover HOT 4
- Invalid args in completion HOT 1
- can't complete a package which is depend on another package in same project
- some special package will stop the auto complete,e.g. net package HOT 1
- Getting document symbols is very slow HOT 1
- Bingo stops providing any diagnostics HOT 1
- Add possibility to control diagnostics scope HOT 1
- Incorrect import paths in quick documentation HOT 1
- switching to gopls issue? HOT 30
- unknown type name double_t on mac os x10.13.2 HOT 6
- How can I set GOPATH for bingo? HOT 4
- fail get importPath when opening project HOT 6
- saibing/tools 无法创建issue HOT 1
- when i switch to other branch, lsp will remind me some error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bingo.