Open marcoSven opened 7 months ago
I use telescope so I previously didn't bump into this problem. I'll look into it
Maybe this is related too did not know where to properly report it ... https://github.com/ibhagwan/fzf-lua/issues/949 https://github.com/ibhagwan/fzf-lua/issues/949#issuecomment-1972838951
I believe this https://github.com/ibhagwan/fzf-lua/issues/949#issuecomment-1973624200 from @ibhagwan about related issue would be useful here:
In order to display the diff for the code action preview, if the action doesn't contain the workspace edit section,
fzf-lua
will send acodeAction/resolve
request to the LSP server, the first call works (as you found out) but any subsequent call is bugged (and returnsnil
) withtypescript-tools.nvim
. Iffzf-lua
sends a synchrounous request with:
:FzfLua lsp_code_actions previewer=codeaction_native
typescript-tools.nvim
returns a nil action, with the latest commit,fzf-lua
will fallback to the original unresolved action and display this message (no error but also no diff):If using the neovim builtin (non-native) previewer,
fzf-lua
will send an async LSP request and waits for a callback which never returns, e.g.::FzfLua lsp_code_actions previewer=codeaction
Resulting in:
Originally posted by @ibhagwan in https://github.com/ibhagwan/fzf-lua/issues/949#issuecomment-1973624200
I use telescope so I previously didn't bump into this problem. I'll look into it
@pmizio, the reason you didn’t bump into is probably because this requires using code action previews, I believe Telescope doesn’t come builtin with code action previews unless you’re using: https://github.com/aznhe21/actions-preview.nvim
Based on my testing this issue only happens after sending a codeAction/resolve
request which doesn’t get called unless you’re using fzf-lua with preview or the above Telescope extension.
Oh and @marcoSven, I’m pretty sure the "Move to new file" will work if you disable the code actions previewer by setting lsp.code_actions.previewer=false
at setup
.
@ibhagwan yes that is what I did, without preview "Move to new file" is working.
"Move to new file" not working with typescript-tools and FZF Lua Code actions.
"Move to new file" is working with lspconfig and FZF Lua
This is a similar issue https://github.com/ibhagwan/fzf-lua/issues/1007
To reproduce the issue with typescript-tools
The issue can be resolved by disabling the previewer
Please see comment