Skip to content
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

mingw: GoDef (and various other commands) don't work, potentially due to pathing issue #3602

Open
CrispyDrone opened this issue Nov 19, 2023 · 7 comments

Comments

@CrispyDrone
Copy link

What did you do? (required: The issue will be closed when not provided)

Try to execute :GoDef.

What did you expect to happen?

Cursor should jump to the definition of the identifier.

What happened instead?

Nothing, except for a message vim-go: [definition] SUCCESS being printed in the status bar.

I suspect it is related to my trying to use bash shell provided by git, so maybe the underlying issue is the same as in this issue #3447

On that note, running :GoRun gives this output "C:\Program Files\Git\bin\bash.exe" -c ""go" "run" "C:\Users\Me\Desktop\testing\go\main.go"" CreateFile C:UsersMeDesktoptestinggomain.go: The system cannot find the file specified. shell returned 1

Configuration (MUST fill this out):

vim-go version:

Not sure how to check this. The commit hash is 1401b57 (from my plugged directory).

vimrc you used to reproduce:

vimrc
set shell=\"$PROGRAMW6432\Git\bin\bash.exe\"
set shellslash                                                  " use forward slash when completing path names

set rtp+=~/.vim/
call plug#begin('~/.vim/plugged')
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
call plug#end()

Vim version (first three lines from :version):

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jul 29 2021 22:03:00)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-3249

Go version (go version):

go version go1.21.4 windows/amd64

Go environment

go env Output:
set GO111MODULE=
set GOARCH=amd64
set GOBIN=C:\Users\Me\bin
set GOCACHE=C:\Users\Me\AppData\Local\go-build
set GOENV=C:\Users\Me\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\Me\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\Me\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.21.4
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=C:\Users\Me\Desktop\testing\go\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\Me\AppData\Local\Temp\go-build1776342804=/tmp/go-build -gno-record-gcc-switches

gopls version

gopls version Output:
golang.org/x/tools/gopls v0.14.2
    golang.org/x/tools/[email protected] h1:sIw6vjZiuQ9S7s0auUUkHlWgsCkKZFWDHmrge8LYsnc=

@bhcleek
Copy link
Collaborator

bhcleek commented Nov 19, 2023

Yes, I suspect this is the same as #3447.

@bhcleek
Copy link
Collaborator

bhcleek commented Nov 19, 2023

I may be able to solve this. Can you help me by giving me some information?

  • What does $PWD report in your bash shell?
  • What does uname -a report in your bash shell?
  • What does :echo &shell report in your Vim?
  • What is the output of :version in your Vim?
  • What is the output of :echo has('win32') in your Vim?

@CrispyDrone
Copy link
Author

I may be able to solve this. Can you help me by giving me some information?

  • What does $PWD report in your bash shell?

bash: /c/Users/Me: Is a directory

  • What does uname -a report in your bash shell?

MINGW64_NT-10.0-19045 DESKTOP-QF7CV1J 3.0.7-338.x86_64 2019-04-30 21:52 UTC x86_64 Msys

  • What does :echo &shell report in your Vim?

C:\Program Files\Git\bin\bash.exe

  • What is the output of :version in your Vim?
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jul 29 2021 22:03:00)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-3249
Compiled by appveyor@APPVYR-WIN
Huge version with GUI.  Features included (+) or not (-):
+acl                +channel            +cscope             +eval               -hangul_input       +linebreak          +multi_byte_ime/dyn +popupwin           +scrollbind         +tag_binary         +timers             +vreplace           
+arabic             +cindent            +cursorbind         +ex_extra           +iconv/dyn          +lispindent         +multi_lang         -postscript         +signs              -tag_old_static     +title              -vtp                
+autocmd            +clientserver       +cursorshape        +extra_search       +insert_expand      +listcmds           +mzscheme/dyn       +printer            +smartindent        -tag_any_white      +toolbar            +wildignore         
+autochdir          +clipboard          +dialog_con_gui     -farsi              +ipv6               +localmap           +netbeans_intg      +profile            -sodium             +tcl/dyn            +user_commands      +wildmenu           
+autoservername     +cmdline_compl      +diff               +file_in_path       +job                +lua/dyn            +num64              +python/dyn         +sound              -termguicolors      +vartabs            +windows            
+balloon_eval       +cmdline_hist       +digraphs           +find_in_path       +jumplist           +menu               +ole                +python3/dyn        +spell              +terminal           +vertsplit          +writebackup        
-balloon_eval_term  +cmdline_info       +directx            +float              +keymap             +mksession          +packages           +quickfix           +startuptime        -termresponse       +virtualedit        -xfontset           
+browse             +comments           -dnd                +folding            +lambda             +modify_fname       +path_extra         +reltime            +statusline         +textobjects        +visual             -xim                
++builtin_terms     +conceal            -ebcdic             -footer             +langmap            +mouse              +perl/dyn           +rightleft          -sun_workshop       +textprop           +visualextra        +xpm_w32            
+byte_offset        +cryptv             +emacs_tags         +gettext/dyn        +libcall            +mouseshape         +persistent_undo    +ruby/dyn           +syntax             -tgetent            +viminfo            -xterm_save         
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$HOME\vimfiles\vimrc"
 3rd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
  2nd user exrc file: "$VIM\_exrc"
  system gvimrc file: "$VIM\gvimrc"
    user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
       defaults file: "$VIMRUNTIME\defaults.vim"
    system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /GF /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32  -DFEAT_CSCOPE -DFEAT_TERMINAL -DFEAT_SOUND -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DFEAT_IPV6   -DFEAT_XPM_W32     -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /source-charset:utf-8 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG  /Zl /MT /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_MSWIN -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl86t.dll\" -DDYNAMIC_TCL_VER=\"8.6\" -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua53.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python39.dll\" -DFEAT_MZSCHEME -I "C:\Program Files\Racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libracket3m_a36fs8.dll\" -DDYNAMIC_MZGC_DLL=\"libracket3m_a36fs8.dll\" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl528.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"x64-msvcrt-ruby240.dll\" -DRUBY_VERSION=24 -DFEAT_HUGE /Fd.\ObjGXOULYHTRZAMD64/ /Zi
Linking: link  /nologo /opt:ref /LTCG:STATUS /HIGHENTROPYVA:NO oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib netapi32.lib uuid.lib /machine:AMD64 gdi32.lib version.lib   winspool.lib comctl32.lib advapi32.lib shell32.lib netapi32.lib  /machine:AMD64  libcmt.lib oleaut32.lib user32.lib  /nodefaultlib:lua53.lib  /STACK:8388608  /nodefaultlib:python27.lib /nodefaultlib:python39.lib   "C:\Tcl\lib\tclstub86.lib" winmm.lib WSock32.lib Ws2_32.lib xpm\x64\lib-vc14\libXpm.lib /PDB:gvim.pdb -debug
  • What is the output of :echo has('win32') in your Vim?

1

Thanks for taking the time to look into this!

@bhcleek
Copy link
Collaborator

bhcleek commented Nov 20, 2023

One last question. Is cygpath executable on your system and is it in your path in the git bash shell?

@CrispyDrone
Copy link
Author

One last question. Is cygpath executable on your system and is it in your path in the git bash shell?

It seems it comes with Git:

$ where cygpath
C:\Program Files\Git\usr\bin\cygpath.exe

@bhcleek
Copy link
Collaborator

bhcleek commented Nov 21, 2023

Can you enable debugging with let g:go_debug=['lsp', 'shell-commands'] and then execute both :GoDef and :GoRun? I'd like to see the output of the :messages afterwards and the complete contents of the __GOLSP_LOG__ window.

@CrispyDrone
Copy link
Author

For :GoRun

:messages

Messages maintainer: Bram Moolenaar <[email protected]>
"W:/Projects/Coding/Exercises/Go/hello-world/main.go" 8L, 99B
vim-go: shell command: "go" "env" "GOBIN"
vim-go: shell command: "C:/Program Files/Go/bin/go.exe" "list"
vim-go: job command: ['C:/Users/Me/bin/gopls.exe', '-debug', 'localhost:0', '-remote=auto']
vim-go: shell command: "C:/Program Files/Go/bin/go.exe" "env" "GOMOD"
vim-go: shell command: "C:/Program Files/Go/bin/go.exe" "env" "GOMOD"
vim-go: initializing gopls
vim-go: initialized gopls
vim-go: Finished loading packages.

W:/Projects/Coding/Exercises/Go/hello-world
"go.sum" [unix] 6L, 499B
"go.mod" [unix] 5L, 51B
"main.go" 8L, 99B



"main.go" 10L, 128B written
vim-go: shell command: "C:/Program Files/Go/bin/go.exe" "list" "-tags" "" "-f" "{{range $f := .GoFiles}}{{$.Dir}}\{{$f}}{{printf \""\n\""}}{{end}}{{range $f := .CgoFiles}}{{$.Dir}}\{{$f}}{{printf \""\n\""}}{{end}}"
vim-go: shell command: ['go', 'run', 'W:\Projects\Coding\Exercises\Go\hello-world\main.go']
vim-go: [run] FAILED

__GOLSP__LOG__ window:

===== sent =====
Content-Length: 734

{"method":"initialize","jsonrpc":"2.0","id":1,"params":{"rootUri":"file:///W:/Projects/Coding/Exercises/Go/hello-world","capabilities":{"workspace":{"workspaceFolders":true,"workspaceEdit":{"documentChanges":true},"configuration":true,"didChangeConfiguration":{"dynamicRegistration":true}},"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["source.organizeImports","refactor.rewrite","refactor.extract"]}}},"completion":{"completionItem":{"snippetSupport":false}},"hover":{"contentFormat":["plaintext"]}}},"clientInfo":{"name":"vim-go"},"processId":7036,"workspaceFolders":[{"uri":"file:///W:/Projects/Coding/Exercises/Go/hello-world","name":"W:\\Projects\\Coding\\Exercises\\Go\\hello-world"}]}}
===== stderr =====
serve.go:443: debug server listening at http://localhost:55807
===== received =====
Content-Length: 272

{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2023/11/24 02:22:23 Handshake session update\n\tupdate_session=1\n\tdebug_address=\"127.0.0.1:55807\"\n\tlogfile=\"\"\n\tserver=\"1\"\n\tgopls_path=\"C:\\\\Users\\\\Me\\\\bin\\\\gopls.exe\"\n"}}
===== received =====
Content-Length: 4374

{"jsonrpc":"2.0","result":{"capabilities":{"textDocumentSync":{"change":2,"openClose":true,"save":{}},"completionProvider":{"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor.extract","refactor.inline","refactor.rewrite","source.fixAll","source.organizeImports"]},"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.apply_fix","gopls.change_signature","gopls.check_upgrades","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.workspace_stats"]},"callHierarchyProvider":true,"semanticTokensProvider":{"full":true,"legend":{"tokenModifiers":[],"tokenTypes":[]},"range":true},"inlayHintProvider":{},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"{\"GoVersion\":\"go1.21.4\",\"Path\":\"golang.org/x/tools/gopls\",\"Main\":{\"Path\":\"golang.org/x/tools/gopls\",\"Version\":\"v0.14.2\",\"Sum\":\"h1:sIw6vjZiuQ9S7s0auUUkHlWgsCkKZFWDHmrge8LYsnc=\",\"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.5.9\",\"Sum\":\"h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=\",\"Replace\":null},{\"Path\":\"github.com/sergi/go-diff\",\"Version\":\"v1.1.0\",\"Sum\":\"h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=\",\"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.14.0\",\"Sum\":\"h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=\",\"Replace\":null},{\"Path\":\"golang.org/x/sync\",\"Version\":\"v0.4.0\",\"Sum\":\"h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=\",\"Replace\":null},{\"Path\":\"golang.org/x/sys\",\"Version\":\"v0.14.0\",\"Sum\":\"h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=\",\"Replace\":null},{\"Path\":\"golang.org/x/telemetry\",\"Version\":\"v0.0.0-20231114163143-69313e640400\",\"Sum\":\"h1:brbkEFfGwNGAEkykUOcryE/JiHUMMJouzE0fWWmz/QU=\",\"Replace\":null},{\"Path\":\"golang.org/x/text\",\"Version\":\"v0.13.0\",\"Sum\":\"h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=\",\"Replace\":null},{\"Path\":\"golang.org/x/tools\",\"Version\":\"v0.14.1-0.20231114185516-c9d3e7de13fd\",\"Sum\":\"h1:Oku7E+OCrXHyst1dG1z10etCTxewCHXNFLRlyMPbh3w=\",\"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.5\",\"Sum\":\"h1:YGD4H+SuIOOqsyoLOpZDWcieM28W47/zRO7f+9V3nvo=\",\"Replace\":null},{\"Path\":\"mvdan.cc/gofumpt\",\"Version\":\"v0.4.0\",\"Sum\":\"h1:JVf4NN1mIpHogBj7ABpgOyZc65/UUOkKQFkoURsz4MM=\",\"Replace\":null},{\"Path\":\"mvdan.cc/xurls/v2\",\"Version\":\"v2.4.0\",\"Sum\":\"h1:tzxjVAj+wSBmDcF6zBB7/myTy3gX9xvi8Tyr28AuQgc=\",\"Replace\":null}],\"Settings\":[{\"Key\":\"-buildmode\",\"Value\":\"exe\"},{\"Key\":\"-compiler\",\"Value\":\"gc\"},{\"Key\":\"DefaultGODEBUG\",\"Value\":\"panicnil=1\"},{\"Key\":\"CGO_ENABLED\",\"Value\":\"0\"},{\"Key\":\"GOARCH\",\"Value\":\"amd64\"},{\"Key\":\"GOOS\",\"Value\":\"windows\"},{\"Key\":\"GOAMD64\",\"Value\":\"v1\"}],\"Version\":\"v0.14.2\"}"}},"id":1}
===== sent =====
Content-Length: 52

{"method":"initialized","jsonrpc":"2.0","params":{}}
===== sent =====
Content-Length: 228

{"method":"workspace/didChangeWorkspaceFolders","jsonrpc":"2.0","params":{"event":{"added":[{"uri":"file:///W:/Projects/Coding/Exercises/Go/hello-world","name":"W:\\Projects\\Coding\\Exercises\\Go\\hello-world"}],"removed":[]}}}
===== sent =====
Content-Length: 311

{"method":"textDocument/didOpen","jsonrpc":"2.0","params":{"textDocument":{"uri":"W%3A%2FProjects%2FCoding%2FExercises%2FGo%2Fhello-world%2Fmain.go","version":3,"languageId":"go","text":"package main\r\n\r\nimport \"fmt\"\r\nimport \"rsc.io/quote\"\r\n\r\nfunc main() {\r\n\tfmt.Println(quote.Go())\r\n}\r\n"}}}
===== received =====
Content-Length: 99

{"jsonrpc":"2.0","method":"window/showMessage","params":{"type":4,"message":"Loading packages..."}}
===== received =====
Content-Length: 165

{"jsonrpc":"2.0","method":"workspace/configuration","params":{"items":[{"scopeUri":"file:///W:/Projects/Coding/Exercises/Go/hello-world","section":"gopls"}]},"id":1}
===== sent =====
Content-Length: 78

{"id":1,"jsonrpc":"2.0","result":[{"buildFlags":[],"hoverKind":"Structured"}]}
===== received =====
Content-Length: 542

{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2023/11/24 02:22:23 go info for W:\\Projects\\Coding\\Exercises\\Go\\hello-world\n(go dir W:\\Projects\\Coding\\Exercises\\Go\\hello-world)\n(go version go version go1.21.4 windows/amd64)\n(valid build configuration = true)\n(build flags: [])\n(selected go env: [GO111MODULE=, GOCACHE=C:\\Users\\Me\\AppData\\Local\\go-build, GOFLAGS=, GOMODCACHE=C:\\Users\\Me\\go\\pkg\\mod, GOPATH=C:\\Users\\Me\\go, GOPRIVATE=, GOROOT=C:\\Program Files\\Go, GOWORK=])\n\n"}}
===== sent =====
Content-Length: 316

{"method":"textDocument/didChange","jsonrpc":"2.0","params":{"contentChanges":[{"text":"package main\r\n\r\nimport \"fmt\"\r\nimport \"rsc.io/quote\"\r\n\r\nfunc main() {\r\n\tfmt.Println(quote.Go())\r\n}\r\n"}],"textDocument":{"uri":"W%3A%2FProjects%2FCoding%2FExercises%2FGo%2Fhello-world%2Fmain.go","version":4}}}
===== received =====
Content-Length: 286

{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2023/11/24 02:22:32 go/packages.Load #1\n\tsnapshot=0\n\tdirectory=file:///W:/Projects/Coding/Exercises/Go/hello-world\n\tquery=[W:\\Projects\\Coding\\Exercises\\Go\\hello-world\\... builtin]\n\tpackages=2\n"}}
===== received =====
Content-Length: 155

{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2023/11/24 02:22:32 go/packages.Load #1: updating metadata for 51 packages\n"}}
===== received =====
Content-Length: 106

{"jsonrpc":"2.0","method":"window/showMessage","params":{"type":3,"message":"Finished loading packages."}}
===== received =====
Content-Length: 176

{"jsonrpc":"2.0","method":"client/registerCapability","params":{"registrations":[{"id":"workspace/didChangeConfiguration","method":"workspace/didChangeConfiguration"}]},"id":2}
===== sent =====
Content-Length: 38

{"id":2,"jsonrpc":"2.0","result":null}
===== received =====
Content-Length: 99

{"jsonrpc":"2.0","method":"window/showMessage","params":{"type":4,"message":"Loading packages..."}}
===== received =====
Content-Length: 165

{"jsonrpc":"2.0","method":"workspace/configuration","params":{"items":[{"scopeUri":"file:///W:/Projects/Coding/Exercises/Go/hello-world","section":"gopls"}]},"id":3}
===== sent =====
Content-Length: 78

{"id":3,"jsonrpc":"2.0","result":[{"buildFlags":[],"hoverKind":"Structured"}]}
===== sent =====
Content-Length: 322

{"method":"textDocument/didChange","jsonrpc":"2.0","params":{"contentChanges":[{"text":"package main\r\n\r\nimport \"fmt\"\r\nimport \"rsc.io/quote\"\r\n\r\nfunc main() {\r\n\t\r\n\tfmt.Println(quote.Go())\r\n}\r\n"}],"textDocument":{"uri":"W%3A%2FProjects%2FCoding%2FExercises%2FGo%2Fhello-world%2Fmain.go","version":8}}}
===== sent =====
Content-Length: 350

{"method":"textDocument/didChange","jsonrpc":"2.0","params":{"contentChanges":[{"text":"package main\r\n\r\nimport \"fmt\"\r\nimport \"rsc.io/quote\"\r\n\r\nfunc main() {\r\n\tlet k = 0\r\n\tfmt.Println(quote.Go())\r\n\tfmt.Println(\r\n}\r\n"}],"textDocument":{"uri":"W%3A%2FProjects%2FCoding%2FExercises%2FGo%2Fhello-world%2Fmain.go","version":30}}}
===== sent =====
Content-Length: 352

{"method":"textDocument/didChange","jsonrpc":"2.0","params":{"contentChanges":[{"text":"package main\r\n\r\nimport \"fmt\"\r\nimport \"rsc.io/quote\"\r\n\r\nfunc main() {\r\n\tlet k = 0\r\n\tfmt.Println(quote.Go())\r\n\tfmt.Println(k)\r\n}\r\n"}],"textDocument":{"uri":"W%3A%2FProjects%2FCoding%2FExercises%2FGo%2Fhello-world%2Fmain.go","version":32}}}
===== sent =====
Content-Length: 194

{"method":"textDocument/formatting","jsonrpc":"2.0","id":2,"params":{"options":{"insertSpaces":false},"textDocument":{"uri":"W%3A%2FProjects%2FCoding%2FExercises%2FGo%2Fhello-world%2Fmain.go"}}}
===== received =====
Content-Length: 38

{"jsonrpc":"2.0","result":null,"id":2}
===== sent =====
Content-Length: 282

{"method":"textDocument/codeAction","jsonrpc":"2.0","id":3,"params":{"context":{"only":["source.organizeImports"]},"range":{"end":{"character":0,"line":10},"start":{"character":0,"line":0}},"textDocument":{"uri":"W%3A%2FProjects%2FCoding%2FExercises%2FGo%2Fhello-world%2Fmain.go"}}}
===== received =====
Content-Length: 38

{"jsonrpc":"2.0","result":null,"id":3}
===== sent =====
Content-Length: 352

{"method":"textDocument/didChange","jsonrpc":"2.0","params":{"contentChanges":[{"text":"package main\r\n\r\nimport \"fmt\"\r\nimport \"rsc.io/quote\"\r\n\r\nfunc main() {\r\n\tlet k = 0\r\n\tfmt.Println(quote.Go())\r\n\tfmt.Println(k)\r\n}\r\n"}],"textDocument":{"uri":"W%3A%2FProjects%2FCoding%2FExercises%2FGo%2Fhello-world%2Fmain.go","version":33}}}

For GoDef:

:messages

vim-go: [definition] SUCCESS

__GOLSP__LOG__ window:

===== sent =====
Content-Length: 198

{"method":"textDocument/definition","jsonrpc":"2.0","id":4,"params":{"textDocument":{"uri":"W%3A%2FProjects%2FCoding%2FExercises%2FGo%2Fhello-world%2Fmain.go"},"position":{"character":13,"line":8}}}
===== received =====
Content-Length: 38

{"jsonrpc":"2.0","result":null,"id":4}

@bhcleek bhcleek changed the title GoDef (and various other commands) don't work, potentially due to pathing issue mingw: GoDef (and various other commands) don't work, potentially due to pathing issue Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants