Closed mrjones2014 closed 1 year ago
Interestingly, it seems to work if I do regular LSP go to definition first, then try goto-preview
Hi, I haven't been able to reproduce this. From the error it's like at the time you try to call the function, setup
for the plugin hasn't been called yet, the setup function is what sets the default config in the plugin which is what defines lsp_configs
, so my guess is that some lazy loading is happening and by the time you call the goto-preview function, setup hasn't yet happened.
You can test this out by when first opening Neovim, calling :lua require('goto-preview').setup{}
manually and then calling goto_preview_definition()
afterwards, you shouldn't run into the error then.
Hmm, I'm lazy loading based on filetype which I thought should work, but I can figure this out with this info. Thanks.
Describe the bug
Error when you try to use any functions.
To Reproduce Steps to reproduce the behavior:
require('goto-preview').goto_preview_definition()
on a buffer with an LSP enabledExpected behavior It opens the definition in a floating window
Screenshots
Baseline (please complete the following information):
uname -a
:Darwin Mats-MBP.lan 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000 arm64
nvim --version
:NVIM v0.8.0-dev-997-gfa747d004-dirty
Additional context Add any other context about the problem here.