Ensure fzf-lua opens files relative in neovim
This commit is contained in:
parent
d87b854c49
commit
2180d98970
|
@ -217,6 +217,7 @@ in {
|
|||
plugin = fzf-lua.overrideAttrs (old: {
|
||||
patches = (old.patches or []) ++ [
|
||||
./neovim/patches/fzf-lua-colors.patch
|
||||
./neovim/patches/fzf-lua-path.patch
|
||||
];
|
||||
});
|
||||
|
||||
|
|
17
home/programs/neovim/patches/fzf-lua-path.patch
Normal file
17
home/programs/neovim/patches/fzf-lua-path.patch
Normal file
|
@ -0,0 +1,17 @@
|
|||
See:
|
||||
|
||||
- https://github.com/ibhagwan/fzf-lua/issues/678
|
||||
- https://github.com/ibhagwan/fzf-lua/pull/679
|
||||
|
||||
diff --git a/lua/fzf-lua/path.lua b/lua/fzf-lua/path.lua
|
||||
index ff5a79b..22b3923 100644
|
||||
--- a/lua/fzf-lua/path.lua
|
||||
+++ b/lua/fzf-lua/path.lua
|
||||
@@ -234,6 +234,7 @@ function M.entry_to_file(entry, opts, force_uri)
|
||||
if cwd and #cwd > 0 and not isURI and
|
||||
not M.starts_with_separator(stripped) then
|
||||
stripped = M.join({ cwd, stripped })
|
||||
+ stripped = M.relative(stripped, vim.fn.getcwd())
|
||||
end
|
||||
-- #336: force LSP jumps using 'vim.lsp.util.jump_to_location'
|
||||
-- so that LSP entries are added to the tag stack
|
Loading…
Reference in a new issue