Skip to content

Commit 1c15a2f

Browse files
Merge branch 'nvim-telescope:master' into master
2 parents 70d1a94 + 5255aa2 commit 1c15a2f

43 files changed

Lines changed: 762 additions & 837 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Question
4-
url: https://gitter.im/nvim-telescope/community
5-
about: Usage questions and support requests are answered in the Telescope Gitter
4+
url: https://https://github.com/nvim-telescope/telescope.nvim/discussions
5+
about: Usage questions, support requests, and general discussions
66

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
commit-message:
8+
prefix: "ci"

.github/workflows/ci.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: Tests
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
pull_request:
8+
branches:
9+
- "master"
10+
workflow_dispatch:
411

512
jobs:
613
unit_tests:
@@ -9,18 +16,18 @@ jobs:
916
strategy:
1017
fail-fast: false
1118
matrix:
12-
os: [ubuntu-22.04, macos-latest, windows-2022]
13-
rev: [nightly, v0.9.5, v0.10.0]
19+
os: [ubuntu-latest, macos-latest, windows-latest]
20+
rev: [nightly, stable, v0.10.4]
1421
include:
15-
- os: ubuntu-22.04
22+
- os: ubuntu-latest
1623
install-rg: sudo apt-get update && sudo apt-get install -y ripgrep
1724
- os: macos-latest
1825
install-rg: brew update && brew install ripgrep
19-
- os: windows-2022
26+
- os: windows-latest
2027
install-rg: choco install ripgrep
2128

2229
steps:
23-
- uses: actions/checkout@v4
30+
- uses: actions/checkout@v6
2431

2532
- uses: rhysd/action-setup-vim@v1
2633
with:

.github/workflows/docgen.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
name: Generate docs
22

33
on:
4-
push:
5-
branches-ignore:
6-
- master
7-
pull_request_target:
4+
pull_request:
85
branches:
96
- master
7+
workflow_dispatch:
108

119
jobs:
1210
build-sources:
@@ -16,13 +14,13 @@ jobs:
1614
fail-fast: false
1715
matrix:
1816
include:
19-
- os: ubuntu-22.04
17+
- os: ubuntu-latest
2018
url: https://github.com/neovim/neovim/releases/download/v0.9.5/nvim-linux64.tar.gz
2119
steps:
22-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v6
2321
- run: date +%F > todays-date
2422
- name: Restore cache for today's nightly.
25-
uses: actions/cache@v4
23+
uses: actions/cache@v5
2624
with:
2725
path: _neovim
2826
key: ${{ runner.os }}-${{ matrix.url }}-${{ hashFiles('todays-date') }}

.github/workflows/lint.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
name: Linting and style checking
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
pull_request:
8+
branches:
9+
- "master"
10+
workflow_dispatch:
411

512
jobs:
613
luacheck:
714
name: Luacheck
8-
runs-on: ubuntu-22.04
15+
runs-on: ubuntu-latest
916
steps:
10-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v6
1118

1219
- name: Prepare
1320
run: |
@@ -20,9 +27,9 @@ jobs:
2027

2128
stylua:
2229
name: stylua
23-
runs-on: ubuntu-22.04
30+
runs-on: ubuntu-latest
2431
steps:
25-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v6
2633
- uses: JohnnyMorganz/stylua-action@v4
2734
with:
2835
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ on:
33
push:
44
tags:
55
- '*'
6+
workflow_dispatch:
7+
68
jobs:
79
luarocks-upload:
8-
runs-on: ubuntu-22.04
10+
runs-on: ubuntu-latest
911
steps:
10-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v6
1113
- name: LuaRocks Upload
12-
uses: nvim-neorocks/luarocks-tag-release@v1.0.2
14+
uses: lumen-oss/luarocks-tag-release@v7
1315
env:
1416
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
1517
with:

README.md

Lines changed: 28 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
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

65
Gaze deeply into unknown regions using the power of the moon.
@@ -42,10 +41,10 @@ Telescope Wiki</sub>
4241

4342
This 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
4645
latest 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)
6261
or
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).
6463
For more information and a performance benchmark take a look at the
6564
[Extensions](https://github.com/nvim-telescope/telescope.nvim/wiki/Extensions)
6665
wiki.
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

13091
Make sure you call `:checkhealth telescope` after installing telescope to ensure
13192
everything is set up correctly.
@@ -138,24 +99,6 @@ to get an understanding of how to use Telescope and how to configure it.
13899
Try the command `:Telescope find_files`
139100
to 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
160103
local builtin = require('telescope.builtin')
161104
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
@@ -299,12 +242,6 @@ explained in `:help telescope.defaults.mappings`.
299242

300243
Built-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

407344
We need to do it manually because we can't determine the filetype in the
408345
traditional 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
410347
previewer would slow down considerably.
411348

412349
If 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`.
467404
As an example, if we wanted to specify the layout strategy and width,
468405
but 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

474411
If 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`.
540477
All `telescope.nvim` functions are wrapped in `vim` commands for easy access,
541478
tab 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.
603540
Pickers from extensions are added to the `:Telescope` command under their
604541
respective 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

611548
They 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)

autoload/health/telescope.vim

Lines changed: 0 additions & 3 deletions
This file was deleted.

developers.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,8 @@ directory which contains all of the builtin pickers. Another way to find more ex
274274
is to take a look at the [extension wiki page](https://github.com/nvim-telescope/telescope.nvim/wiki/Extensions)
275275
as this provides many extensions people have already written which use these concepts.
276276

277-
If you still have any questions after reading this guide please feel free to ask us for
278-
more information on [gitter](https://gitter.im/nvim-telescope/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
279-
and we will happily answer your questions and hopefully allow us to improve this guide. You can also
280-
help us to improve this guide by sending a PR.
277+
If you still have any questions after reading this guide please open a
278+
[Discussion](https://github.com/nvim-telescope/telescope.nvim/discussions).
281279

282280
### Bundling as extension
283281

doc/telescope.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,10 @@ builtin.fd() *telescope.builtin.fd()*
959959

960960
builtin.treesitter() *telescope.builtin.treesitter()*
961961
Lists function names, variables, and other symbols from treesitter queries
962+
Requires parser and `locals` queries for the current buffer in
963+
`runtimepath`, see |vim.treesitter-parsers|, |vim.treesitter.query|, and
964+
https://github.com/nvim-treesitter/nvim-treesitter/blob/main/CONTRIBUTING.md#locals
965+
962966
- Default keymaps:
963967
- `<C-l>`: show autocompletion menu to prefilter your query by kind of ts
964968
node you want to see (i.e. `:var:`)
@@ -2188,7 +2192,7 @@ All layout strategies are functions with the following signature:
21882192
function(picker, columns, lines, layout_config)
21892193
-- Do some calculations here...
21902194
return {
2191-
preview = preview_configuration
2195+
preview = preview_configuration,
21922196
results = results_configuration,
21932197
prompt = prompt_configuration,
21942198
}

0 commit comments

Comments
 (0)