diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 4c06e26b91ca6..d3da454041399 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -2125,6 +2125,11 @@ in telescope-nvim sqlite-lua ]; + + patches = [ ./patches/smart-open.nvim/fix-paths.patch ]; + postPatch = '' + substituteInPlace lua/telescope/_extensions/smart_open/file_scanner.lua --replace-fail '@rg@' ${ripgrep}/bin/rg + ''; }; sniprun = diff --git a/pkgs/applications/editors/vim/plugins/patches/smart-open.nvim/fix-paths.patch b/pkgs/applications/editors/vim/plugins/patches/smart-open.nvim/fix-paths.patch new file mode 100644 index 0000000000000..7e45c5973f5c4 --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/patches/smart-open.nvim/fix-paths.patch @@ -0,0 +1,13 @@ +diff --git a/lua/telescope/_extensions/smart_open/file_scanner.lua b/lua/telescope/_extensions/smart_open/file_scanner.lua +index 1cba423..cb20ea7 100644 +--- a/lua/telescope/_extensions/smart_open/file_scanner.lua ++++ b/lua/telescope/_extensions/smart_open/file_scanner.lua +@@ -69,7 +69,7 @@ local function ripgrep_scan(basedir, ignore_patterns, on_insert, on_complete) + local stop + + local start_time +- stop = spawn("rg", { args = args, cwd = basedir }, { ++ stop = spawn("@rg@", { args = args, cwd = basedir }, { + stdout = function(_, chunk) + if not start_time then + start_time = vim.loop.uptime()