1

Update generated neovim config

This commit is contained in:
2024-09-22 20:41:25 +02:00
parent 1743764e48
commit aa1271c42c
1247 changed files with 26512 additions and 15067 deletions

View File

@ -33,6 +33,7 @@ Supported highlight groups:
- 'HiPhish/rainbow-delimiters.nvim'
- 'hrsh7th/nvim-cmp'
- 'justinmk/vim-sneak'
- 'kevinhwang91/nvim-bqf'
- 'kevinhwang91/nvim-ufo'
- 'lewis6991/gitsigns.nvim'
- 'lukas-reineke/indent-blankline.nvim'

View File

@ -45,12 +45,25 @@ Features:
`<C-Space>`) or fallback completion via
|MiniCompletion.complete_fallback()| (mapped to `<M-Space>`).
- LSP kind highlighting ("Function", "Keyword", etc.). Requires Neovim>=0.11.
By default uses "lsp" category of |MiniIcons| (if enabled). Can be customized
via `config.lsp_completion.process_items` by adding field <kind_hlgroup>
(same meaning as in |complete-items|) to items.
What it doesn't do:
- Snippet expansion.
- Many configurable sources.
- Automatic mapping of `<CR>`, `<Tab>`, etc., as those tend to have highly
variable user expectations. See 'Helpful key mappings' for suggestions.
# Dependencies ~
Suggested dependencies (provide extra functionality, will work without them):
- Enabled |MiniIcons| module to highlight LSP kind (requires Neovim>=0.11).
Otherwise |MiniCompletion.default_process_items()| does not add highlighting.
Also take a look at |MiniIcons.tweak_lsp_kind()|.
# Setup ~
This module needs a setup with `require('mini.completion').setup({})`
@ -199,12 +212,10 @@ Default values:
-- on every `BufEnter` event.
auto_setup = true,
-- `process_items` should be a function which takes LSP
-- 'textDocument/completion' response items and word to complete. Its
-- output should be a table of the same nature as input items. The most
-- common use-cases are custom filtering and sorting. You can use
-- default `process_items` as `MiniCompletion.default_process_items()`.
process_items = --<function: filters out snippets; sorts by LSP specs>,
-- A function which takes LSP 'textDocument/completion' response items
-- and word to complete. Output should be a table of the same nature as
-- input items. Common use case is custom filter/sort.
process_items = --<function: MiniCompletion.default_process_items>,
},
-- Fallback action. It will always be run in Insert mode. To use Neovim's
@ -269,5 +280,10 @@ No need to use it directly, everything is setup in |MiniCompletion.setup|.
`MiniCompletion.default_process_items`({items}, {base})
Default `MiniCompletion.config.lsp_completion.process_items`
Steps:
- Filter out items not matching `base` and snippet items.
- Sort by LSP specification.
- If |MiniIcons| is enabled, add <kind_hlgroup> based on the "lsp" category.
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -240,6 +240,8 @@ Parameters ~
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 ~
@ -608,7 +610,7 @@ Examples ~
- `:Pick lsp scope='document_symbol'` - symbols in current file.
Parameters ~
{local_opts} `(table)` Options defining behavior of this particular picker.
{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.
@ -648,6 +650,8 @@ Parameters ~
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 ~

View File

@ -20,6 +20,7 @@ Features:
- Filter/prefix/sort of file system entries.
- Mappings used for common explorer actions.
- UI options: whether to show preview of file/directory under cursor, etc.
- Bookmarks for quicker navigation.
What it doesn't do:
- Try to be replacement of system file explorer. It is mostly designed to
@ -159,6 +160,10 @@ Available built-in actions (see "Details" for more information): >
|-------------|------|------------------------------------------------|
| Go out plus | H | Focus on parent directory plus extra action |
|-------------|------|------------------------------------------------|
| Go to mark | ' | Jump to bookmark (waits for single key id) |
|-------------|------|------------------------------------------------|
| Set mark | m | Set bookmark (waits for single key id) |
|-------------|------|------------------------------------------------|
| Reset | <BS> | Reset current explorer |
|-------------|------|------------------------------------------------|
| Reveal cwd | @ | Reset current current working directory |
@ -183,6 +188,11 @@ Details:
- "Go out plus" is regular "Go out" but trims right part of branch.
- "Set mark" and "Go to mark" both wait for user to press a single character
of a bookmark id. Example: `ma` sets directory path of focused window as
bookmark "a"; `'a` jumps (sets as whole branch) to bookmark "a".
Special bookmark "'" always points to path before the latest bookmark jump.
- "Reset" focuses only on "anchor" directory (the one used to open current
explorer) and resets all stored directory cursor positions.
@ -190,7 +200,7 @@ Details:
If it is not an ancestor of the current branch, nothing is done.
- "Show help" results into new window with helpful information about current
explorer. Press `q` to close it.
explorer (like buffer mappings and bookmarks). Press `q` to close it.
- "Synchronize" parses user edits in directory buffers, applies them (after
confirmation), and updates all directory buffers with the most relevant
@ -226,11 +236,14 @@ General workflow:
so you can navigate in and out of directory with modified buffer.
- Execute |MiniFiles.synchronize()| (default key is `=`). This will prompt
confirmation dialog listing all file system actions it is about to perform.
READ IT CAREFULLY.
confirmation dialog listing all file system actions (per directory) it is
about to perform. READ IT CAREFULLY.
- Confirm by pressing `y`/`<CR>` (applies edits and updates buffers) or
don't confirm by pressing `n`/`<Esc>` (updates buffers without applying edits).
- Confirm by pressing `y` / `<CR>` (apply edits and update buffers) or
don't confirm by pressing `n` / `<Esc>` (update buffers without applying edits).
Note: prefer small and not related steps with more frequent synchronization
over single complex manipulation. There are (known) cases which won't work.
# How does it work ~
@ -244,6 +257,7 @@ DO NOT modify text to the left of entry name.
During synchronization, actual text for entry name is compared to path index
at that line (if present) to deduce which file system action to perform.
Note that order of text manipulation steps does not affect performed actions.
# Supported file system actions ~
@ -327,8 +341,8 @@ UI events ~
- `MiniFilesWindowOpen` - when new window is opened. Can be used to set
window-local settings (like border, 'winblend', etc.)
- `MiniFilesWindowUpdate` - when a window is updated. Triggers frequently,
for example, for every "go in" or "go out" action.
- `MiniFilesWindowUpdate` - when a window is updated. Triggers VERY frequently.
At least after every cursor movement and "go in" / "go out" action.
Callback for each UI event will receive `data` field (see |nvim_create_autocmd()|)
with the following information:
@ -354,8 +368,8 @@ Callback for each file action event will receive `data` field
(see |nvim_create_autocmd()|) with the following information:
- <action> - string with action name.
- <from> - absolute path of entry before action (`nil` for "create" action).
- <to> - absolute path of entry after action (`nil` for "delete" action).
- <from> - full path of entry before action (`nil` for "create" action).
- <to> - full path of entry after action (`nil` for permanent "delete" action).
------------------------------------------------------------------------------
*MiniFiles-examples*
@ -371,7 +385,8 @@ Use a combination of |MiniFiles.open()| and |MiniFiles.close()|: >lua
<
# Customize windows ~
Create an autocommand for `MiniFilesWindowOpen` event: >lua
For most of the common customizations using `MiniFilesWindowOpen` event
autocommand is the suggested approach: >lua
vim.api.nvim_create_autocmd('User', {
pattern = 'MiniFilesWindowOpen',
@ -386,9 +401,32 @@ Create an autocommand for `MiniFilesWindowOpen` event: >lua
end,
})
<
However, some parts (like window title and height) of window config are later
updated internally. Use `MiniFilesWindowUpdate` event for them: >lua
vim.api.nvim_create_autocmd('User', {
pattern = 'MiniFilesWindowUpdate',
callback = function(args)
local config = vim.api.nvim_win_get_config(args.data.win_id)
-- Ensure fixed height
config.height = 10
-- Ensure title padding
if config.title[#config.title][1] ~= ' ' then
table.insert(config.title, { ' ', 'NormalFloat' })
end
if config.title[1][1] ~= ' ' then
table.insert(config.title, 1, { ' ', 'NormalFloat' })
end
vim.api.nvim_win_set_config(args.data.win_id, config)
end,
})
<
# Customize icons ~
Use different directory icon: >lua
Use different directory icon (if you don't use |mini.icons|): >lua
local my_prefix = function(fs_entry)
if fs_entry.fs_type == 'directory' then
@ -434,18 +472,18 @@ Create an autocommand for `MiniFilesBufferCreate` event which calls
<
# Create mappings to modify target window via split ~
Combine |MiniFiles.get_target_window()| and |MiniFiles.set_target_window()|: >lua
Combine |MiniFiles.get_explorer_state()| and |MiniFiles.set_target_window()|: >lua
local map_split = function(buf_id, lhs, direction)
local rhs = function()
-- Make new window and set it as target
local new_target_window
vim.api.nvim_win_call(MiniFiles.get_target_window(), function()
local cur_target = MiniFiles.get_explorer_state().target_window
local new_target = vim.api.nvim_win_call(cur_target, function()
vim.cmd(direction .. ' split')
new_target_window = vim.api.nvim_get_current_win()
return vim.api.nvim_get_current_win()
end)
MiniFiles.set_target_window(new_target_window)
MiniFiles.set_target_window(new_target)
end
-- Adding `desc` will result into `show_help` entries
@ -458,8 +496,8 @@ Combine |MiniFiles.get_target_window()| and |MiniFiles.set_target_window()|: >lu
callback = function(args)
local buf_id = args.data.buf_id
-- Tweak keys to your liking
map_split(buf_id, 'gs', 'belowright horizontal')
map_split(buf_id, 'gv', 'belowright vertical')
map_split(buf_id, '<C-s>', 'belowright horizontal')
map_split(buf_id, '<C-v>', 'belowright vertical')
end,
})
<
@ -481,6 +519,22 @@ Use |MiniFiles.get_fs_entry()| together with |vim.fs.dirname()|: >lua
end,
})
<
# Set custom bookmarks ~
Use |MiniFiles.set_bookmark()| inside `MiniFilesExplorerOpen` event: >lua
local set_mark = function(id, path, desc)
MiniFiles.set_bookmark(id, path, { desc = desc })
end
vim.api.nvim_create_autocmd('User', {
pattern = 'MiniFilesExplorerOpen',
callback = function()
set_mark('c', vim.fn.stdpath('config'), 'Config') -- path
set_mark('w', vim.fn.getcwd, 'Working directory') -- callable
set_mark('~', '~', 'Home directory')
end,
})
<
------------------------------------------------------------------------------
*MiniFiles.setup()*
`MiniFiles.setup`({config})
@ -521,6 +575,8 @@ Default values:
go_in_plus = 'L',
go_out = 'h',
go_out_plus = 'H',
mark_goto = "'",
mark_set = 'm',
reset = '<BS>',
reveal_cwd = '@',
show_help = 'g?',
@ -712,7 +768,7 @@ Depends on entry under cursor:
Explorer is not closed after that.
Parameters ~
{opts} Options. Possible fields:
{opts} `(table|nil)` Options. Possible fields:
- <close_on_file> `(boolean)` - whether to close explorer after going
inside a file. Powers the `go_in_plus` mapping.
Default: `false`.
@ -775,14 +831,35 @@ Return ~
Returns `nil` if there is no proper file system entry path at the line.
------------------------------------------------------------------------------
*MiniFiles.get_explorer_state()*
`MiniFiles.get_explorer_state`()
Get state of active explorer
Return ~
`(table|nil)` Table with explorer state data or `nil` if no active explorer.
State data is a table with the following fields:
- <anchor> `(string)` - anchor directory path (see |MiniFiles.open()|).
- <bookmarks> `(table)` - map from bookmark id (single character) to its data:
table with <path> and <desc> fields (see |MiniFiles.set_bookmark()|).
- <branch> `(table)` - array of nested paths for currently opened branch.
- <depth_focus> `(number)` - an index in <branch> for currently focused path.
- <target_window> `(number)` - identifier of target window.
- <windows> `(table)` - array with data about currently opened windows.
Each element is a table with <win_id> (window identifier) and <path> (path
shown in the window) fields.
See also ~
- |MiniFiles.set_bookmark()|
- |MiniFiles.set_branch()|
- |MiniFiles.set_target_window()|
------------------------------------------------------------------------------
*MiniFiles.get_target_window()*
`MiniFiles.get_target_window`()
Get target window
Return ~
`(number|nil)` Window identifier inside which file will be opened or
`nil` if no explorer is opened.
Deprecated. Use |MiniFiles.get_explorer_state()|.
------------------------------------------------------------------------------
*MiniFiles.set_target_window()*
@ -792,6 +869,38 @@ Set target window
Parameters ~
{win_id} `(number)` Window identifier inside which file will be opened.
------------------------------------------------------------------------------
*MiniFiles.set_branch()*
`MiniFiles.set_branch`({branch}, {opts})
Set branch
Set which paths to display. Preview (if enabled) is applied afterwards.
Parameters ~
{branch} `(table)` Array of strings representing actually present on disk paths.
Each consecutive pair should represent direct parent-child paths.
Should contain at least one directory path.
May end with file path (will be previwed).
Relative paths are resolved using |current-directory|.
{opts} `(table|nil)` Options. Possible fields:
- <depth_focus> `(number)` - an index in `branch` for path to focus. Will
be normalized to fit inside `branch`. Default: index of deepest directory.
See also ~
|MiniFiles.get_explorer_state()|
------------------------------------------------------------------------------
*MiniFiles.set_bookmark()*
`MiniFiles.set_bookmark`({id}, {path}, {opts})
Set bookmark
Parameters ~
{id} `(string)` Single character bookmark id.
{path} `(string|function)` Path of a present on disk directory to set as
a bookmark's path. If callable, should return such path.
{opts} `(table|nil)` Options. Possible fields:
- <desc> `(string)` - bookmark description (used in help window).
------------------------------------------------------------------------------
*MiniFiles.get_latest_path()*
`MiniFiles.get_latest_path`()

View File

@ -270,7 +270,8 @@ Default: "auto".
`MiniGit.show_at_cursor`({opts})
Show Git related data at cursor
- If there is a commit-like |<cword>|, show it in split with `git show`.
- If inside |mini.deps| confirmation buffer, show in split relevant commit data.
- If there is a commit-like |<cword>|, show it in split.
- If possible, show diff source via |MiniGit.show_diff_source()|.
- If possible, show range history via |MiniGit.show_range_history()|.
- Otherwise throw an error.

View File

@ -49,6 +49,7 @@ Supported highlight groups:
- 'HiPhish/rainbow-delimiters.nvim'
- 'hrsh7th/nvim-cmp'
- 'justinmk/vim-sneak'
- 'kevinhwang91/nvim-bqf'
- 'kevinhwang91/nvim-ufo'
- 'lewis6991/gitsigns.nvim'
- 'lukas-reineke/indent-blankline.nvim'

View File

@ -173,18 +173,20 @@ Parameters ~
Set up terminal background synchronization
What it does:
- Checks if terminal emulator supports OSC 11 control sequence. Stops if not.
- Creates |UIEnter| and |ColorScheme| autocommands which change terminal
background to have same color as |guibg| of |hl-Normal|.
- Creates |UILeave| autocommand which sets terminal background back to the
color at the time this function was called first time in current session.
- Checks if terminal emulator supports OSC 11 control sequence through
appropriate `stdout`. Stops if not.
- Creates autocommands for |ColorScheme| and |VimResume| events, which
change terminal background to have same color as |guibg| of |hl-Normal|.
- Creates autocommands for |VimLeavePre| and |VimSuspend| events which set
terminal background back to the color at the time this function was
called first time in current session.
- Synchronizes background immediately to allow not depend on loading order.
Primary use case is to remove possible "frame" around current Neovim instance
which appears if Neovim's |hl-Normal| background color differs from what is
used by terminal emulator itself.
Make sure to call it only during interactive session in terminal emulator.
Works only on Neovim>=0.10.
------------------------------------------------------------------------------
*MiniMisc.setup_restore_cursor()*

View File

@ -117,6 +117,7 @@ See |mini.nvim-buffer-local-config| for more details.
* `MiniPickBorder` - window border.
* `MiniPickBorderBusy` - window border while picker is busy processing.
* `MiniPickBorderText` - non-prompt on border.
* `MiniPickCursor` - cursor during active picker (hidden by default).
* `MiniPickIconDirectory` - default icon for directory.
* `MiniPickIconFile` - default icon for file.
* `MiniPickHeader` - headers in info buffer and previews.
@ -854,7 +855,7 @@ Refresh active picker
------------------------------------------------------------------------------
*MiniPick.default_match()*
`MiniPick.default_match`({stritems}, {inds}, {query}, {do_sync})
`MiniPick.default_match`({stritems}, {inds}, {query}, {opts})
Default match
Filter target stritems to contain query and sort from best to worst matches.
@ -926,11 +927,13 @@ Parameters ~
{inds} `(table)` Array of `stritems` indexes to match. All of them should point
at string elements of `stritems`. No check is done for performance reasons.
{query} `(table)` Array of strings.
{do_sync} `(boolean|nil)` Whether to match synchronously. Default: `nil`.
{opts} `(table|nil)` Options. Possible fields:
- <sync> `(boolean)` - Whether to match synchronously. Default: `false`.
- <preserve_order> `(boolean)` - Whether to skip sort step. Default: `false`.
Return ~
`(table|nil)` Depending on whether computation is synchronous (either `do_sync`
is truthy or there is an active picker):
`(table|nil)` Depending on whether computation is synchronous (either `opts.sync`
is `true` or there is an active picker):
- If yes, array of `stritems` indexes matching the `query` (from best to worst).
- If no, `nil` is returned with |MiniPick.set_picker_match_inds()| used later.

View File

@ -150,9 +150,7 @@ Default values:
-- Whether to use icons by default
use_icons = true,
-- Whether to set Vim's settings for statusline (make it always shown with
-- 'laststatus' set to 2).
-- To use global statusline, set this to `false` and 'laststatus' to 3.
-- Whether to set Vim's settings for statusline (make it always shown)
set_vim_settings = true,
}
<

View File

@ -32,6 +32,8 @@ Features:
- Customizable project specific testing script.
- Works on Unix (Linux, MacOS, etc.) and Windows.
What it doesn't support:
- Parallel execution. Due to idea of limiting implementation complexity.

View File

@ -278,6 +278,7 @@ MiniFiles.config mini-files.txt /*MiniFiles.config*
MiniFiles.default_filter() mini-files.txt /*MiniFiles.default_filter()*
MiniFiles.default_prefix() mini-files.txt /*MiniFiles.default_prefix()*
MiniFiles.default_sort() mini-files.txt /*MiniFiles.default_sort()*
MiniFiles.get_explorer_state() mini-files.txt /*MiniFiles.get_explorer_state()*
MiniFiles.get_fs_entry() mini-files.txt /*MiniFiles.get_fs_entry()*
MiniFiles.get_latest_path() mini-files.txt /*MiniFiles.get_latest_path()*
MiniFiles.get_target_window() mini-files.txt /*MiniFiles.get_target_window()*
@ -287,6 +288,8 @@ MiniFiles.open() mini-files.txt /*MiniFiles.open()*
MiniFiles.refresh() mini-files.txt /*MiniFiles.refresh()*
MiniFiles.reset() mini-files.txt /*MiniFiles.reset()*
MiniFiles.reveal_cwd() mini-files.txt /*MiniFiles.reveal_cwd()*
MiniFiles.set_bookmark() mini-files.txt /*MiniFiles.set_bookmark()*
MiniFiles.set_branch() mini-files.txt /*MiniFiles.set_branch()*
MiniFiles.set_target_window() mini-files.txt /*MiniFiles.set_target_window()*
MiniFiles.setup() mini-files.txt /*MiniFiles.setup()*
MiniFiles.show_help() mini-files.txt /*MiniFiles.show_help()*