Skip to content

Commit

Permalink
Merge branch 'nvim-telescope:master' into jump_type_function_for_lsp
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackmorse authored Oct 15, 2024
2 parents 32d08ab + df534c3 commit e3e8d42
Show file tree
Hide file tree
Showing 28 changed files with 855 additions and 358 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github: [tjdevries, Conni2461, fdschmidt93]
github: [tjdevries, Conni2461, fdschmidt93, jamestrew]
81 changes: 41 additions & 40 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,45 +75,46 @@ body:
required: true
- type: textarea
attributes:
label: "Minimal config"
description: "Minimal(!) configuration necessary to reproduce the issue. Save this as `minimal.lua`. If _absolutely_ necessary, add plugins and config options from your `init.lua` at the indicated lines."
render: Lua
value: |
vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]
local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/start/packer.nvim'
local function load_plugins()
require('packer').startup {
{
'wbthomason/packer.nvim',
{
'nvim-telescope/telescope.nvim',
requires = {
'nvim-lua/plenary.nvim',
{ 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' },
},
},
-- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
},
config = {
package_root = package_root,
compile_path = install_path .. '/plugin/packer_compiled.lua',
display = { non_interactive = true },
},
}
end
_G.load_config = function()
require('telescope').setup()
require('telescope').load_extension('fzf')
-- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
end
if vim.fn.isdirectory(install_path) == 0 then
print("Installing Telescope and dependencies.")
vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path }
end
load_plugins()
require('packer').sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]
label: "Minimal config"
description: "Minimal(!) configuration necessary to reproduce the issue. Save this as `minimal.lua` and run with `nvim -nu minimal.lua`. If _absolutely_ necessary, add plugins and config options from your `init.lua` at the indicated lines."
render: Lua
value: |
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs { "config", "data", "state", "cache" } do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
vim.fn.system {
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
lazypath,
}
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
{
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
-- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
require("telescope").setup {}
end,
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
validations:
required: true
2 changes: 1 addition & 1 deletion .github/workflows/docgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches-ignore:
- master
pull_request:
pull_request_target:
branches:
- master

Expand Down
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,23 @@ Using [vim-plug](https://github.com/junegunn/vim-plug)

```viml
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.6' }
Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.8' }
" or , { 'branch': '0.1.x' }
```

Using [dein](https://github.com/Shougo/dein.vim)

```viml
call dein#add('nvim-lua/plenary.nvim')
call dein#add('nvim-telescope/telescope.nvim', { 'rev': '0.1.6' })
call dein#add('nvim-telescope/telescope.nvim', { 'rev': '0.1.8' })
" or , { 'rev': '0.1.x' })
```

Using [packer.nvim](https://github.com/wbthomason/packer.nvim)

```lua
use {
'nvim-telescope/telescope.nvim', tag = '0.1.6',
'nvim-telescope/telescope.nvim', tag = '0.1.8',
-- or , branch = '0.1.x',
requires = { {'nvim-lua/plenary.nvim'} }
}
Expand All @@ -112,14 +112,14 @@ Using [lazy.nvim](https://github.com/folke/lazy.nvim)
```lua
-- init.lua:
{
'nvim-telescope/telescope.nvim', tag = '0.1.6',
'nvim-telescope/telescope.nvim', tag = '0.1.8',
-- or , branch = '0.1.x',
dependencies = { 'nvim-lua/plenary.nvim' }
}

-- plugins/telescope.lua:
return {
'nvim-telescope/telescope.nvim', tag = '0.1.6',
'nvim-telescope/telescope.nvim', tag = '0.1.8',
-- or , branch = '0.1.x',
dependencies = { 'nvim-lua/plenary.nvim' }
}
Expand Down Expand Up @@ -158,10 +158,10 @@ Using Lua:

```lua
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, {})
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
```

See [builtin pickers](#pickers) for a list of all builtin functions.
Expand Down Expand Up @@ -263,6 +263,9 @@ Many familiar mapping patterns are set up as defaults.
| `<C-q>` | Send all items not filtered to quickfixlist (qflist) |
| `<M-q>` | Send all selected items to qflist |
| `<C-r><C-w>` | Insert cword in original window into prompt (insert mode) |
| `<C-r><C-a>` | Insert cWORD in original window into prompt (insert mode) |
| `<C-r><C-f>` | Insert cfile in original window into prompt (insert mode) |
| `<C-r><C-l>` | Insert cline in original window into prompt (insert mode) |

To see the full list of mappings, check out `lua/telescope/mappings.lua` and the
`default_mappings` table.
Expand Down
2 changes: 1 addition & 1 deletion developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ more interesting. We will end up with the following new code for `finders.new_ta
```

With the new snippet, we no longer have an array of strings but an array of
tables. Each table has a color, name, and the color's hex value.
tables. Each table has a color name and the color's hex value.

`entry_maker` is a function that will receive each table and then we can set the
values we need. It's best practice to have a `value` reference to the
Expand Down
66 changes: 59 additions & 7 deletions doc/telescope.txt
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,8 @@ builtin.find_files({opts}) *telescope.builtin.find_files()*
`find_command`
{follow} (boolean) if true, follows symlinks
(i.e. uses `-L` flag for the
`find` command)
`find` command) (default:
false)
{hidden} (boolean) determines whether to show
hidden files or not (default:
false)
Expand Down Expand Up @@ -970,6 +971,8 @@ builtin.treesitter() *telescope.builtin.treesitter()*
{bufnr} (number) specify the buffer number where
treesitter should run. (default:
current buffer)
{symbol_width} (number) defines the width of the symbol
section (default: 25)
{symbols} (string|table) filter results by symbol kind(s)
{ignore_symbols} (string|table) list of symbols to ignore
{symbol_highlights} (table) string -> string. Matches symbol
Expand Down Expand Up @@ -1009,6 +1012,8 @@ builtin.tags({opts}) *telescope.builtin.tags()*
{show_line} (boolean) if true, shows the content of the line the
tag is found on in the picker (default:
true)
{show_kind} (boolean) if true and kind info is available, show
the kind of the tag (default: true)
{only_sort_tags} (boolean) if true we will only sort tags (default:
false)
{fname_width} (number) defines the width of the filename section
Expand All @@ -1030,6 +1035,8 @@ builtin.current_buffer_tags({opts}) *telescope.builtin.current_buffer_tags()*
{show_line} (boolean) if true, shows the content of the line the
tag is found on in the picker (default:
true)
{show_kind} (boolean) if true and kind info is available, show
the kind of the tag (default: true)
{only_sort_tags} (boolean) if true we will only sort tags (default:
false)
{fname_width} (number) defines the width of the filename section
Expand Down Expand Up @@ -1432,6 +1439,8 @@ builtin.reloader({opts}) *telescope.builtin.reloader()*
builtin.buffers({opts}) *telescope.builtin.buffers()*
Lists open buffers in current neovim instance, opens selected buffer on
`<cr>`
- Default keymaps:
- `<M-d>`: delete the currently selected buffer


Parameters: ~
Expand Down Expand Up @@ -1476,10 +1485,12 @@ builtin.colorscheme({opts}) *telescope.builtin.colorscheme()*
{opts} (table) options to pass to the picker

Options: ~
{colors} (table) a list of additional colorschemes to
explicitly make available to telescope
(default: {})
{enable_preview} (boolean) if true, will preview the selected color
{colors} (table) a list of additional colorschemes to
explicitly make available to telescope
(default: {})
{enable_preview} (boolean) if true, will preview the selected color
{ignore_builtins} (boolean) if true, builtin colorschemes are not
listed


builtin.marks({opts}) *telescope.builtin.marks()*
Expand Down Expand Up @@ -1607,6 +1618,8 @@ builtin.lsp_references({opts}) *telescope.builtin.lsp_references()*
jump
{show_line} (boolean) show results text (default: true)
{trim_text} (boolean) trim results text (default: false)
{reuse_win} (boolean) jump to existing window if buffer is
already opened (default: false)
{file_encoding} (string) file encoding for the previewer


Expand Down Expand Up @@ -2230,6 +2243,9 @@ layout_strategies.horizontal() *telescope.layout.horizontal()*
- anchor:
- Which edge/corner to pin the picker to
- See |resolver.resolve_anchor_pos()|
- anchor_padding:
- Specifies an amount of additional padding around the anchor
- Values should be a positive integer
- height:
- How tall to make Telescope's entire layout
- See |resolver.resolve_height()|
Expand Down Expand Up @@ -2283,6 +2299,9 @@ layout_strategies.center() *telescope.layout.center()*
- anchor:
- Which edge/corner to pin the picker to
- See |resolver.resolve_anchor_pos()|
- anchor_padding:
- Specifies an amount of additional padding around the anchor
- Values should be a positive integer
- height:
- How tall to make Telescope's entire layout
- See |resolver.resolve_height()|
Expand Down Expand Up @@ -2361,6 +2380,9 @@ layout_strategies.vertical() *telescope.layout.vertical()*
- anchor:
- Which edge/corner to pin the picker to
- See |resolver.resolve_anchor_pos()|
- anchor_padding:
- Specifies an amount of additional padding around the anchor
- Values should be a positive integer
- height:
- How tall to make Telescope's entire layout
- See |resolver.resolve_height()|
Expand Down Expand Up @@ -2391,6 +2413,9 @@ layout_strategies.flex() *telescope.layout.flex()*
- anchor:
- Which edge/corner to pin the picker to
- See |resolver.resolve_anchor_pos()|
- anchor_padding:
- Specifies an amount of additional padding around the anchor
- Values should be a positive integer
- height:
- How tall to make Telescope's entire layout
- See |resolver.resolve_height()|
Expand Down Expand Up @@ -3399,6 +3424,30 @@ actions.insert_original_cword({prompt_bufnr}) *telescope.actions.insert_original
{prompt_bufnr} (number) The prompt bufnr


actions.insert_original_cWORD({prompt_bufnr}) *telescope.actions.insert_original_cWORD()*
Insert the WORD under the cursor of the original (pre-Telescope) window


Parameters: ~
{prompt_bufnr} (number) The prompt bufnr


actions.insert_original_cfile({prompt_bufnr}) *telescope.actions.insert_original_cfile()*
Insert the file under the cursor of the original (pre-Telescope) window


Parameters: ~
{prompt_bufnr} (number) The prompt bufnr


actions.insert_original_cline({prompt_bufnr}) *telescope.actions.insert_original_cline()*
Insert the line under the cursor of the original (pre-Telescope) window


Parameters: ~
{prompt_bufnr} (number) The prompt bufnr



================================================================================
ACTIONS_STATE *telescope.actions.state*
Expand Down Expand Up @@ -3818,13 +3867,16 @@ previewers.new_termopen_previewer() *telescope.previewers.new_termopen_previewer
- `title` a static title for example "File Preview"
- `dyn_title(self, entry)` a dynamic title function which gets called when
config value `dynamic_preview_title = true`
- `env` table: define environment variables to forward to the terminal
process. Example:
- `{ ['PAGER'] = '', ['MANWIDTH'] = 50 }`

It's an easy way to get your first previewer going and it integrates well
with `bat` and `less`. Providing out of the box scrolling if the command
uses less.

Furthermore, it will forward all `config.set_env` environment variables to
that terminal process.
Furthermore, if `env` is not set, it will forward all `config.set_env`
environment variables to that terminal process.



Expand Down
Loading

0 comments on commit e3e8d42

Please sign in to comment.