Telescope nvim未显示结果。

huangapple go评论59阅读模式
英文:

Telescope nvim not displaying results

问题

以下是您要翻译的内容:

I am trying to set up telescope with nvim and ubuntu 22.04 is windows wsl (windows 10 on an older dell laptop). I installed it using packer and it seems to install just fine and I can do <leader>ff and it pops up just fine but doesn't display anything. I don't really use nvim a lot that so idk what is going on.

Telescope nvim未显示结果。

I just have the default config. So here is my packer config at .config/nvim/lua/plugins/init.lua

return require('packer').startup(function(use)
  -- Packer can manage itself
  use 'wbthomason/packer.nvim'

	use {
  'nvim-telescope/telescope.nvim', tag = '0.1.1',
	-- or                            , branch = '0.1.x',
  	requires = { {'nvim-lua/plenary.nvim'} }
	}

end)

And here is my .config/nvim/init.lua file:

require('plugins')

vim.o.number = true
vim.o.autoindent = true
vim.o.tabstop = 2
vim.o.shiftwidth = 2
vim.o.mouse = 'a'

vim.g.mapleader = ' '
-- vim.keymap.set('n', '<leader>ff', vim.cmd.Ex)


-- Enable copy and paste from clipboard
if vim.fn.has("wsl") == 1 then 
	vim.g.clipboard = {
		name = 'WslClipboard',
		copy = {
			['+'] = 'clip.exe',
			['*'] = 'clip.exe',
		},
		paste = {
			['+'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
			['*'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
		},
		cache_enabled = 0
	}
end

-- Set up Telescope keybindings
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})

这是您的全部nvim配置内容,不太清楚出了什么问题。

英文:

I am trying to set up telescope with nvim and ubuntu 22.04 is windows wsl (windows 10 on an older dell laptop). I installed it using packer and it seems to install just fine and I can do &lt;leader&gt;ff and it pops up just fine but doesn't display anything. I don't really use nvim a lot that so idk what is going on.

Telescope nvim未显示结果。

I just have the default config. So here is my packer config at .config/nvim/lua/plugins/init.lua

return require(&#39;packer&#39;).startup(function(use)
  -- Packer can manage itself
  use &#39;wbthomason/packer.nvim&#39;

	use {
  &#39;nvim-telescope/telescope.nvim&#39;, tag = &#39;0.1.1&#39;,
	-- or                            , branch = &#39;0.1.x&#39;,
  	requires = { {&#39;nvim-lua/plenary.nvim&#39;} }
	}

end)

And here is my .config/nvim/init.lua file:

require(&#39;plugins&#39;)

vim.o.number = true
vim.o.autoindent = true
vim.o.tabstop = 2
vim.o.shiftwidth = 2
vim.o.mouse = &#39;a&#39;

vim.g.mapleader = &#39; &#39;
-- vim.keymap.set(&#39;n&#39;, &#39;&lt;leader&gt;ff&#39;, vim.cmd.Ex)


-- Enable copy and paste from clipboard
if vim.fn.has(&quot;wsl&quot;) == 1 then 
	vim.g.clipboard = {
		name = &#39;WslClipboard&#39;,
		copy = {
			[&#39;+&#39;] = &#39;clip.exe&#39;,
			[&#39;*&#39;] = &#39;clip.exe&#39;,
		},
		paste = {
			[&#39;+&#39;] = &#39;powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace(&quot;`r&quot;, &quot;&quot;))&#39;,
			[&#39;*&#39;] = &#39;powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace(&quot;`r&quot;, &quot;&quot;))&#39;,
		},
		cache_enabled = 0
	}
end

-- Set up Telescope keybindings
local builtin = require(&#39;telescope.builtin&#39;)
vim.keymap.set(&#39;n&#39;, &#39;&lt;leader&gt;ff&#39;, builtin.find_files, {})
vim.keymap.set(&#39;n&#39;, &#39;&lt;leader&gt;fg&#39;, builtin.live_grep, {})
vim.keymap.set(&#39;n&#39;, &#39;&lt;leader&gt;fb&#39;, builtin.buffers, {})
vim.keymap.set(&#39;n&#39;, &#39;&lt;leader&gt;fh&#39;, builtin.help_tags, {})

This is all of the nvim configuration I have so not really sure what is going on.

答案1

得分: 2

运行 :checkhealth telescope 以了解缺少什么并安装它。

https://github.com/nvim-telescope/telescope.nvim#checkhealth

英文:

Run :checkhealth telescope to know what is missing and install it.

https://github.com/nvim-telescope/telescope.nvim#checkhealth

huangapple
  • 本文由 发表于 2023年5月15日 03:54:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/76249419.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定