live_grep 也无法按预期工作。 Neovim 在外部依赖中找不到它们

问题描述 投票:0回答:1

我是 neovim 新手,正在尝试开始配置我的系统。我正在运行 Debian 系统并拥有 flatpak'd Neovim。我认为这可能是我面临的问题的原因。这是我当前的“init.lua”文件。

vim.cmd("set expandtab")
vim.cmd("set tabstop=4")
vim.cmd("set softtabstop=4")
vim.cmd("set shiftwidth=4")
vim.g.mapleader = " "

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

local plugins = {
    { "catppuccin/nvim", name = "catppuccin", priority = 1000 },
    {
      'nvim-telescope/telescope.nvim', tag = '0.1.6',
      dependencies = { 'nvim-lua/plenary.nvim' }
    }
}
local opts = {}

vim.env.PATH = '/usr/bin:' .. vim.env.PATH

require("lazy").setup(plugins, opts)
local builtin = require("telescope.builtin")
vim.keymap.set('n', '<C-p>', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})

require("catppuccin").setup()
vim.cmd.colorscheme "catppuccin"

我正在使用懒惰。我已经安装了 ripgrep 和 fd。但是当我运行“检查健康望远镜”时。我明白了:

==============================================================================
telescope: require("telescope.health").check()

Checking for required plugins ~
- OK plenary installed.
- WARNING nvim-treesitter not found. 

Checking external dependencies ~
- ERROR rg: not found. `live-grep` finder will not function without [BurntSushi/ripgrep](https://github.com/BurntSushi/ripgrep) installed.
- WARNING fd: not found. Install [sharkdp/fd](https://github.com/sharkdp/fd) for extended capabilities

===== Installed extensions ===== ~

ripgrep 和 fd 二进制文件都位于此位置:

❯ which rg && which fdfind
/usr/bin/rg
/usr/bin/fdfind

如果我检查“init.lua”的路径:

/usr/bin:/app/bin:/usr/bin:/home/boibhav/.var/app/io.neovim.nvim/data/node/bin:/home/boibhav/.var/app/io.neovim.nvim/data/cargo/bin:/home/boibhav/.var/app/io.neovim.nvim/data/python/bin:/home
/boibhav/.var/app/io.neovim.nvim/data/gem/ruby/3.2.0/bin

文件搜索视图确实打开,但在输入任何搜索查询时我看不到任何结果。有人可以帮我解决这个问题吗?谢谢您的宝贵时间。

linux debian neovim lazyvim
1个回答
0
投票

我有相同的设置,Debian 和 Flatpak Neovim。我找到并安装了这个,它似乎可以工作:https://github.com/iruzo/ripgrep.nvim

© www.soinside.com 2019 - 2024. All rights reserved.