Hello everyoneI know this doesn’t really fit in the NixOS forum but this problem only appears on NixOS (I tried it on a Fedora too and it worked).
So I have the neovim plugin telescope.nvim (installed via Lazy.nvim) and it uses telescope-fzf-native.nvim.
Problem
When I start Neovim I get following error:
Here as Text:
Failed to run `config` for telescope.nvim
...m/lazy/telescope.nvim/lua/telescope/_extensions/init.lua:10: 'fzf' extension doesn't exist or isn't installed: ...hare/nvim/lazy/telescope-fzf-native.nvim/lua/fzf_lib.lua:11: /home/me/.local/share/nvim/lazy/telesc
ope-fzf-native.nvim/lua/../build/libfzf.so: cannot open shared object file: No such file or directory
# stacktrace:
- /telescope.nvim/lua/telescope/_extensions/init.lua:10 _in_ **load_extension**
- /telescope.nvim/lua/telescope/_extensions/init.lua:62 _in_ **load_extension**
- ~/.config/nvim/lua/plugins/navigation/telescope.lua:27 _in_ **config**
- ~/.config/nvim/lua/config/lazy.lua:28
- ~/.config/nvim/lua/config/init.lua:3
- ~/dotfiles/.config/nvim/init.lua:1
When I use telesecope without the fzf-native plugin and install it instead in my configuration.nix it works fine.
Here is my telescope config:
return {
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
dependencies = {
"nvim-lua/plenary.nvim",
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
"nvim-tree/nvim-web-devicons",
"folke/todo-comments.nvim",
},
config = function()
local telescope = require("telescope")
local actions = require("telescope.actions")
telescope.setup({
defaults = {
path_display = { "smart" },
mappings = {
i = {
["<C-k>"] = actions.move_selection_previous, -- move to prev result
["<C-j>"] = actions.move_selection_next, -- move to next result
},
},
},
})
telescope.load_extension("fzf")
-- set keymaps
local keymap = vim.keymap -- for conciseness
keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Fuzzy find files in cwd" })
keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "Fuzzy find recent files" })
keymap.set("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Find string in cwd" })
keymap.set("n", "<leader>fc", "<cmd>Telescope grep_string<cr>", { desc = "Find string under cursor in cwd" })
keymap.set("n", "<leader>ft", "<cmd>TodoTelescope<cr>", { desc = "Find todos" })
end,
}
Does anyone know what the problem is?