Something went wrong. Try again.
Library of 45+ independent Lua modules improving Neovim experience with minimal effort nvim-mini.org/mini.nvim
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856*mini.extra* Extra mini.nvim functionality
MIT License Copyright (c) 2023 Evgeni Chasnovski
------------------------------------------------------------------------------ *MiniExtra*Extra useful functionality which is not essential enough for other |mini.nvim|modules to include directly.
Features:
- Various pickers for |mini.pick|: - Built-in diagnostic (|MiniExtra.pickers.diagnostic()|). - File explorer (|MiniExtra.pickers.explorer()|). - Git branches/commits/files/hunks (|MiniExtra.pickers.git_hunks()|, etc.). - Command/search/input history (|MiniExtra.pickers.history()|). - LSP references/symbols/etc. (|MiniExtra.pickers.lsp()|). - Tree-sitter nodes (|MiniExtra.pickers.treesitter()|). - And much more. See |MiniExtra.pickers| for more.
- Various textobject specifications for |mini.ai|. See |MiniExtra.gen_ai_spec|.
- Various highlighters for |mini.hipatterns|. See |MiniExtra.gen_highlighter|.
Notes:- This module requires only those |mini.nvim| modules which are needed for a particular functionality: |mini.pick| for pickers, etc.
# Setup ~
This module needs a setup with `require('mini.extra').setup({})` (replace`{}` with your `config` table). It will create global Lua table `MiniExtra`which you can use for scripting or manually (with `:lua MiniExtra.*`).
See |MiniExtra.config| for `config` structure and default values.
This module doesn't have runtime options, so using `vim.b.miniextra_config`will have no effect here.
# Comparisons ~
- [nvim-telescope/telescope.nvim](https://github.com/nvim-telescope/telescope.nvim): - With |MiniExtra.pickers|, |mini.pick| is reasonably on par when it comes to built-in pickers.
- [ibhagwan/fzf-lua](https://github.com/ibhagwan/fzf-lua): - Same as `nvim-telescope/telescope.nvim`.
------------------------------------------------------------------------------ *MiniExtra.setup()* `MiniExtra.setup`({config})Module setup
Parameters ~{config} `(table|nil)` Module config table. See |MiniExtra.config|.
Usage ~>lua require('mini.extra').setup() -- use default config -- OR require('mini.extra').setup({}) -- replace {} with your config table<------------------------------------------------------------------------------ *MiniExtra.config* `MiniExtra.config`Defaults ~>lua MiniExtra.config = {}<------------------------------------------------------------------------------ *MiniExtra.gen_ai_spec* `MiniExtra.gen_ai_spec`|mini.ai| textobject specification generators
This is a table with function elements. Call to actually get specification.
Assumed to be used as part of |MiniAi.setup()|. Example: >lua
local gen_ai_spec = require('mini.extra').gen_ai_spec require('mini.ai').setup({ custom_textobjects = { B = gen_ai_spec.buffer(), D = gen_ai_spec.diagnostic(), I = gen_ai_spec.indent(), L = gen_ai_spec.line(), N = gen_ai_spec.number(), }, })<------------------------------------------------------------------------------ *MiniExtra.gen_ai_spec.buffer()* `MiniExtra.gen_ai_spec.buffer`()Current buffer textobject
Notes:- `a` textobject selects all lines in a buffer.- `i` textobject selects all lines except blank lines at start and end.
Return ~`(function)` Function implementing |MiniAi-textobject-specification|.
------------------------------------------------------------------------------ *MiniExtra.gen_ai_spec.diagnostic()* `MiniExtra.gen_ai_spec.diagnostic`({severity})Current buffer diagnostic textobject
Notes:- Both `a` and `i` textobjects return |vim.diagnostic.get()| output for the current buffer. It is modified to fit |MiniAi-textobject-specification|.
Parameters ~{severity} `(any)` Which severity to use. Forwarded to |vim.diagnostic.get()|. Default: `nil` to use all diagnostic entries.
Return ~`(function)` Function implementing |MiniAi-textobject-specification|.
------------------------------------------------------------------------------ *MiniExtra.gen_ai_spec.indent()* `MiniExtra.gen_ai_spec.indent`()Current buffer indent scopes textobject
Indent scope is a set of consecutive lines with the following properties:- Lines above first and below last are non-blank. They are called borders.- There is at least one non-blank line in a set.- All non-blank lines between borders have strictly greater indent (perceived leading space respecting |'tabstop'|) than either of borders.
Notes:- `a` textobject selects scope including borders.- `i` textobject selects the scope charwise.- Differences with |MiniIndentscope.textobject()|: - This textobject always treats blank lines on top and bottom of `i` textobject as part of it, while |mini.indentscope| can configure that. - This textobject can select non-covering scopes, while |mini.indentscope| can not (by design). - In this textobject scope computation is done only by "casting rays" from top to bottom and not in both ways as in |mini.indentscope|. This works in most common scenarios and doesn't work only if indent of of the bottom border is expected to be larger than the top.
Return ~`(function)` Function implementing |MiniAi-textobject-specification|. It returns array of regions representing all indent scopes in the buffer ordered increasingly by the start line.
------------------------------------------------------------------------------ *MiniExtra.gen_ai_spec.line()* `MiniExtra.gen_ai_spec.line`()Current line textobject
Notes:- `a` textobject selects whole line.- `i` textobject selects line after initial indent.
Return ~`(function)` Function implementing |MiniAi-textobject-specification|.
------------------------------------------------------------------------------ *MiniExtra.gen_ai_spec.number()* `MiniExtra.gen_ai_spec.number`()Number textobject
Notes:- `a` textobject selects a whole number possibly preceded with "-" and possibly followed by decimal part (dot and digits).- `i` textobject selects consecutive digits.
Return ~`(function)` Function implementing |MiniAi-textobject-specification|.
------------------------------------------------------------------------------ *MiniExtra.gen_highlighter* `MiniExtra.gen_highlighter`|mini.hipatterns| highlighter generators
This is a table with function elements. Call to actually get specification.
Assumed to be used as part of |MiniHipatterns.setup()|. Example: >lua
local hi_words = require('mini.extra').gen_highlighter.words require('mini.hipatterns').setup({ highlighters = { todo = hi_words({ 'TODO', 'Todo', 'todo' }, 'MiniHipatternsTodo'), }, })<------------------------------------------------------------------------------ *MiniExtra.gen_highlighter.words()* `MiniExtra.gen_highlighter.words`({words}, {group}, {extmark_opts})Highlight words
Notes:- Words should start and end with alphanumeric symbol (latin letter or digit).- Words will be highlighted only in full and not if part bigger word, i.e. there should not be alphanumeric symbol before and after it.
Parameters ~{words} `(table)` Array of words to highlight. Will be matched as is, not as Lua pattern.{group} `(string|function)` Proper `group` field for `highlighter`. See |MiniHipatterns.config|.{extmark_opts} `(any)` Proper `extmark_opts` field for `highlighter`. See |MiniHipatterns.config|.
------------------------------------------------------------------------------ *MiniExtra.pickers* `MiniExtra.pickers`|mini.pick| pickers
A table with |mini.pick| pickers (which is a hard dependency).Notes:- All have the same signature: - <local_opts> - optional table with options local to picker. - <opts> - optional table with options forwarded to |MiniPick.start()|.- All of them are automatically registered in |MiniPick.registry| inside both |MiniExtra.setup()| or |MiniPick.setup()| (only one is enough).- All use default versions of |MiniPick-source.preview|, |MiniPick-source.choose|, and |MiniPick-source.choose_marked| if not stated otherwise. Shown text and |MiniPick-source.show| are targeted to the picked items.
Examples of usage:- As Lua code: `MiniExtra.pickers.buf_lines()`.- With |:Pick| command: `:Pick buf_lines scope='current'` Note: this requires calling |MiniExtra.setup()|.
------------------------------------------------------------------------------ *MiniExtra.pickers.buf_lines()* `MiniExtra.pickers.buf_lines`({local_opts}, {opts})Buffer lines picker
Pick from buffer lines. Notes:- Loads all target buffers which are currently unloaded.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <scope> `(string)` - one of "all" (normal listed buffers) or "current". Default: "all". - <preserve_order> `(boolean)` - whether to preserve original order during query. Default: `false`.{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.colorschemes()* `MiniExtra.pickers.colorschemes`({local_opts}, {opts})Color scheme picker
Pick and apply color scheme. Preview temporarily applies item's color schemeand shows how selected highlight groups look.Canceling reverts to color scheme before picker start:- With |MiniColors-colorscheme:apply()| if |mini.colors| was available.- With |:colorscheme| if |g:colors_name| was available.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <names> `(table)` - array of color scheme names to pick from. Default: all available color schemes. - <preview_hl_groups> `(table)` - array of highlight groups to show in preview window. Default: all defined highlight groups in alphabetical order.
{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.commands()* `MiniExtra.pickers.commands`({local_opts}, {opts})Neovim commands picker
Pick from Neovim built-in (|Ex-command|) and |user-commands|.Notes:- Preview shows information about the command (if available).- Choosing either executes command (if reliably known that it doesn't need arguments) or populates Command line with the command.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Not used at the moment.{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.diagnostic()* `MiniExtra.pickers.diagnostic`({local_opts}, {opts})Built-in diagnostic picker
Pick from |vim.diagnostic| using |vim.diagnostic.get()|.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <get_opts> `(table)` - options for |vim.diagnostic.get()|. Can be used to limit severity or namespace. Default: `{}`. - <scope> `(string)` - one of "all" (available) or "current" (buffer). Default: "all". - <sort_by> `(string)` - sort priority. One of "severity", "path", "none". Default: "severity".{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.explorer()* `MiniExtra.pickers.explorer`({local_opts}, {opts})File explorer picker
Explore file system and open file.Notes:- Choosing a directory navigates inside it, changing picker's items and current working directory.- Query and preview work as usual (not only `move_next`/`move_prev` can be used).- Preview works for any item.
Examples:
- `MiniExtra.pickers.explorer()`- `:Pick explorer cwd='..'` - open explorer in parent directory.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <cwd> `(string)` - initial directory to explore. Should be a valid directory path. Default: `nil` for |current-directory|. - <filter> `(function)` - callable predicate to filter items to show. Will be called for every item and should return `true` if it should be shown. Each item is a table with the following fields: - <fs_type> `(string)` - path type. One of "directory" or "file". - <path> `(string)` - item path. - <text> `(string)` - shown text (path's basename). - <sort> `(function)` - callable item sorter. Will be called with array of items (each element with structure as described above) and should return sorted array of items.{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.git_branches()* `MiniExtra.pickers.git_branches`({local_opts}, {opts})Git branches picker
Pick from Git branches using `git branch`.Notes:- Requires executable `git`.- Requires target path to be part of git repository.- Present for exploration and navigation purposes. Doing any Git operations is suggested to be done in a dedicated Git client and is not planned.- On choose opens scratch buffer with branch's history.
Examples:
- `MiniExtra.pickers.git_branches({ scope = 'local' })` - local branches of the |current-directory| parent Git repository.- `:Pick git_branches path='%'` - all branches of the current file parent Git repository.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <path> `(string|nil)` - target path for Git operation (if required). Also used to find Git repository inside which to construct items. Default: `nil` for root of Git repository containing |current-directory|. - <scope> `(string)` - branch scope to show. One of "all", "local", "remotes". Default: "all".{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.git_commits()* `MiniExtra.pickers.git_commits`({local_opts}, {opts})Git commits picker
Pick from Git commits using `git log`.Notes:- Requires executable `git`.- Requires target path to be part of git repository.- Present for exploration and navigation purposes. Doing any Git operations is suggested to be done in a dedicated Git client and is not planned.- On choose opens scratch buffer with commit's diff.
Examples:
- `MiniExtra.pickers.git_commits()` - all commits from parent Git repository of |current-directory|.- `MiniExtra.pickers.git_commits({ path = 'subdir' })` - commits affecting files from `subdir` subdirectory.- `:Pick git_commits path='%'` commits affecting current file.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <path> `(string|nil)` - target path for Git operation (if required). Also used to find Git repository inside which to construct items. Default: `nil` for root of Git repository containing |current-directory|.{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.git_files()* `MiniExtra.pickers.git_files`({local_opts}, {opts})Git files picker
Pick from Git files using `git ls-files` using standard ignore rules.Notes:- Requires executable `git`.- Requires target path to be part of git repository.- Present for exploration and navigation purposes. Doing any Git operations is suggested to be done in a dedicated Git client and is not planned.
Examples:
- `MiniExtra.pickers.git_files({ scope = 'ignored' })` - ignored files from parent Git repository of |current-directory|.- `:Pick git_files path='subdir' scope='modified'` - files from `subdir` subdirectory which differ from Git index.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <path> `(string|nil)` - target path for Git operation (if required). Also used to find Git repository inside which to construct items. Default: `nil` for root of Git repository containing |current-directory|. - <scope> `(string)` - files scope to show. One of: - "tracked" (`--cached` Git flag). - "modified" (`--modified` Git flag). - "untracked" (`--others` Git flag). - "ignored" (`--ignored` Git flag). - "deleted" (`--deleted` Git flag). Default: "tracked".{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.git_hunks()* `MiniExtra.pickers.git_hunks`({local_opts}, {opts})Git hunks picker
Pick from Git hunks using `git diff`.Notes:- Requires executable `git`.- Requires target path to be part of git repository.- Present for exploration and navigation purposes. Doing any Git operations is suggested to be done in a dedicated Git client and is not planned.- On choose navigates to hunk's first change.
Examples:
- `MiniExtra.pickers.git_hunks({ scope = 'staged' })` - staged hunks from parent Git repository of |current-directory|.- `:Pick git_hunks path='%' n_context=0` - hunks from current file computed with no context.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <n_context> `(number)` - number of context lines to show in hunk's preview. Default: 3. - <path> `(string|nil)` - target path for Git operation (if required). Also used to find Git repository inside which to construct items. Default: `nil` for root of Git repository containing |current-directory|. - <scope> `(string)` - hunks scope to show. One of "unstaged" or "staged". Default: "unstaged".{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.hipatterns()* `MiniExtra.pickers.hipatterns`({local_opts}, {opts})Matches from |mini.hipatterns| picker
Pick from |mini.hipatterns| matches using |MiniHipatterns.get_matches()|.Notes:- Requires |mini.hipatterns|.- Highlighter identifier is highlighted with its highlight group.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <scope> `(string)` - one of "all" (buffers with enabled |mini.hipatterns|) or "current" (buffer). Default: "all". - <highlighters> `(table|nil)` - highlighters for which to find matches. Forwarded to |MiniHipatterns.get_matches()|. Default: `nil`.{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.history()* `MiniExtra.pickers.history`({local_opts}, {opts})Neovim history picker
Pick from output of |:history|. Use `<C-e>` to edit current match inCommand line.
Notes:- Has no preview.- Choosing action depends on scope: - For "cmd" / ":" scopes, the command is executed. - For "search" / "/" / "?" scopes, search is redone. - For other scopes nothing is done (but chosen item is still returned).- `<C-e>` only works for "cmd" / ":" / "search" / "/" / "?" scopes.
Examples:
- Command history: `MiniExtra.pickers.history({ scope = ':' })`- Search history: `:Pick history scope='/'`
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <scope> `(string)` - any allowed {name} flag of |:history| command. Note: word abbreviations are not allowed. Default: "all".{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.hl_groups()* `MiniExtra.pickers.hl_groups`({local_opts}, {opts})Highlight groups picker
Pick and preview highlight groups.Notes:- Item line is colored with same highlight group it represents.- Preview shows highlight's definition (as in |:highlight| with {group-name}).- Choosing places highlight definition in Command line to update and apply.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Not used at the moment.{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.keymaps()* `MiniExtra.pickers.keymaps`({local_opts}, {opts})Neovim keymaps picker
Pick and preview data about Neovim keymaps.Notes:- Item line contains data about keymap mode, whether it is buffer local, its left hand side, and inferred description.- Preview shows keymap data or callback source (if present and reachable).- Choosing emulates pressing the left hand side of the keymap.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <mode> `(string)` - modes to show. One of "all" or appropriate mode for |nvim_set_keymap()|. Default: "all". - <scope> `(string)` - scope to show. One of "all", "global", "buf". Default: "all".{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.list()* `MiniExtra.pickers.list`({local_opts}, {opts})Neovim lists picker
Pick and navigate to elements of the following Neovim lists:- |quickfix| list.- |location-list| of current window.- |jumplist|.- |changelist|.
Note: it requires explicit `scope`.
Examples:
- `MiniExtra.pickers.list({ scope = 'quickfix' })` - quickfix list.- `:Pick list scope='jump'` - jump list.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <scope> `(string)` - type of list to show. One of "quickfix", "location", "jump", "change". Default: `nil` which means explicit scope is needed.{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.lsp()* `MiniExtra.pickers.lsp`({local_opts}, {opts})LSP picker
Pick and navigate with LSP methods.Notes:- Needs an explicit scope from a list of supported ones: - "declaration". - "definition". - "document_symbol". - "implementation". - "references". - "type_definition". - "workspace_symbol". - "workspace_symbol_live" - same as "workspace_symbol", but with live feedback treating picker's prompt as LSP server query. Similar to how |MiniPick.builtin.grep_live()| and |MiniPick.builtin.grep()| are related. To use regular matching, activate |MiniPick-actions-refine|.- Relies on `vim.lsp.buf` methods supporting |vim.lsp.LocationOpts.OnList|. In particular, it means that picker is started only if LSP server returns list of locations and not a single location.- Doesn't return anything due to async nature of `vim.lsp.buf` methods.- Requires set up |mini.icons| to show extra icons and highlighting in "document_symbol", "workspace_symbol", "workspace_symbol_live" scopes.
Examples:
- `MiniExtra.pickers.lsp({ scope = 'references' })` - references of the symbol under cursor.- `:Pick lsp scope='document_symbol'` - symbols in current file.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <scope> `(string)` - LSP method to use. One of the supported ones (see list above). Default: `nil` which means explicit scope is needed. - <symbol_query> `(string)` - query for `"workspace_symbol"` scope. Default: empty string for all symbols (according to LSP specification).{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(nil)` Nothing is returned.
------------------------------------------------------------------------------ *MiniExtra.pickers.manpages()* `MiniExtra.pickers.manpages`({local_opts}, {opts})Manual pages
Pick manual page (like described in |ft-man-plugin|).Notes:- Depends on |:Man| command to preview and choose items.- Shows page in the target window. Use |MiniPick-actions-choose| to split.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Not used at the moment.{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.marks()* `MiniExtra.pickers.marks`({local_opts}, {opts})Neovim marks picker
Pick and preview position of Neovim |mark|s.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <scope> `(string)` - scope to show. One of "all", "global", "buf". Default: "all".{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.oldfiles()* `MiniExtra.pickers.oldfiles`({local_opts}, {opts})Old files picker
Pick from |v:oldfiles| entries representing readable files.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <current_dir> `(boolean)` - whether to return files only from current working directory and its subdirectories. Default: `false`. - <preserve_order> `(boolean)` - whether to preserve original order during query. Default: `false`.{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.options()* `MiniExtra.pickers.options`({local_opts}, {opts})Neovim options picker
Pick and preview data about Neovim options.Notes:- Item line is colored based on whether it was set (dimmed if wasn't).- Preview shows option value in target window and its general information.- Choosing places option name in Command line to update and apply.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <scope> `(string)` - options to show. One of "all", "global", "win", "buf". Default: "all".{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.registers()* `MiniExtra.pickers.registers`({local_opts}, {opts})Neovim registers picker
Pick from Neovim |registers|.Notes:- There is no preview (all information is in the item's text).- Choosing pastes content of a register: with |i_CTRL-R| in Insert mode, |c_CTRL-R| in Command-line mode, and |P| otherwise. Expression register |quote=| is reevaluated (if present) and pasted.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Not used at the moment.{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.spellsuggest()* `MiniExtra.pickers.spellsuggest`({local_opts}, {opts})Neovim spell suggestions picker
Pick and apply spell suggestions.Notes:- No preview is available.- Choosing replaces current word (|<cword>|) with suggestion.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <n_suggestions> `(number)` - number of spell suggestions. Default: 25.
{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.treesitter()* `MiniExtra.pickers.treesitter`({local_opts}, {opts})Tree-sitter nodes picker
Pick and navigate to |treesitter| nodes of current buffer.Notes:- Requires active tree-sitter parser in the current buffer.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Not used at the moment.{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.visit_paths()* `MiniExtra.pickers.visit_paths`({local_opts}, {opts})Visit paths from |mini.visits| picker
Pick paths from |mini.visits| using |MiniVisits.list_paths()|.Notes:- Requires |mini.visits|.
Examples:
- `MiniExtra.pickers.visit_paths()` - visits registered for |current-directory| and ordered by "robust frecency".- `:Pick visit_paths cwd='' recency_weight=1 filter='core'` - all visits with "core" label ordered from most to least recent.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <cwd> `(string)` - forwarded to |MiniVisits.list_paths()|. Default: `nil` to get paths registered for |current-directory|. - <filter> `(function|string)` - forwarded to |MiniVisits.list_paths()|. Default: `nil` to use all paths. - <preserve_order> `(boolean)` - whether to preserve original order during query. Default: `false`. - <recency_weight> `(number)` - forwarded to |MiniVisits.gen_sort.default()|. Default: 0.5 to use "robust frecency" sorting. - <sort> `(function)` - forwarded to |MiniVisits.list_paths()|. Default: `nil` to use "robust frecency". Note: if supplied, has precedence over `recency_weight`.{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(any)` Output of the called picker.
------------------------------------------------------------------------------ *MiniExtra.pickers.visit_labels()* `MiniExtra.pickers.visit_labels`({local_opts}, {opts})Visit labels from |mini.visits| picker
Pick labels from |mini.visits| using |MiniVisits.list_labels()|and |MiniVisits.list_paths()|.Notes:- Requires |mini.visits|.- Preview shows target visit paths filtered to those having previewed label.- Choosing essentially starts |MiniExtra.pickers.visit_paths()| for paths with the chosen label.
Examples:
- `MiniExtra.pickers.visit_labels()` - labels from visits registered for |current-directory|.- `:Pick visit_labels cwd=''` - labels from all visits.
Parameters ~{local_opts} `(table|nil)` Options defining behavior of this particular picker. Possible fields: - <cwd> `(string)` - forwarded to |MiniVisits.list_labels()|. Default: `nil` to get labels from visits registered for |current-directory|. - <filter> `(function|string)` - forwarded to |MiniVisits.list_labels()|. Default: `nil` to use all visits. - <path> `(string)` - forwarded to |MiniVisits.list_labels()|. Default: `""` to get labels from all visits for target `cwd`. - <sort> `(function)` - forwarded to |MiniVisits.list_paths()| for preview and choose. Default: `nil` to use "robust frecency".{opts} `(table|nil)` Options forwarded to |MiniPick.start()|.
Return ~`(...)` Chosen path.
vim:tw=78:ts=8:noet:ft=help:norl: