tjdevries / nvim-langserver-shim

Shim for the language server protocol developed by Microsoft
MIT License
155 stars 4 forks source link

`Key not present in Dictionary: result` on LSP commands #16

Closed euclio closed 7 years ago

euclio commented 7 years ago
:version
NVIM v0.2.0-485-g81525dc5
Build type: RelWithDebInfo
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFI
G_H -I/tmp/neovim-20170130-94135-adws86/build/config -I/tmp/neovim-20170130-94135-adws86/src -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/Applications/Xcode.app/Contents/Developer/Platfo
rms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include -I/tmp/neovim-20170130-94135-adws86/build/src/nvim/auto -I/tmp/neovim-20170130-94135-adws86/build/include
Compiled by anrussell@anrussell-mba

Optional features included (+) or not (-): +acl   +iconv    +jemalloc +tui
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/HEAD-81525dc/share/nvim"

Steps to reproduce:

Run :LSPStart.

Output: [' info: Succesfully connected to: 10']

Move the cursor to any variable name. I'm using tests/test.go to test with the sample configuration from the README. Run :LSPHover.

Output:

Error detected while processing function <SNR>122_on_stdout[4]..<SNR>121__on_lsp_stdout[60]..langserver#callbacks#on_notification[22]..langserver#hover#callback[1]..langserver#callbacks#data:
line    8:
E716: Key not present in Dictionary: result
tjdevries commented 7 years ago

What are you go lang environment setup/environment variable set up as?

These can drastically change what results you get from the golang server. For example, if you don't have the file that you're editing in your $GOPATH, I believe the golang server will not be able to do anything with it.

euclio commented 7 years ago

Ah, that was it! I don't use Go, so I didn't realize that the files had to be in $GOPATH.