RTFM Checklist
Operating system
Linux
Shell
fish, version 4.0.2
Neovim version (nvim --version)
NVIM v0.12.0-dev-916+g68eece8b84
Fzf version (fzf --version)
0.65.0 (04c4269d)
Output of :lua print(os.getenv('FZF_DEFAULT_OPTS'))
nil
Is the problem reproducible with mini.sh?
Fzf-lua configuration
opts = {
winopts = {
width = 0.98,
height = 0.98,
backdrop = 85,
preview = {
layout = 'vertical',
vertical = 'down:60%',
delay = 30,
},
},
files = {
path_shorten = 10,
git_icons = true,
},
previewers = {
builtin = {
title_fnamemodify = function(s)
return s
end,
},
},
},
config = function(_, opts)
require('fzf-lua').setup(opts)
require('fzf-lua').register_ui_select()
end
Describe the bug / steps to reproduce
Hi!
Thanks for your awesome plugin! I use it daily and really enjoy it.
I'm encountering a bug when using :FzfLua lsp_definitions on a method whose body is source-generated with C# source generators. The call results in the following error:
Lua :command callback: /usr/share/nvim/runtime/lua/vim/lsp/util.lua:1024: Cursor position outside buffer
stack traceback:
[C]: in function 'nvim_win_set_cursor'
/usr/share/nvim/runtime/lua/vim/lsp/util.lua:1024: in function 'jump_to_location'
.../fzf-lua/lua/fzf-lua/actions.lua:251: in function <.../fzf-lua/lua/fzf-lua/actions.lua:149>
.../fzf-lua/lua/fzf-lua/actions.lua:268: in function 'vimcmd_entry'
.../fzf-lua/lua/fzf-lua/actions.lua:275: in function 'jump_to_location'
.../fzf-lua/lua/fzf-lua/providers/lsp.lua:433: in function 'fn_contents'
.../fzf-lua/lua/fzf-lua/providers/lsp.lua:611: in function <.../fzf-lua/lua/fzf-lua/providers/lsp.lua:606>
.../fzf-lua/lua/fzf-lua/cmd.lua:35: in function 'run_command'
.../fzf-lua/plugin/fzf-lua.lua:10: in function <.../fzf-lua/plugin/fzf-lua.lua:9>
The buffer that gets opened has a path like this (notice the tilde prefix):
~/source/work/demo/Sourcegen/roslyn-source-generated://8050b016-c2f9-41b3-a089-5c75e8000202/Example.HelloWorld.g.cs?documentId=c08647b7-f2a8-79d3-3de3-f3ae9d6a489d&hintName=Example.HelloWorld.g.cs&assemblyName=Generators&assemblyVersion=1.0.0.0&typeName=Generators.HelloWorldGenerator&assemblyPath=/home/mvs/source/work/demo/Sourcegen/src/Generators/bin/Debug/netstandard2.0/Generators.dll
But the correct buffer path should be:
roslyn-source-generated://8050b016-c2f9-41b3-a089-5c75e8000202/Example.HelloWorld.g.cs?documentId=c08647b7-f2a8-79d3-3de3-f3ae9d6a489d&hintName=Example.HelloWorld.g.cs&assemblyName=Generators&assemblyVersion=1.0.0.0&typeName=Generators.HelloWorldGenerator&assemblyPath=%2Fhome%2Fmvs%2Fsource%2Fwork%2Fdemo%2FSourcegen%2Fsrc%2FGenerators%2Fbin%2FDebug%2Fnetstandard2.0%2FGenerators.dll
Interestingly, using :lua vim.lsp.buf.definition() or :lua vim.lsp.buf.references() works as expected and opens the buffer correctly.
You can reproduce the issue using this minimal repo
To reproduce:
- Run
dotnet build (requires .NET 10 Preview).
- Open
Program.cs.
- Use “Go to definition” (
FzfLua lsp_definitions) on the HelloWorld() method.
You'll also need the roslyn.nvim plugin, and the Roslyn LSP server as described in its README (from a custom mason registry).
Let me know if you need any help reproducing
RTFM Checklist
man fzf/ I am well versed in shell fzfOperating system
Linux
Shell
fish, version 4.0.2
Neovim version (
nvim --version)NVIM v0.12.0-dev-916+g68eece8b84
Fzf version (
fzf --version)0.65.0 (04c4269d)
Output of
:lua print(os.getenv('FZF_DEFAULT_OPTS'))nil
Is the problem reproducible with
mini.sh?mini.shmini.shmini.sh(not relevant, requires LSP, Windows, etc)Fzf-lua configuration
Describe the bug / steps to reproduce
Hi!
Thanks for your awesome plugin! I use it daily and really enjoy it.
I'm encountering a bug when using
:FzfLua lsp_definitionson a method whose body is source-generated with C# source generators. The call results in the following error:The buffer that gets opened has a path like this (notice the tilde prefix):
But the correct buffer path should be:
Interestingly, using
:lua vim.lsp.buf.definition()or:lua vim.lsp.buf.references()works as expected and opens the buffer correctly.You can reproduce the issue using this minimal repo
To reproduce:
dotnet build(requires .NET 10 Preview).Program.cs.FzfLua lsp_definitions) on theHelloWorld()method.You'll also need the roslyn.nvim plugin, and the Roslyn LSP server as described in its README (from a custom mason registry).
Let me know if you need any help reproducing