ray-x / navigator.lua

Code analysis & navigation plugin for Neovim. Navigate codes like a breeze🎐 Exploring LSP and 🌲Treesitter symbols a piece of 🍰 Take control like a boss 🦍
MIT License
1.28k stars 55 forks source link

cannot find package "unsafe" with golang #55

Open bigduu opened 2 years ago

bigduu commented 2 years ago

setting

lua <<EOF
require'navigator'.setup({
debug = true
})
EOF

gh.log

[INFO  Thu Sep  2 00:22:39 2021] .../nvim/plugged/navigator.lua/lua/navigator/definition.lua:50: { {
    error = {
      code = 0,
      message = 'err: exit status 1: stderr: cannot find package "unsafe" in any of:\n\t/usr/local/Cellar/go/1.16.2/bin/src/unsafe (from $GOROOT)\n\t/Users/bigduu/Documents/git/goproject/src/unsafe (from $GOPATH)\n: packages.Load error',
      <metatable> = {
        __tostring = <function 1>
      }
    }
  } }
bigduu commented 2 years ago

golang version is 1.16.2 OS : macOS 11.4

ray-x commented 2 years ago

Sizeof() is an internal function and go std package does not include it's go code. I suspect it is a C function. Also checked behaviour in vs-code and default lspconfig. But show the same/similar error (depends on gopls version).

bigduu commented 2 years ago

my gopls version

golang.org/x/tools/gopls v0.7.1
    golang.org/x/tools/gopls@v0.7.1 h1:Mh3Z8Xcoq3Zy7ksSlwDV/nzQSbjFf06A+L+F8YHq55U=