Dim*_*owo 3 lua neovim ripgrep telescope.nvim
我正在尝试在 MacOS 13.2.1 上使用 nvim 设置望远镜。我是用打包机安装的。我已经安装了望远镜所需的所有依赖项。并且仍然无法显示find_files或live_grep搜索任何结果。
这是我在望远镜打包机中的配置
\nuse({ "nvim-telescope/telescope.nvim", branch = "0.1.x", \n requires = { { "nvim-lua/plenary.nvim" } } \n}) \nRun Code Online (Sandbox Code Playgroud)\n这是我的望远镜配置
\n-- import telescope plugin safely\nlocal telescope_setup, telescope = pcall(require, "telescope")\nif not telescope_setup then\n return\nend\n\n-- import telescope actions safely\nlocal actions_setup, actions = pcall(require, "telescope.actions")\nif not actions_setup then\n return\nend\n\n-- configure telescope\ntelescope.setup({\n -- configure custom mappings\n defaults = {\n layout_config = {\n width = 0.75,\n prompt_position = "top",\n preview_cutoff = 120,\n horizontal = { mirror = false },\n vertical = { mirror = false },\n },\n\n find_command = {\n "rg",\n "--no-heading",\n "--with-filename",\n "--line-number",\n "--column",\n "--smart-case",\n },\n\n prompt_prefix = "\xef\x91\xab ",\n selection_caret = "\xef\x81\xa4 ",\n path_display = { "smart" },\n\n initial_mode = "insert",\n selection_strategy = "reset",\n sorting_strategy = "descending",\n layout_strategy = "horizontal",\n file_sorter = require("telescope.sorters").get_fuzzy_file,\n file_ignore_patterns = {},\n generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,\n\n winblend = 0,\n border = {},\n borderchars = { "\xe2\x94\x80", "\xe2\x94\x82", "\xe2\x94\x80", "\xe2\x94\x82", "\xe2\x95\xad", "\xe2\x95\xae", "\xe2\x95\xaf", "\xe2\x95\xb0" },\n color_devicons = true,\n use_less = true,\n set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil,\n file_previewer = require("telescope.previewers").vim_buffer_cat.new,\n grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new,\n qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new,\n buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker,\n\n mappings = {\n i = {\n ["<C-j>"] = actions.move_selection_next, -- move to next result\n ["<C-k>"] = actions.move_selection_previous, -- move to prev result\n ["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist, -- send selected to quickfixlist\n ["<esc>"] = actions.close,\n ["<CR>"] = actions.select_default + actions.center,\n },\n n = {\n ["<C-j>"] = actions.move_selection_next,\n ["<C-k>"] = actions.move_selection_previous,\n ["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,\n },\n },\n },\n})\nRun Code Online (Sandbox Code Playgroud)\n在这里我的:checkhealth telescope
telescope: require("telescope.health").check()\n\nChecking for required plugins ~\n- OK plenary installed.\n- OK nvim-treesitter installed.\n\nChecking external dependencies ~\n- OK rg: found ripgrep 13.0.0\n- OK fd: found fd 8.7.0\n\n===== Installed extensions ===== ~\nRun Code Online (Sandbox Code Playgroud)\n这是所有的 nvim 配置,我不知道我缺少什么,感谢您的帮助,提前感谢。
\n我尝试重新安装 ripgrep,但仍然没有显示任何结果
\n小智 6
建议的依赖项:“BurntSushi/ripgrep”是 live_grep 和 grep_string 所必需的,并且是 find_files 的首要任务。
将依赖项“BurntSushi/ripgrep”添加到打包文件并下载“ripgrep”,如下所示:
sudo apt install ripgrep
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3918 次 |
| 最近记录: |