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
Features that rely on gopls will not work correctly outside of GOPATH or a module. #2301
Comments
The main issue on my side is that the vim-go/autoload/go/package.vim Lines 153 to 157 in 2d04dc6
|
I'm also seeing this issue. (The project does not have any go file in its root directory) Should let [l:out, l:err] = go#util#Exec(['go', 'list', './...']) |
Warn the user and do not initialize gopls only when in using a null module and in module mode. Fixes fatih#2301
I'm not sure if this is the right solution. I mean it now matches the first package, does everything works as intended after this change? Ah I see it has been fixed with another fix. So I assume this is fine now. |
Not to reopen this, but to perhaps save someone else some steps. Vim's |
symlinks in |
Please note, I'm not asking vim-go to support it, I'm simply leaving breadcrumbs for the next person that runs up against this. That said, this isn't the same problem space. Your linked bug and its siblings are about Go explicitly supporting symlinks. This is about vim (and therefore vim-go) behaving differently than Go does by invariably resolving symlinks rather than just ignoring them and following whatever path you use. Whether by design or not, Go is perfectly happy with |
Is there a way to disable this feature completely? I couldn't find anything obvious in the documentation or autoload config file. This warning adds a forced 1 second delay and prompt if you're just editing a lonely go file. Example $ cd $( mktemp -d )
$ cat << EOF > hello.go
package main
func main() { println("hello world") }
EOF
$ vim hello.go Output
|
I'm in similar condition as @silas. Sometimes I want to edit standalone How can we disable this warning? Or at least prevent it from opening the file. A warning shown on statusline after opening the file would also serve the purpose of warning the user. |
The warning can be disabled with this line in .vimrc: let g:go_null_module_warning = 0 |
I have a similar question :vim-go :Features that rely on gopls will not work correctly in a null module |
same problem! |
Same problem! |
Same problem! |
The latest version of |
vim-go/autoload/go/lsp.vim
Line 179 in 8651442
For some reason I get this warning even if my project is setup as a module. vim-go works fine but I have to press enter to continue every time I open a file
The text was updated successfully, but these errors were encountered: