11# telescope.nvim
22
3- [ ![ Gitter] ( https://badges.gitter.im/nvim-telescope/community.svg )] ( https://gitter.im/nvim-telescope/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge )
43[ ![ LuaRocks] ( https://img.shields.io/luarocks/v/Conni2461/telescope.nvim?logo=lua&color=purple )] ( https://luarocks.org/modules/Conni2461/telescope.nvim )
54
65Gaze deeply into unknown regions using the power of the moon.
@@ -42,10 +41,10 @@ Telescope Wiki</sub>
4241
4342This section should guide you to run your first builtin pickers.
4443
45- [ Neovim (v0.9.0 )] ( https://github.com/neovim/neovim/releases/tag/v0.9.0 ) or the
44+ [ Neovim (> v0.10.4 )] ( https://github.com/neovim/neovim/releases/tag/v0.10.4 ) or the
4645latest neovim nightly commit is required for ` telescope.nvim ` to work.
47- The neovim version also needs to be compiled with LuaJIT, we currently do not
48- support Lua5.1 because of some ongoing issues .
46+ The neovim version also needs to be compiled with LuaJIT; PUC Lua is not fully supported,
47+ both for performance reasons and because extensions may rely on FFI .
4948
5049### Required dependencies
5150
@@ -56,76 +55,38 @@ support Lua5.1 because of some ongoing issues.
5655- [ BurntSushi/ripgrep] ( https://github.com/BurntSushi/ripgrep ) is required for
5756 ` live_grep ` and ` grep_string ` and is the first priority for ` find_files ` .
5857
59- We also suggest you install one native telescope sorter to significantly improve
60- sorting performance. Take a look at either
61- [ telescope-fzf-native.nvim] ( https://github.com/nvim-telescope/telescope-fzf-native.nvim )
58+ We also strongly suggest installing a native telescope sorter to significantly improve
59+ sorting performance:
60+ * [ telescope-fzf-native.nvim] ( https://github.com/nvim-telescope/telescope-fzf-native.nvim )
6261or
63- [ telescope-fzy-native.nvim] ( https://github.com/nvim-telescope/telescope-fzy-native.nvim ) .
62+ * [ telescope-fzy-native.nvim] ( https://github.com/nvim-telescope/telescope-fzy-native.nvim ) .
6463For more information and a performance benchmark take a look at the
6564[ Extensions] ( https://github.com/nvim-telescope/telescope.nvim/wiki/Extensions )
6665wiki.
6766
6867### Optional dependencies
6968
7069- [ sharkdp/fd] ( https://github.com/sharkdp/fd ) (finder)
71- - [ nvim-treesitter/nvim-treesitter] ( https://github.com/nvim-treesitter/nvim-treesitter ) (finder/preview)
72- - [ neovim LSP] ( https://neovim.io/doc/user/lsp.html ) (picker)
7370- [ devicons] ( https://github.com/nvim-tree/nvim-web-devicons ) (icons)
7471
7572### Installation
7673
77- It is suggested to either use the latest release
78- [ tag] ( https://github.com/nvim-telescope/telescope.nvim/tags ) or our release
79- branch (which will get consistent updates)
80- [ 0.1.x] ( https://github.com/nvim-telescope/telescope.nvim/tree/0.1.x ) .
81-
82- It is not suggested to run latest master.
83-
84- Using [ vim-plug] ( https://github.com/junegunn/vim-plug )
85-
86- ``` viml
87- Plug 'nvim-lua/plenary.nvim'
88- Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.8' }
89- " or , { 'branch': '0.1.x' }
90- ```
91-
92- Using [ dein] ( https://github.com/Shougo/dein.vim )
93-
94- ``` viml
95- call dein#add('nvim-lua/plenary.nvim')
96- call dein#add('nvim-telescope/telescope.nvim', { 'rev': '0.1.8' })
97- " or , { 'rev': '0.1.x' })
98- ```
99-
100- Using [ packer.nvim] ( https://github.com/wbthomason/packer.nvim )
74+ We recommend pinning to the latest release
75+ [ tag] ( https://github.com/nvim-telescope/telescope.nvim/tags ) ,
76+ e.g. using [ lazy.nvim] ( https://github.com/folke/lazy.nvim )
10177
10278``` lua
103- use {
104- ' nvim-telescope/telescope.nvim' , tag = ' 0.1.8' ,
105- -- or , branch = '0.1.x',
106- requires = { {' nvim-lua/plenary.nvim' } }
107- }
108- ```
109-
110- Using [ lazy.nvim] ( https://github.com/folke/lazy.nvim )
111-
112- ``` lua
113- -- init.lua:
114- {
115- ' nvim-telescope/telescope.nvim' , tag = ' 0.1.8' ,
116- -- or , branch = '0.1.x',
117- dependencies = { ' nvim-lua/plenary.nvim' }
118- }
119-
120- -- plugins/telescope.lua:
121- return {
122- ' nvim-telescope/telescope.nvim' , tag = ' 0.1.8' ,
123- -- or , branch = '0.1.x',
124- dependencies = { ' nvim-lua/plenary.nvim' }
79+ {
80+ ' nvim-telescope/telescope.nvim' , version = ' *' ,
81+ dependencies = {
82+ ' nvim-lua/plenary.nvim' ,
83+ -- optional but recommended
84+ { ' nvim-telescope/telescope-fzf-native.nvim' , build = ' make' },
12585 }
86+ }
12687```
12788
128- ### checkhealth
89+ ### Checkhealth
12990
13091Make sure you call ` :checkhealth telescope ` after installing telescope to ensure
13192everything is set up correctly.
@@ -138,24 +99,6 @@ to get an understanding of how to use Telescope and how to configure it.
13899Try the command ` :Telescope find_files `
139100to see if ` telescope.nvim ` is installed correctly.
140101
141- Using VimL:
142-
143- ``` viml
144- " Find files using Telescope command-line sugar.
145- nnoremap <leader>ff <cmd>Telescope find_files<cr>
146- nnoremap <leader>fg <cmd>Telescope live_grep<cr>
147- nnoremap <leader>fb <cmd>Telescope buffers<cr>
148- nnoremap <leader>fh <cmd>Telescope help_tags<cr>
149-
150- " Using Lua functions
151- nnoremap <leader>ff <cmd>lua require('telescope.builtin').find_files()<cr>
152- nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr>
153- nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr>
154- nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
155- ```
156-
157- Using Lua:
158-
159102``` lua
160103local builtin = require (' telescope.builtin' )
161104vim .keymap .set (' n' , ' <leader>ff' , builtin .find_files , { desc = ' Telescope find files' })
@@ -299,12 +242,6 @@ explained in `:help telescope.defaults.mappings`.
299242
300243Built-in functions. Ready to be bound to any key you like.
301244
302- ``` vim
303- :lua require'telescope.builtin'.planets{}
304-
305- :nnoremap <Leader>pp :lua require'telescope.builtin'.planets{}
306- ```
307-
308245### File Pickers
309246
310247| Functions | Description |
@@ -374,7 +311,7 @@ Built-in functions. Ready to be bound to any key you like.
374311
375312| Functions | Description |
376313| -------------------- | ------------------------------------------------- |
377- | ` builtin.treesitter ` | Lists Function names, variables, from Treesitter! |
314+ | ` builtin.treesitter ` | Lists Function names, variables, ... using treesitter [ ` locals ` queries ] ( https://github.com/nvim-treesitter/nvim-treesitter/blob/main/CONTRIBUTING.md#locals ) |
378315
379316### Lists Picker
380317
@@ -406,7 +343,7 @@ filetype detection you should read `:help vim.filetype`.
406343
407344We need to do it manually because we can't determine the filetype in the
408345traditional way: We don't do ` bufload ` and instead read the file asynchronously
409- with ` vim.loop .fs_ ` and attach only a highlighter; otherwise the speed of the
346+ with ` vim.uv .fs_ ` and attach only a highlighter; otherwise the speed of the
410347previewer would slow down considerably.
411348
412349If you want to configure the ` vim_buffer_ ` previewer (e.g. you want the line to wrap), do this:
@@ -467,8 +404,8 @@ For more details on resolving sizes, see `:help telescope.resolve`.
467404As an example, if we wanted to specify the layout strategy and width,
468405but only for this instance, we could do something like:
469406
470- ```
471- :lua require('telescope.builtin').find_files({layout_strategy='vertical',layout_config={width=0.5}})
407+ ``` lua
408+ require (' telescope.builtin' ).find_files ({layout_strategy = ' vertical' ,layout_config = {width = 0.5 }})
472409```
473410
474411If we wanted to change the width for every time we use the ` vertical `
@@ -540,7 +477,7 @@ a theme, check out `lua/telescope/themes.lua`.
540477All ` telescope.nvim ` functions are wrapped in ` vim ` commands for easy access,
541478tab completions and setting options.
542479
543- ``` viml
480+ ``` vim
544481" Show all builtin pickers
545482:Telescope
546483
@@ -603,9 +540,9 @@ tab completions will not be available right away.
603540Pickers from extensions are added to the ` :Telescope ` command under their
604541respective name. For example:
605542
606- ``` viml
543+ ``` vim
607544" Run the `configurations` picker from nvim-dap
608- : Telescope dap configurations
545+ Telescope dap configurations
609546```
610547
611548They can also be called directly from Lua:
@@ -635,6 +572,9 @@ Please read [CONTRIBUTING.md](./CONTRIBUTING.md)
635572
636573## Related Projects
637574
575+ - [ snacks.picker] ( https://github.com/folke/snacks.nvim/blob/main/docs/picker.md )
576+ - [ mini.pick] ( https://github.com/nvim-mini/mini.pick )
577+ - [ fzf-lua] ( https://github.com/ibhagwan/fzf-lua )
638578- [ fzf.vim] ( https://github.com/junegunn/fzf.vim )
639579- [ denite.nvim] ( https://github.com/Shougo/denite.nvim )
640580- [ vim-clap] ( https://github.com/liuchengxu/vim-clap )
0 commit comments