Closed pdindorf closed 2 years ago
This sounds like path variables between flatpack and OpenSuse's package manager don't play nicely together.
Quick test: open standard vim (or neovim), whatever you can install from your systems' package manager and run this command echo executable("rg")
, which should return 1. That would be a strong indicator for my hypothesis.
I'm honestly not entirely sure how this would be fixed as I'm unfamiliar with flatpack. Quick googling https://docs.flatpak.org/en/latest/sandbox-permissions.html confirms my hunch that any flatpak application is entirely sandboxed from the OS.
See also this reddit post, so I guess it might work when launching nvim
with flatpak-spawn --host
.
In any case, this is not a telescope but rather a flatpak issue. I'm happy to try and help here on the issue further if you have more questions, but closing this already for the aforementioned reason. Good luck :)
Thank you! You were absolutely right - flatpak completely sandboxes application from other binaries and that's what technically makes it secure.
I've manged to fix my issue by copying fd and rg binaries from /usr/bin to /var/lib/flatpak/app/io.neovim.nvim/x86_64/stable/active/files/bin.
Unfortunately symlinks are not visible for flatpak apps and hard links were a no-go in my case as /var and /usr are on different partitions on my system. Fortunately neovim has :terminal feature which made troubleshooting of this issue much much easier. Thank you!!!
Description
Telescope live_grep doesn't work even though all dependencies seem to be satisfied. When I ran the checkhealth command I get the following:
health#telescope#check
Checking for required plugins
Checking external dependencies
live-grep
finder will not function without BurntSushi/ripgrep installed.However both ripgrep and fd are installed and accessible from bash: ~> which fd && which rg /usr/bin/fd /usr/bin/rg
In the telescope.log I can see the following stacktrace: [WARN Tue 23 Nov 2021 11:24:11 PM CET] ...ta/nvim/plugged/telescope.nvim/lua/telescope/pickers.lua:434: Finder failed with msg: ...vim/data/nvim/plugged/telescope.nvim/lua/telescope/.lua:287: rg: Executable not found stack traceback: ...vim/data/nvim/plugged/telescope.nvim/lua/telescope/.lua:287: in function 'convertopts' ...vim/data/nvim/plugged/telescope.nvim/lua/telescope/.lua:17: in function 'new' ...vim/data/nvim/plugged/telescope.nvim/lua/telescope/_.lua:59: in function 'spawn' ...elescope.nvim/lua/telescope/finders/async_job_finder.lua:49: in function 'finder' ...ta/nvim/plugged/telescope.nvim/lua/telescope/pickers.lua:430: in function <...ta/nvim/plugged/telescope.nvim/lua/telescope/pickers.lua:429> [C]: in function 'pcall' ...ta/nvim/plugged/telescope.nvim/lua/telescope/pickers.lua:429: in function <...ta/nvim/plugged/telescope.nvim/lua/telescope/pickers.lua:377>
I have neovim installed as a flatpak. Telescope + it's dependencies (Treesitter, nvim-lspconfig, devicons, plenary) installed via vim-plug. Ripgrep and fd has been installed from official openSUSE repositories:
Information for package ripgrep:
Repository : Main Repository Name : ripgrep Version : 12.1.1-bp153.1.14 Arch : x86_64 Vendor : openSUSE Installed Size : 5.0 MiB Installed : Yes Status : up-to-date Source package : ripgrep-12.1.1-bp153.1.14.src Summary : A search tool that combines ag with grep Description : ripgrep is a line oriented search tool that combines the usability of The Silver Searcher (similar to ack) with the raw speed of GNU grep. ripgrep works by recursively searching your current directory for a regex pattern.
Information for package fd:
Repository : Main Repository Name : fd Version : 8.1.1-bp153.1.14 Arch : x86_64 Vendor : openSUSE Installed Size : 3.1 MiB Installed : Yes Status : up-to-date Source package : fd-8.1.1-bp153.1.14.src Summary : An alternative to the "find" utility Description : fd is an alternative to GNU find. It features:
Neovim version
Operating system and version
openSUSE Leap 15.3
checkhealth telescope
Steps to reproduce
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/~hub.flatpakrepo
sudo flatpak install neovim
sudo zypper in ripgrep fd
flatpak run io.neovim.nvim -u <PATH_TO_CONFIG>
:Telescope live_grep
Expected behavior
Popup telescope window with working ripgrep functionality
Actual behavior
I get a popup window but when I type a text to search I get absolutely no results:
When I run rg from cli from the very same directory I get the results:
Minimal config