我的 neovim 望远镜配置做错了什么

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

当我第一次在 powershell 7 中打开 neovim 时,出现以下错误。你能让我知道我做错了什么吗?我正在使用惰性包管理器,并运行检查望远镜的运行状况并显示所有“正常”。

错误信息:

无法运行 Telescope.nvim 的

config
...a/lazy/telescope.nvim/lua/telescope/_extensions/init.lua:10: 'fzf' 扩展不存在或未安装: ...nvim-data/lazy/telescope-fzf -native.nvim/lua/fzf_lib.lua:11: ?>无法加载模块 'C:/Users/{ME}/AppData/Local/nvim-data/lazy/telescope-fzf->native.nvim/lua/。 ./build/libfzf.dll': 找不到指定的模块。^M

堆栈跟踪:

  • telescope.nvim\lua elescope_extensions\init.lua:10 in load_extension
  • telescope.nvim\lua elescope_extensions\init.lua:62 in load_extension
  • lua/{ME}/plugins/telescope.lua:25 in config
  • lua/{ME}/lazy.lua:14
  • init.lua:4

望远镜.lua

return {
'nvim-telescope/telescope.nvim', tag = '0.1.4',
dependencies = { 
    'nvim-lua/plenary.nvim',
{'nvim-telescope/telescope-fzf-native.nvim', build = "make" },
    "nvim-tree/nvim-web-devicons",
},
config = function() 
local telescope = require("telescope")
    local actions = require("telescope.actions")

    telescope.setup({
    defaults = {
    path_display = { "truncate "},
    mappings = {
    i = {
    ["<C-k>"] = actions.move_selection_previous,
    ["<C-j>"] = actions.move_selection_next,
    ["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
    },
    },
    },
})

telescope.load_extension("fzf")

local keymap = vim.keymap 

keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>", {desc = "Fuzz 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" })
end,

}
neovim neovim-plugin vim-fzf telescope.nvim
1个回答
0
投票

弄清楚这一点后回答自己,以防其他 Windows 用户遇到此问题。感谢 reddit 上的 Some_Derpy_Pineapple 的帮助。

我必须导航到我的 nvim-data 文件。我的是

C:\Users\{user}\AppData\Local\nvim-data

进入该文件夹后,导航至

lazy\telescope-fzf-native.nvim\

从命令行或 powershell 在上面的目录中运行 make。我的问题是我已经有一个

build
目录,所以 make 不起作用。我删除了构建目录重新运行 make,然后我的问题就消失了。

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