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

@ -63,23 +63,3 @@ jobs:
fetch-depth: 0
- name: Check Case Sensitivity
uses: credfeto/action-case-checker@v1.2.1
checkout:
# Test possibility of checking out and setting up 'mini.nvim' on non-Linux
# This can guard from possible problems:
# - Long file names (particularly from reference screenshots).
name: Test checkout
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup neovim
uses: rhysd/action-setup-vim@v1
with:
# Uses latest stable by default
neovim: true
- name: Test setup
run: make basic_setup

View File

@ -15,17 +15,17 @@ concurrency:
jobs:
build:
name: Run tests
timeout-minutes: 10
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
neovim_version: ['v0.8.3', 'v0.9.5', 'v0.10.0', 'nightly']
# include:
# - os: macos-latest
# neovim_version: v0.10.0
# - os: windows-latest
# neovim_version: v0.10.0
neovim_version: ['v0.8.3', 'v0.9.5', 'v0.10.1', 'nightly']
include:
- os: macos-latest
neovim_version: v0.10.1
- os: windows-latest
neovim_version: v0.10.1
runs-on: ${{ matrix.os }}
steps:

View File

@ -6,6 +6,16 @@
- Tree-sitter parser is built-in in Neovim 0.9.x, needs manual enabling via `vim.treesitter.start()`.
- Has visual regressions on Neovim 0.8.0 and 0.8.1 without enabled tree-sitter (code blocks are highlighted as normal text). Use 0.8.2 or newer.
- Universally prefer 'mini.icons' module over 'nvim-tree/nvim-web-devicons'.
- Start automated testing on Windows and MacOS.
- Universally ensure that all plugin's highlight groups are defined after any color scheme takes effect.
## mini.base16
- FEATURE: add 'kevinhwang91/nvim-bqf' plugin integration.
## mini.completion
- FEATURE: add highlighting of LSP kind (like "Function", "Keyword", etc.). Works only on Neovim>=0.11. Requires enabled 'mini.icons' to work out of the box.
## mini.doc
@ -13,10 +23,17 @@
## mini.extra
- FEATURE: update `pickers.oldfiles()` to have `current_dir` option which if `true` shows files only from picker's working directory. By @abeldekat, PR #997.
- FEATURE: update `oldfiles` picker to have `current_dir` option which if `true` shows files only from picker's working directory. By @abeldekat, PR #997.
- FEATURE: make `git_hunks`, `list`, and `lsp` pickers show icons. Scopes `document_symbol` and `workspace_symbol` in `lsp` picker show icon based on LSP kind (requires set up 'mini.icons'), others - based on path data.
- FEATURE: update `buf_lines` and `oldfiles` pickers to have `preserve_order` local option, similar to `visit_paths` picker. Other possible candidates for this option are intentionally not updated to not increase maintenance (manually override `match` source method to call `MiniPick.default_match()` with `{ preserve_order = true }` options).
- FEATURE: update `buf_lines` picker to pad line numbers to achieve more aligned look.
- BREAKING FEATURE: use "│" as line/position separator instead of ":". This aligns with changes in 'mini.pick' and makes line/position more easily visible.
## mini.git
- FEATURE: update `show_at_cursor()` to include commit's statistics when showing commit.
- FEATURE: update `show_at_cursor()` to show relevant at cursor commit data inside 'mini.deps' confirmation buffer.
## mini.hipatterns
- BREAKING FEATURE: update `compute_hex_color_group()` to compute based on combination of `hex_color` and `style`, opposed to just `hex_color`. This allows simultaneous usage of several styles in user's custom highlighters.
@ -24,10 +41,26 @@
## mini.hues
- FEATURE: implement `apply_palette()` (to compliment `make_palette()`) providing a way to tweak applied palette before applying it.
- FEATURE: add 'kevinhwang91/nvim-bqf' plugin integration.
## mini.files
- FEATURE: prefer using 'mini.icons' as icon provider.
- FEATURE: implement bookmarks. With default config:
- Type `m` followed by a single character `<char>` to set directory path of focused window as a bookmark with id `<char>`.
- Type `'` followed by a bookmark id to make bookmark's path focused in explorer.
- Use `MiniFiles.set_bookmark()` inside `MiniFilesExplorerOpen` event to set custom bookmarks.
- FEATURE: make data for `MiniFilesActionDelete` contain `to` field in case of not permanent delete.
- FEATURE: make file manipulation work better for special complex/overlapping cases (like delete 'file-a' and copy 'file-b' as 'file-a'). It is **still** a better idea to split overlapping manipulations into smaller and not related steps, as there *are* cases which won't work.
- FEATURE: add `get_explorer_state()` to allow more reliable user customizations.
- FEATURE: add `set_branch()` to allow to set what paths should be displayed and focused.
- BREAKING: soft deprecate `get_target_window()` in favor of `get_explorer_state().target_window`. Will be completely removed after the next release.
- BREAKING: update how confirmation lines are computed:
- Show create actions in the group directory where text manipulation took place. This matters during creating nested entries and is usually a more intuitive representation.
- For delete show its type after the file name ("permanently" or "to trash") as an additional visual indication of delete type.
- For create, copy and move prefer showing its "to" path relative to group directory.
- Separate action name and paths with "│" (instead of ":") for better visual separation.
- Don't enclose paths in quotes. Initially it was done to reliably show possible whitespace in paths, but inferring it from overall line structure should be good enough.
## mini.icons
@ -35,14 +68,17 @@
## mini.misc
- FEATURE: implement `setup_termbg_sync()` to set up terminal background synchronization (removes possible "frame" around current Neovim instance).
- FEATURE: implement `setup_termbg_sync()` to set up terminal background synchronization (removes possible "frame" around current Neovim instance). Works only on Neovim>=0.10.
## mini.pick
- FEATURE: prefer using 'mini.icons' as icon provider.
- BREAKING: update `default_match()` to have table `opts` as fourth argument (instead of boolean `do_sync`). Use `{ sync = true }` to run synchronously. The new design is more aligned with other functions and is more forward compatible.
- FEATURE: add `preserve_order` option to `default_match()` to allow asynchronous matching which preserves order (i.e. doesn't do sort step of fuzzy matching).
- BREAKING: encoding line or position in string items has changed:
- Use "\0" (null character; use "\000" form if it is in a string before digit) instead of ":" as delimiter. This makes it work with files similar to ":" position encoding (like "time_12:34:56"). This only matters for custom sources which provide line or position in string items.
- Update `default_show()` to display "│" character instead of "\0" in item's string representation (previously was ":"). In particular, this changes how line/position is displayed in `grep` and `grep_live` built-in pickers. This change was done because "│" is more visible as separator.
- FEATURE: explicitly hide cursor when picker is active (instead of putting it in command line).
## mini.starter
@ -51,6 +87,7 @@
## mini.statusline
- BREAKING FEATURE: update `section_fileinfo()` to show non-empty filetype even in not normal buffers (like plugin's scratch buffers, help, quickfix, etc.). Previously it showed nothing, which was a mistake as filetype can be a valuable information.
- BREAKING FEATURE: the default `set_vim_settings` config value now does not affect `laststatus = 3` (aka global statusline).
- FEATURE: prefer using 'mini.icons' as icon provider for `section_fileinfo()`.
## mini.surround
@ -61,6 +98,10 @@
- FEATURE: prefer using 'mini.icons' as icon provider.
## mini.test
- FEATURE: make it work on Windows. By @cameronr, PR #1101.
# Version 0.13.0

View File

@ -95,7 +95,7 @@ If your contribution updates annotations used to generate help file, please rege
## Testing
If your contribution updates code and you use Linux (not Windows or MacOS), please make sure that it doesn't break existing tests. If it adds new functionality or fixes a recognized bug, add new test case(s). There are two ways of running tests:
If your contribution updates code, please make sure that it doesn't break existing tests. If it adds new functionality or fixes a recognized bug, add new test case(s). There are two ways of running tests:
- From command line:
- Execute `make test` to run all tests (with `nvim` as executable).
@ -107,11 +107,13 @@ If your contribution updates code and you use Linux (not Windows or MacOS), plea
This plugin uses 'mini.test' to manage its tests. For a more hands-on introduction, see [TESTING.md](TESTING.md).
**Notes**:
- If you have Windows or MacOS and want to contribute code related change, make your best effort to not break existing behavior. It will later be tested automatically after making Pull Request. The reason for this distinction is that tests are not well designed to be run on those operating systems.
- If new functionality relies on an external dependency (`git` CLI tool, LSP server, etc.), use mocking (writing Lua code which emulates dependency usage as close as reasonably possible). For examples, take a look at tests for 'mini.pick', 'mini.completion', and 'mini.statusline'.
- There is a certain number of tests that are flaky (i.e. will sometimes report an error due to other reasons than actual functionality being broke). It is usually the ones which test time related functionality (i.e. that certain action was done after specific amount of delay).
A commonly used way to know if the test is flaky is that it fails on non-nightly Neovim version yet there were no changes to its tested module after it had passed in the past. For example, some 'mini.animate' test is shown to break but there were no changes to it since test passed in CI couple of days before.
In case there is some test breaking which reasonably should not, rerun that test (or the whole file) at least several times.
- Advice for writing more robust tests:
- To test asynchronous or slow execution, use common `sleep()` test helper. For a more robust testing code, **never** directly use numbers to compute sleep time. Use precomputed time delay constants, which should always take into account different testing OSs (like be bigger on Windows, etc.). If module testing requires its extensive use and tests can not be made robust enough (examples are 'mini.animate', 'mini.jump', etc.), consider using it with argument that skips entire test case if `sleep()` is called in slow context.
- Take into account that Windows uses "\" as default path separator instead of Unix "/". This should be accounted either in module's code (preferably) or in test files (for example, by computing path separator and relying on it).
## Formatting
@ -226,6 +228,7 @@ Here is a list of all highlight groups defined inside 'mini.nvim' modules. See d
- `MiniPickBorder`
- `MiniPickBorderBusy`
- `MiniPickBorderText`
- `MiniPickCursor`
- `MiniPickIconDirectory`
- `MiniPickIconFile`
- `MiniPickHeader`

View File

@ -145,7 +145,6 @@ Begin the process of stopping official support for outdated Neovim version short
- Add Lua source code in 'lua' directory.
- Add tests in 'tests' directory. Use 'tests/dir-xxx' name for module-specific non-test helpers.
- Update 'lua/init.lua' to mention new module: both in initial table of contents and list of modules.
- Update 'scripts/basic-setup_init.lua' to include new module.
- Update 'scripts/dual_sync.sh' to include new module.
- Update 'scripts/minidoc.lua' to generate separate help file.
- Generate help files.

View File

@ -27,9 +27,6 @@ documentation:
lintcommit-ci:
export LINTCOMMIT_STRICT=true && chmod u+x scripts/lintcommit-ci.sh && scripts/lintcommit-ci.sh
basic_setup:
$(NVIM_EXEC) --headless --noplugin -u ./scripts/basic-setup_init.lua
dual_sync:
chmod u+x scripts/dual_sync.sh && scripts/dual_sync.sh

View File

@ -145,7 +145,7 @@ If you are browsing without particular objective and don't know which module to
- **Silencing**. Each module providing non-error feedback can be configured to not do that by setting `config.silent = true` (either inside `setup()` call or on the fly).
- **Highlighting**. Appearance of module's output is controlled by certain set of highlight groups (see `:h highlight-groups`). By default they usually link to some semantically close built-in highlight group. Use `:highlight` command or `vim.api.nvim_set_hl()` Lua function to customize highlighting. To see a more calibrated look, use 'mini.hues', 'mini.base16', or plugin's colorscheme.
- **Highlighting**. Appearance of module's output is controlled by certain set of highlight groups (see `:h highlight-groups`). By default they usually link to some semantically close built-in highlight group and are ensured to be defined after any color scheme takes effect. Use `:highlight` command or `vim.api.nvim_set_hl()` Lua function to customize highlighting. To see a more calibrated look, use 'mini.hues', 'mini.base16', or plugin's color scheme.
- **Stability**. Each module upon release is considered to be relatively stable: both in terms of setup and functionality. Any non-bugfix backward-incompatible change will be released gradually as much as possible.

View File

@ -1,4 +1,4 @@
#!/nix/store/4bj2kxdm1462fzcc2i2s4dn33g2angcc-bash-5.2p32/bin/bash
#!/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash
# Perform benchmarking of startup times with different Neovim 'init' files.
# Execute `nvim -u <*> --startuptime <*>` several times (as closely to actual

View File

@ -1,4 +1,4 @@
#!/nix/store/4bj2kxdm1462fzcc2i2s4dn33g2angcc-bash-5.2p32/bin/bash
#!/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash
PLUGINPATH=/tmp/nvim/site/pack/bench/opt
rm -rf $PLUGINPATH
mkdir -p $PLUGINPATH

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()*

View File

@ -704,7 +704,7 @@ MiniAi.gen_spec = {}
--- Default: `{ '%b""', "%b''", '%b()', '%b[]', '%b{}' }` (separators
--- inside balanced quotes or brackets are ignored).
MiniAi.gen_spec.argument = function(opts)
opts = vim.tbl_deep_extend('force', {
opts = vim.tbl_extend('force', {
brackets = { '%b()', '%b[]', '%b{}' },
separator = ',',
exclude_regions = { '%b""', "%b''", '%b()', '%b[]', '%b{}' },
@ -1425,7 +1425,7 @@ H.find_textobject_region = function(tobj_spec, ai_type, opts)
end
-- Convert to region
return neigh.span_to_region(final_span)
return neigh.span_to_region(final_span, find_res.vis_mode)
end
H.get_default_opts = function()
@ -1540,11 +1540,10 @@ end
---@param opts table Fields: <search_method>.
---@private
H.find_best_match = function(neighborhood, tobj_spec, reference_span, opts)
local best_span, best_nested_pattern, current_nested_pattern
local f = function(span)
local best_span, best_nested_pattern, best_vis_mode, current_nested_pattern
local f = function(span, vis_mode)
if H.is_better_span(span, best_span, reference_span, opts) then
best_span = span
best_nested_pattern = current_nested_pattern
best_span, best_nested_pattern, best_vis_mode = span, current_nested_pattern, vis_mode
end
end
@ -1552,7 +1551,7 @@ H.find_best_match = function(neighborhood, tobj_spec, reference_span, opts)
-- Iterate over all spans representing regions in array
for _, region in ipairs(tobj_spec) do
-- Consider region only if it is completely within neighborhood
if neighborhood.is_region_inside(region) then f(neighborhood.region_to_span(region)) end
if neighborhood.is_region_inside(region) then f(neighborhood.region_to_span(region), region.vis_mode) end
end
else
-- Iterate over all matched spans
@ -1564,7 +1563,7 @@ H.find_best_match = function(neighborhood, tobj_spec, reference_span, opts)
local extract_pattern
if best_nested_pattern ~= nil then extract_pattern = best_nested_pattern[#best_nested_pattern] end
return { span = best_span, extract_pattern = extract_pattern }
return { span = best_span, vis_mode = best_vis_mode, extract_pattern = extract_pattern }
end
H.iterate_matched_spans = function(line, nested_pattern, f)
@ -1842,12 +1841,12 @@ H.get_neighborhood = function(reference_region, n_neighbors)
end
-- Convert 1d span to 2d region
local span_to_region = function(span)
local span_to_region = function(span, vis_mode)
if span == nil then return nil end
-- NOTE: this might lead to outside of line positions due to added `\n` at
-- the end of lines in 1d-neighborhood. However, this is crucial for
-- allowing `i` textobjects to collapse multiline selections.
local res = { from = offset_to_pos(span.from) }
local res = { from = offset_to_pos(span.from), vis_mode = vis_mode }
-- Convert empty span to empty region
if span.from < span.to then res.to = offset_to_pos(span.to - 1) end

View File

@ -1330,8 +1330,10 @@ end
H.is_disabled = function() return vim.g.minialign_disable == true or vim.b.minialign_disable == true end
H.get_config = function(config)
return vim.tbl_deep_extend('force', MiniAlign.config, vim.b.minialign_config or {}, config or {})
H.get_config = function()
-- Using `tbl_deep_extend()` works even in presense of `steps.pre_*` arrays
-- because default ones are empty.
return vim.tbl_deep_extend('force', MiniAlign.config, vim.b.minialign_config or {})
end
-- Mappings -------------------------------------------------------------------
@ -1396,7 +1398,8 @@ end
H.normalize_steps = function(steps, steps_name)
-- Infer all defaults from module config
local res = vim.tbl_deep_extend('force', H.get_config().steps, steps or {})
-- NOTE: Don't use `tbl_deep_extend` to prefer full input arrays (if present)
local res = vim.tbl_extend('force', H.get_config().steps, steps or {})
H.validate_steps(res, steps_name)

View File

@ -1211,10 +1211,10 @@ end
H.apply_config = function(config) MiniAnimate.config = config end
H.create_autocommands = function()
local augroup = vim.api.nvim_create_augroup('MiniAnimate', {})
local gr = vim.api.nvim_create_augroup('MiniAnimate', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
au('CursorMoved', '*', H.auto_cursor, 'Animate cursor')
@ -1246,7 +1246,7 @@ H.create_autocommands = function()
au('WinClosed', '*', function() H.auto_openclose('close') end, 'Animate window close')
au('ColorScheme', '*', H.create_default_hl, 'Ensure proper colors')
au('ColorScheme', '*', H.create_default_hl, 'Ensure colors')
end
H.create_default_hl = function()
@ -1783,8 +1783,7 @@ H.make_openclose_step = function(action_type, win_id, config)
vim.api.nvim_win_set_config(float_win_id, float_config)
end
local new_winblend = H.round(winblend(step, n_steps))
vim.api.nvim_win_set_option(float_win_id, 'winblend', new_winblend)
vim.wo[float_win_id].winblend = H.round(winblend(step, n_steps))
return true
end,

View File

@ -33,6 +33,7 @@
--- - 'HiPhish/rainbow-delimiters.nvim'
--- - 'hrsh7th/nvim-cmp'
--- - 'justinmk/vim-sneak'
--- - 'kevinhwang91/nvim-bqf'
--- - 'kevinhwang91/nvim-ufo'
--- - 'lewis6991/gitsigns.nvim'
--- - 'lukas-reineke/indent-blankline.nvim'
@ -468,73 +469,79 @@ H.apply_palette = function(palette, use_cterm)
-- stylua: ignore start
-- Builtin highlighting groups. Some groups which are missing in 'base16-vim'
-- are added based on groups to which they are linked.
hi('ColorColumn', {fg=nil, bg=p.base01, attr=nil, sp=nil})
hi('Conceal', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('CurSearch', {fg=p.base01, bg=p.base09, attr=nil, sp=nil})
hi('Cursor', {fg=p.base00, bg=p.base05, attr=nil, sp=nil})
hi('CursorColumn', {fg=nil, bg=p.base01, attr=nil, sp=nil})
hi('CursorIM', {fg=p.base00, bg=p.base05, attr=nil, sp=nil})
hi('CursorLine', {fg=nil, bg=p.base01, attr=nil, sp=nil})
hi('CursorLineFold', {fg=p.base0C, bg=p.base01, attr=nil, sp=nil})
hi('CursorLineNr', {fg=p.base04, bg=p.base01, attr=nil, sp=nil})
hi('CursorLineSign', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('DiffAdd', {fg=p.base0B, bg=p.base01, attr=nil, sp=nil})
hi('ColorColumn', {fg=nil, bg=p.base01, attr=nil, sp=nil})
hi('Conceal', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('CurSearch', {fg=p.base01, bg=p.base09, attr=nil, sp=nil})
hi('Cursor', {fg=p.base00, bg=p.base05, attr=nil, sp=nil})
hi('CursorColumn', {fg=nil, bg=p.base01, attr=nil, sp=nil})
hi('CursorIM', {fg=p.base00, bg=p.base05, attr=nil, sp=nil})
hi('CursorLine', {fg=nil, bg=p.base01, attr=nil, sp=nil})
hi('CursorLineFold', {fg=p.base0C, bg=p.base01, attr=nil, sp=nil})
hi('CursorLineNr', {fg=p.base04, bg=p.base01, attr=nil, sp=nil})
hi('CursorLineSign', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('DiffAdd', {fg=p.base0B, bg=p.base01, attr=nil, sp=nil})
-- Differs from base16-vim, but according to general style guide
hi('DiffChange', {fg=p.base0E, bg=p.base01, attr=nil, sp=nil})
hi('DiffDelete', {fg=p.base08, bg=p.base01, attr=nil, sp=nil})
hi('DiffText', {fg=p.base0D, bg=p.base01, attr=nil, sp=nil})
hi('Directory', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('EndOfBuffer', {fg=p.base03, bg=nil, attr=nil, sp=nil})
hi('ErrorMsg', {fg=p.base08, bg=p.base00, attr=nil, sp=nil})
hi('FoldColumn', {fg=p.base0C, bg=p.base01, attr=nil, sp=nil})
hi('Folded', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('IncSearch', {fg=p.base01, bg=p.base09, attr=nil, sp=nil})
hi('lCursor', {fg=p.base00, bg=p.base05, attr=nil, sp=nil})
hi('LineNr', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('LineNrAbove', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('LineNrBelow', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('DiffChange', {fg=p.base0E, bg=p.base01, attr=nil, sp=nil})
hi('DiffDelete', {fg=p.base08, bg=p.base01, attr=nil, sp=nil})
hi('DiffText', {fg=p.base0D, bg=p.base01, attr=nil, sp=nil})
hi('Directory', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('EndOfBuffer', {fg=p.base03, bg=nil, attr=nil, sp=nil})
hi('ErrorMsg', {fg=p.base08, bg=p.base00, attr=nil, sp=nil})
hi('FoldColumn', {fg=p.base0C, bg=p.base01, attr=nil, sp=nil})
hi('Folded', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('IncSearch', {fg=p.base01, bg=p.base09, attr=nil, sp=nil})
hi('lCursor', {fg=p.base00, bg=p.base05, attr=nil, sp=nil})
hi('LineNr', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('LineNrAbove', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('LineNrBelow', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
-- Slight difference from base16, where `bg=base03` is used. This makes
-- it possible to comfortably see this highlighting in comments.
hi('MatchParen', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('ModeMsg', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('MoreMsg', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('MsgArea', {fg=p.base05, bg=p.base00, attr=nil, sp=nil})
hi('MsgSeparator', {fg=p.base04, bg=p.base02, attr=nil, sp=nil})
hi('NonText', {fg=p.base03, bg=nil, attr=nil, sp=nil})
hi('Normal', {fg=p.base05, bg=p.base00, attr=nil, sp=nil})
hi('NormalFloat', {fg=p.base05, bg=p.base01, attr=nil, sp=nil})
hi('NormalNC', {fg=p.base05, bg=p.base00, attr=nil, sp=nil})
hi('PMenu', {fg=p.base05, bg=p.base01, attr=nil, sp=nil})
hi('PMenuSbar', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('PMenuSel', {fg=p.base01, bg=p.base05, attr=nil, sp=nil})
hi('PMenuThumb', {fg=nil, bg=p.base07, attr=nil, sp=nil})
hi('Question', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('QuickFixLine', {fg=nil, bg=p.base01, attr=nil, sp=nil})
hi('Search', {fg=p.base01, bg=p.base0A, attr=nil, sp=nil})
hi('SignColumn', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('SpecialKey', {fg=p.base03, bg=nil, attr=nil, sp=nil})
hi('SpellBad', {fg=nil, bg=nil, attr='undercurl', sp=p.base08})
hi('SpellCap', {fg=nil, bg=nil, attr='undercurl', sp=p.base0D})
hi('SpellLocal', {fg=nil, bg=nil, attr='undercurl', sp=p.base0C})
hi('SpellRare', {fg=nil, bg=nil, attr='undercurl', sp=p.base0E})
hi('StatusLine', {fg=p.base04, bg=p.base02, attr=nil, sp=nil})
hi('StatusLineNC', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('Substitute', {fg=p.base01, bg=p.base0A, attr=nil, sp=nil})
hi('TabLine', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('TabLineFill', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('TabLineSel', {fg=p.base0B, bg=p.base01, attr=nil, sp=nil})
hi('TermCursor', {fg=nil, bg=nil, attr='reverse', sp=nil})
hi('TermCursorNC', {fg=nil, bg=nil, attr='reverse', sp=nil})
hi('Title', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('VertSplit', {fg=p.base02, bg=p.base02, attr=nil, sp=nil})
hi('Visual', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('VisualNOS', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('WarningMsg', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('Whitespace', {fg=p.base03, bg=nil, attr=nil, sp=nil})
hi('WildMenu', {fg=p.base08, bg=p.base0A, attr=nil, sp=nil})
hi('WinBar', {fg=p.base04, bg=p.base02, attr=nil, sp=nil})
hi('WinBarNC', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('WinSeparator', {fg=p.base02, bg=p.base02, attr=nil, sp=nil})
hi('MatchParen', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('ModeMsg', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('MoreMsg', {fg=p.base0B, bg=nil, attr=nil, sp=nil})
hi('MsgArea', {fg=p.base05, bg=p.base00, attr=nil, sp=nil})
hi('MsgSeparator', {fg=p.base04, bg=p.base02, attr=nil, sp=nil})
hi('NonText', {fg=p.base03, bg=nil, attr=nil, sp=nil})
hi('Normal', {fg=p.base05, bg=p.base00, attr=nil, sp=nil})
hi('NormalFloat', {fg=p.base05, bg=p.base01, attr=nil, sp=nil})
hi('NormalNC', {fg=p.base05, bg=p.base00, attr=nil, sp=nil})
hi('Pmenu', {fg=p.base05, bg=p.base01, attr=nil, sp=nil})
hi('PmenuExtra', {fg=p.base05, bg=p.base01, attr=nil, sp=nil})
hi('PmenuExtraSel', {fg=p.base05, bg=p.base01, attr='reverse', sp=nil})
hi('PmenuKind', {fg=p.base05, bg=p.base01, attr=nil, sp=nil})
hi('PmenuKindSel', {fg=p.base05, bg=p.base01, attr='reverse', sp=nil})
hi('PmenuMatch', {fg=p.base05, bg=p.base01, attr='bold', sp=nil})
hi('PmenuMatchSel', {fg=p.base05, bg=p.base01, attr='bold,reverse', sp=nil})
hi('PmenuSbar', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('PmenuSel', {fg=p.base05, bg=p.base01, attr='reverse', sp=nil})
hi('PmenuThumb', {fg=nil, bg=p.base07, attr=nil, sp=nil})
hi('Question', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('QuickFixLine', {fg=nil, bg=p.base01, attr=nil, sp=nil})
hi('Search', {fg=p.base01, bg=p.base0A, attr=nil, sp=nil})
hi('SignColumn', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('SpecialKey', {fg=p.base03, bg=nil, attr=nil, sp=nil})
hi('SpellBad', {fg=nil, bg=nil, attr='undercurl', sp=p.base08})
hi('SpellCap', {fg=nil, bg=nil, attr='undercurl', sp=p.base0D})
hi('SpellLocal', {fg=nil, bg=nil, attr='undercurl', sp=p.base0C})
hi('SpellRare', {fg=nil, bg=nil, attr='undercurl', sp=p.base0E})
hi('StatusLine', {fg=p.base04, bg=p.base02, attr=nil, sp=nil})
hi('StatusLineNC', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('Substitute', {fg=p.base01, bg=p.base0A, attr=nil, sp=nil})
hi('TabLine', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('TabLineFill', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('TabLineSel', {fg=p.base0B, bg=p.base01, attr=nil, sp=nil})
hi('TermCursor', {fg=nil, bg=nil, attr='reverse', sp=nil})
hi('TermCursorNC', {fg=nil, bg=nil, attr='reverse', sp=nil})
hi('Title', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
hi('VertSplit', {fg=p.base02, bg=p.base02, attr=nil, sp=nil})
hi('Visual', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('VisualNOS', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('WarningMsg', {fg=p.base08, bg=nil, attr=nil, sp=nil})
hi('Whitespace', {fg=p.base03, bg=nil, attr=nil, sp=nil})
hi('WildMenu', {fg=p.base08, bg=p.base0A, attr=nil, sp=nil})
hi('WinBar', {fg=p.base04, bg=p.base02, attr=nil, sp=nil})
hi('WinBarNC', {fg=p.base03, bg=p.base01, attr=nil, sp=nil})
hi('WinSeparator', {fg=p.base02, bg=p.base02, attr=nil, sp=nil})
-- Standard syntax (affects treesitter)
hi('Boolean', {fg=p.base09, bg=nil, attr=nil, sp=nil})
@ -649,9 +656,10 @@ H.apply_palette = function(palette, use_cterm)
hi('@symbol', {fg=p.base0E, bg=nil, attr=nil, sp=nil})
hi('@variable', {fg=p.base05, bg=nil, attr=nil, sp=nil})
hi('@text.strong', {fg=nil, bg=nil, attr='bold', sp=nil})
hi('@text.emphasis', {fg=nil, bg=nil, attr='italic', sp=nil})
hi('@text.strike', {fg=nil, bg=nil, attr='strikethrough', sp=nil})
hi('@text.strong', {fg=nil, bg=nil, attr='bold', sp=nil})
hi('@text.emphasis', {fg=nil, bg=nil, attr='italic', sp=nil})
hi('@text.strike', {fg=nil, bg=nil, attr='strikethrough', sp=nil})
hi('@text.underline', {link='Underlined'})
-- Semantic tokens
if vim.fn.has('nvim-0.9') == 1 then
@ -669,8 +677,11 @@ H.apply_palette = function(palette, use_cterm)
-- Included only those differing from default links
hi('@markup.strong', {link='@text.strong'})
hi('@markup.italic', {link='@text.emphasis'})
hi('@markup.strikethrough', {link='@text.strikethrough'})
hi('@markup.strikethrough', {link='@text.strike'})
hi('@markup.underline', {link='@text.underline'})
hi('@string.special.vimdoc', {link='SpecialChar'})
hi('@variable.parameter.vimdoc', {fg=p.base09, bg=nil, attr=nil, sp=nil})
end
-- Plugins
@ -757,18 +768,19 @@ H.apply_palette = function(palette, use_cterm)
hi('MiniOperatorsExchangeFrom', {link='IncSearch'})
hi('MiniPickBorder', {link='NormalFloat'})
hi('MiniPickBorderBusy', {fg=p.base0E, bg=p.base01, attr=nil, sp=nil})
hi('MiniPickBorderText', {fg=p.base0D, bg=p.base01, attr='bold', sp=nil})
hi('MiniPickBorderBusy', {fg=p.base0E, bg=p.base01, attr=nil, sp=nil})
hi('MiniPickBorderText', {fg=p.base0D, bg=p.base01, attr='bold', sp=nil})
hi('MiniPickCursor', {fg=nil, bg=nil, attr='nocombine', sp=nil, blend=100})
hi('MiniPickIconDirectory', {link='Directory'})
hi('MiniPickIconFile', {fg=p.base05, bg=nil, attr=nil, sp=nil})
hi('MiniPickIconFile', {fg=p.base05, bg=nil, attr=nil, sp=nil})
hi('MiniPickHeader', {link='DiagnosticFloatingHint'})
hi('MiniPickMatchCurrent', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('MiniPickMatchMarked', {fg=nil, bg=p.base03, attr=nil, sp=nil})
hi('MiniPickMatchCurrent', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('MiniPickMatchMarked', {fg=nil, bg=p.base03, attr=nil, sp=nil})
hi('MiniPickMatchRanges', {link='DiagnosticFloatingHint'})
hi('MiniPickNormal', {link='NormalFloat'})
hi('MiniPickPreviewLine', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('MiniPickPreviewLine', {fg=nil, bg=p.base02, attr=nil, sp=nil})
hi('MiniPickPreviewRegion', {link='IncSearch'})
hi('MiniPickPrompt', {fg=p.base0B, bg=p.base01, attr=nil, sp=nil})
hi('MiniPickPrompt', {fg=p.base0B, bg=p.base01, attr=nil, sp=nil})
hi('MiniStarterCurrent', {fg=nil, bg=nil, attr=nil, sp=nil})
hi('MiniStarterFooter', {fg=p.base0D, bg=nil, attr=nil, sp=nil})
@ -995,6 +1007,13 @@ H.apply_palette = function(palette, use_cterm)
hi('SneakLabel', {fg=p.base00, bg=p.base0E, attr='bold', sp=nil})
end
-- 'kevinhwang91/nvim-bqf'
if H.has_integration('kevinhwang91/nvim-bqf') then
hi('BqfPreviewFloat', {link='NormalFloat'})
hi('BqfPreviewTitle', {fg=p.base0D, bg=p.base01, attr=nil, sp=nil})
hi('BqfSign', {fg=p.base0C, bg=p.base01, attr=nil, sp=nil})
end
-- 'kevinhwang91/nvim-ufo'
-- Everything works correctly out of the box
@ -1238,12 +1257,13 @@ H.highlight_gui = function(group, args)
command = string.format('highlight! link %s %s', group, args.link)
else
command = string.format(
'highlight %s guifg=%s guibg=%s gui=%s guisp=%s',
'highlight %s guifg=%s guibg=%s gui=%s guisp=%s blend=%s',
group,
args.fg or 'NONE',
args.bg or 'NONE',
args.attr or 'NONE',
args.sp or 'NONE'
args.sp or 'NONE',
args.blend or 'NONE'
)
end
vim.cmd(command)
@ -1255,7 +1275,7 @@ H.highlight_both = function(group, args)
command = string.format('highlight! link %s %s', group, args.link)
else
command = string.format(
'highlight %s guifg=%s ctermfg=%s guibg=%s ctermbg=%s gui=%s cterm=%s guisp=%s',
'highlight %s guifg=%s ctermfg=%s guibg=%s ctermbg=%s gui=%s cterm=%s guisp=%s blend=%s',
group,
args.fg and args.fg.gui or 'NONE',
args.fg and args.fg.cterm or 'NONE',
@ -1263,7 +1283,8 @@ H.highlight_both = function(group, args)
args.bg and args.bg.cterm or 'NONE',
args.attr or 'NONE',
args.attr or 'NONE',
args.sp and args.sp.gui or 'NONE'
args.sp and args.sp.gui or 'NONE',
args.blend or 'NONE'
)
end
vim.cmd(command)

View File

@ -708,10 +708,10 @@ end
-- Autocommands ---------------------------------------------------------------
H.apply_autocommands = function(config)
local augroup = vim.api.nvim_create_augroup('MiniBasicsAutocommands', {})
local gr = vim.api.nvim_create_augroup('MiniBasicsAutocommands', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
if config.autocommands.basic then

View File

@ -342,7 +342,7 @@ MiniBracketed.comment = function(direction, opts)
if opts.add_to_jumplist then H.add_to_jumplist() end
-- Apply. Open just enough folds and put cursor on first non-blank.
vim.api.nvim_win_set_cursor(0, { res_line_num, 0 })
H.set_cursor(res_line_num, 0)
vim.cmd('normal! zv^')
end
@ -404,7 +404,7 @@ MiniBracketed.conflict = function(direction, opts)
if opts.add_to_jumplist then H.add_to_jumplist() end
-- Apply. Open just enough folds and put cursor on first non-blank.
vim.api.nvim_win_set_cursor(0, { res_line_num, 0 })
H.set_cursor(res_line_num, 0)
vim.cmd('normal! zv^')
end
@ -643,7 +643,7 @@ MiniBracketed.indent = function(direction, opts)
if opts.add_to_jumplist then H.add_to_jumplist() end
-- Apply. Open just enough folds and put cursor on first non-blank.
vim.api.nvim_win_set_cursor(0, { res_line_num, 0 })
H.set_cursor(res_line_num, 0)
vim.cmd('normal! zv^')
end
@ -919,8 +919,7 @@ MiniBracketed.treesitter = function(direction, opts)
if opts.add_to_jumplist then H.add_to_jumplist() end
-- Apply
local row, col = res_node_pos.pos[1], res_node_pos.pos[2]
vim.api.nvim_win_set_cursor(0, { row + 1, col })
H.set_cursor(res_node_pos.pos[1] + 1, res_node_pos.pos[2])
end
--- Undo along a tracked linear history
@ -1136,12 +1135,9 @@ MiniBracketed.yank = function(direction, opts)
if H.is_disabled() then return end
H.validate_direction(direction, { 'first', 'backward', 'forward', 'last' }, 'yank')
opts = vim.tbl_deep_extend(
'force',
{ n_times = vim.v.count1, operators = { 'c', 'd', 'y' }, wrap = true },
H.get_config().yank.options,
opts or {}
)
-- NOTE: Don't use `tbl_deep_extend` to prefer full input `operators` array
local default_opts = { n_times = vim.v.count1, operators = { 'c', 'd', 'y' }, wrap = true }
opts = vim.tbl_extend('force', default_opts, H.get_config().yank.options, opts or {})
-- Update yank history data
local cache_yank, history = H.cache.yank, H.cache.yank.history
@ -1600,10 +1596,10 @@ end
H.get_suffix_variants = function(char) return char:lower(), char:upper() end
H.create_autocommands = function()
local augroup = vim.api.nvim_create_augroup('MiniBracketed', {})
local gr = vim.api.nvim_create_augroup('MiniBracketed', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
au('BufEnter', '*', H.track_oldfile, 'Track oldfile')
@ -1975,7 +1971,7 @@ end
H.region_delete = function(region, normal_fun)
-- Start with `to` to have cursor positioned on region start after deletion
vim.api.nvim_win_set_cursor(0, { region.to.line, region.to.col - 1 })
H.set_cursor(region.to.line, region.to.col - 1)
-- Do nothing more if region is empty (or leads to unnecessary line deletion)
local is_empty = region.from.line == region.to.line
@ -1986,7 +1982,7 @@ H.region_delete = function(region, normal_fun)
-- Select region in correct Visual mode
normal_fun(region.mode)
vim.api.nvim_win_set_cursor(0, { region.from.line, region.from.col - 1 })
H.set_cursor(region.from.line, region.from.col - 1)
-- Delete region in "black hole" register
-- - NOTE: it doesn't affect history as `"_` doesn't trigger `TextYankPost`
@ -2017,4 +2013,12 @@ end
H.add_to_jumplist = function() vim.cmd([[normal! m']]) end
H.set_cursor = function(row, col)
if row <= 0 then return vim.api.nvim_win_set_cursor(0, { 1, 0 }) end
local n_lines = vim.api.nvim_buf_line_count(0)
if n_lines < row then return vim.api.nvim_win_set_cursor(0, { n_lines, vim.fn.getline(n_lines):len() - 1 }) end
col = math.min(math.max(col, 0), vim.fn.getline(row):len())
return vim.api.nvim_win_set_cursor(0, { row, col })
end
return MiniBracketed

View File

@ -492,7 +492,7 @@ MiniClue.setup = function(config)
H.apply_config(config)
-- Define behavior
H.create_autocommands(config)
H.create_autocommands()
-- Create default highlighting
H.create_default_hl()
@ -1171,11 +1171,11 @@ H.is_disabled = function(buf_id)
return vim.g.miniclue_disable == true or buf_disable == true
end
H.create_autocommands = function(config)
local augroup = vim.api.nvim_create_augroup('MiniClue', {})
H.create_autocommands = function()
local gr = vim.api.nvim_create_augroup('MiniClue', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
-- Ensure buffer-local mappings for triggers are the latest ones to fully
@ -1195,6 +1195,7 @@ H.create_autocommands = function(config)
au('RecordingLeave', '*', MiniClue.enable_all_triggers, 'Enable all triggers')
au('VimResized', '*', H.window_update, 'Update window on resize')
au('ColorScheme', '*', H.create_default_hl, 'Ensure colors')
end
--stylua: ignore
@ -1557,6 +1558,7 @@ H.window_open = function(config)
local win_id = vim.api.nvim_open_win(H.state.buf_id, false, config)
vim.wo[win_id].foldenable = false
vim.wo[win_id].foldmethod = 'manual'
vim.wo[win_id].wrap = false
vim.wo[win_id].list = true
vim.wo[win_id].listchars = 'extends:…'

View File

@ -45,12 +45,25 @@
--- `<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({})`
@ -252,12 +265,10 @@ MiniCompletion.config = {
-- 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()`.
--minidoc_replace_start 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.
--minidoc_replace_start process_items = --<function: MiniCompletion.default_process_items>,
process_items = function(items, base)
local res = vim.tbl_filter(function(item)
-- Keep items which match the base and are not snippets
@ -265,8 +276,17 @@ MiniCompletion.config = {
return vim.startswith(text, base) and item.kind ~= 15
end, items)
res = vim.deepcopy(res)
table.sort(res, function(a, b) return (a.sortText or a.label) < (b.sortText or b.label) end)
-- Possibly add "kind" highlighting
if _G.MiniIcons ~= nil then
local add_kind_hlgroup = H.make_add_kind_hlgroup()
for _, item in ipairs(res) do
add_kind_hlgroup(item)
end
end
return res
end,
--minidoc_replace_end
@ -410,6 +430,11 @@ MiniCompletion.completefunc_lsp = function(findstart, base)
end
--- 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.
MiniCompletion.default_process_items = function(items, base)
return H.default_config.lsp_completion.process_items(items, base)
end
@ -550,10 +575,10 @@ H.apply_config = function(config)
end
H.create_autocommands = function(config)
local augroup = vim.api.nvim_create_augroup('MiniCompletion', {})
local gr = vim.api.nvim_create_augroup('MiniCompletion', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
au('InsertCharPre', '*', H.auto_completion, 'Auto show completion')
@ -570,7 +595,7 @@ H.create_autocommands = function(config)
au('BufEnter', '*', callback, 'Set completion function')
end
au('ColorScheme', '*', H.create_default_hl, 'Ensure proper colors')
au('ColorScheme', '*', H.create_default_hl, 'Ensure colors')
au('FileType', 'TelescopePrompt', function() vim.b.minicompletion_disable = true end, 'Disable locally')
end
@ -850,19 +875,19 @@ H.is_lsp_current = function(cache, id) return cache.lsp.id == id and cache.lsp.s
H.lsp_completion_response_items_to_complete_items = function(items, client_id)
if vim.tbl_count(items) == 0 then return {} end
local res = {}
local docs, info
local res, item_kinds = {}, vim.lsp.protocol.CompletionItemKind
for _, item in pairs(items) do
-- Documentation info
docs = item.documentation
info = H.table_get(docs, { 'value' })
local docs = item.documentation
local info = H.table_get(docs, { 'value' })
if not info and type(docs) == 'string' then info = docs end
info = info or ''
table.insert(res, {
word = H.get_completion_word(item),
abbr = item.label,
kind = vim.lsp.protocol.CompletionItemKind[item.kind] or 'Unknown',
kind = item_kinds[item.kind] or 'Unknown',
kind_hlgroup = item.kind_hlgroup,
menu = item.detail or '',
info = info,
icase = 1,
@ -874,6 +899,25 @@ H.lsp_completion_response_items_to_complete_items = function(items, client_id)
return res
end
H.make_add_kind_hlgroup = function()
-- Account for possible effect of `MiniIcons.tweak_lsp_kind()` which modifies
-- only array part of `CompletionItemKind` but not "map" part
if H.kind_map == nil then
-- Cache kind map so as to not recompute it each time (as it will be called
-- in performance sensitive context). Assumes `tweak_lsp_kind()` is called
-- right after `require('mini.icons').setup()`.
H.kind_map = {}
for k, v in pairs(vim.lsp.protocol.CompletionItemKind) do
if type(k) == 'string' and type(v) == 'number' then H.kind_map[v] = k end
end
end
return function(item)
local _, hl, is_default = _G.MiniIcons.get('lsp', H.kind_map[item.kind] or 'Unknown')
item.kind_hlgroup = not is_default and hl or nil
end
end
H.get_completion_word = function(item)
-- Completion word (textEdit.newText > insertText > label). This doesn't
-- support snippet expansion.
@ -1280,10 +1324,13 @@ H.floating_dimensions = function(lines, max_height, max_width)
end
H.open_action_window = function(cache, opts)
cache.win_id = vim.api.nvim_open_win(cache.bufnr, false, opts)
vim.api.nvim_win_set_option(cache.win_id, 'wrap', true)
vim.api.nvim_win_set_option(cache.win_id, 'linebreak', true)
vim.api.nvim_win_set_option(cache.win_id, 'breakindent', false)
local win_id = vim.api.nvim_open_win(cache.bufnr, false, opts)
vim.wo[win_id].breakindent = false
vim.wo[win_id].foldenable = false
vim.wo[win_id].foldmethod = 'manual'
vim.wo[win_id].linebreak = true
vim.wo[win_id].wrap = true
cache.win_id = win_id
end
H.close_action_window = function(cache, keep_timer)

View File

@ -157,17 +157,17 @@ H.apply_config = function(config)
end
H.create_autocommands = function()
local augroup = vim.api.nvim_create_augroup('MiniCursorword', {})
local gr = vim.api.nvim_create_augroup('MiniCursorword', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
au('CursorMoved', '*', H.auto_highlight, 'Auto highlight cursorword')
au({ 'InsertEnter', 'TermEnter', 'QuitPre' }, '*', H.auto_unhighlight, 'Auto unhighlight cursorword')
au('ModeChanged', '*:[^i]', H.auto_highlight, 'Auto highlight cursorword')
au('ColorScheme', '*', H.create_default_hl, 'Ensure proper colors')
au('ColorScheme', '*', H.create_default_hl, 'Ensure colors')
au('FileType', 'TelescopePrompt', function() vim.b.minicursorword_disable = true end, 'Disable locally')
end

View File

@ -366,6 +366,9 @@ MiniDeps.setup = function(config)
-- Apply config
H.apply_config(config)
-- Define behavior
H.create_autocommands()
-- Create default highlighting
H.create_default_hl()
@ -710,9 +713,11 @@ MiniDeps.get_session = function()
-- Add 'start/' plugins that are in 'rtp'. NOTE: not whole session concept is
-- built around presence in 'rtp' to 100% ensure to preserve the order in
-- which user called `add()`.
local start_path = H.get_package_path() .. '/pack/deps/start'
local start_path = H.full_path(H.get_package_path() .. '/pack/deps/start')
local pattern = string.format('^%s/([^/]+)$', vim.pesc(start_path))
for _, path in ipairs(vim.api.nvim_list_runtime_paths()) do
for _, runtime_path in ipairs(vim.api.nvim_list_runtime_paths()) do
-- Make sure plugin path is normalized (matters on Windows)
local path = H.full_path(runtime_path)
local name = string.match(path, pattern)
if name ~= nil then add_spec({ path = path, name = name, hooks = {}, depends = {} }) end
end
@ -818,6 +823,11 @@ H.get_config = function(config)
return vim.tbl_deep_extend('force', MiniDeps.config, vim.b.minideps_config or {}, config or {})
end
H.create_autocommands = function()
local gr = vim.api.nvim_create_augroup('MiniDeps', {})
vim.api.nvim_create_autocmd('ColorScheme', { group = gr, callback = H.create_default_hl, desc = 'Ensure colors' })
end
--stylua: ignore
H.create_default_hl = function()
local hi = function(name, opts)

View File

@ -981,16 +981,17 @@ H.apply_config = function(config)
end
H.create_autocommands = function()
local augroup = vim.api.nvim_create_augroup('MiniDiff', {})
local gr = vim.api.nvim_create_augroup('MiniDiff', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
-- NOTE: Try auto enabling buffer on every `BufEnter` to not have `:edit`
-- disabling buffer, as it calls `on_detach()` from buffer watcher
au('BufEnter', '*', H.auto_enable, 'Enable diff')
au('VimResized', '*', H.on_resize, 'Track Neovim resizing')
au('ColorScheme', '*', H.create_default_hl, 'Ensure colors')
end
--stylua: ignore

View File

@ -808,11 +808,11 @@ end
-- Default documentation targets ----------------------------------------------
H.default_input = function()
-- Search in current and recursively in other directories for files with
-- 'lua' extension
-- Search in current and recursively in other directories for Lua files
local res = {}
for _, dir_glob in ipairs({ '.', 'lua/**', 'after/**', 'colors/**' }) do
local files = vim.fn.globpath(dir_glob, '*.lua', false, true)
for _, dir in ipairs({ '.', 'lua', 'after', 'colors' }) do
local glob = (dir == '.' and '' or '**/') .. '*.lua'
local files = vim.fn.globpath(dir, glob, false, true)
-- Use full paths
files = vim.tbl_map(function(x) return vim.fn.fnamemodify(x, ':p') end, files)

View File

@ -64,6 +64,8 @@
--- - 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.
---@alias __extra_pickers_preserve_order - <preserve_order> `(boolean)` - whether to preserve original order
--- during query. Default: `false`.
---@alias __extra_pickers_git_path - <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|.
@ -324,12 +326,13 @@ MiniExtra.pickers = {}
--- Possible fields:
--- - <scope> `(string)` - one of "all" (normal listed buffers) or "current".
--- Default: "all".
--- __extra_pickers_preserve_order
---@param opts __extra_pickers_opts
---
---@return __extra_pickers_return
MiniExtra.pickers.buf_lines = function(local_opts, opts)
local pick = H.validate_pick('buf_lines')
local_opts = vim.tbl_deep_extend('force', { scope = 'all' }, local_opts or {})
local_opts = vim.tbl_deep_extend('force', { scope = 'all', preserve_order = false }, local_opts or {})
local scope = H.pick_validate_scope(local_opts, { 'all', 'current' }, 'buf_lines')
local is_scope_all = scope == 'all'
@ -352,9 +355,11 @@ MiniExtra.pickers.buf_lines = function(local_opts, opts)
if not poke_picker() then return end
H.buf_ensure_loaded(buf_id)
local buf_name = H.buf_get_name(buf_id) or ''
local n_digits = math.floor(math.log10(vim.api.nvim_buf_line_count(buf_id))) + 1
local format_pattern = '%s%' .. n_digits .. 'd\0%s'
for lnum, l in ipairs(vim.api.nvim_buf_get_lines(buf_id, 0, -1, false)) do
local prefix = is_scope_all and string.format('%s\0', buf_name) or ''
table.insert(items, { text = string.format('%s%s\0%s', prefix, lnum, l), bufnr = buf_id, lnum = lnum })
local prefix = is_scope_all and (buf_name .. '\0') or ''
table.insert(items, { text = format_pattern:format(prefix, lnum, l), bufnr = buf_id, lnum = lnum })
end
end
pick.set_picker_items(items)
@ -363,7 +368,10 @@ MiniExtra.pickers.buf_lines = function(local_opts, opts)
local show = H.pick_get_config().source.show
if is_scope_all and show == nil then show = H.show_with_icons end
return H.pick_start(items, { source = { name = string.format('Buffer lines (%s)', scope), show = show } }, opts)
local match_opts = { preserve_order = local_opts.preserve_order }
local match = function(stritems, inds, query) pick.default_match(stritems, inds, query, match_opts) end
local default_source = { name = string.format('Buffer lines (%s)', scope), show = show, match = match }
return H.pick_start(items, { source = default_source }, opts)
end
--- Neovim commands picker
@ -1089,7 +1097,7 @@ end
--- under cursor.
--- - `:Pick lsp scope='document_symbol'` - symbols in current file.
---
---@param local_opts table Options defining behavior of this particular picker.
---@param local_opts __extra_pickers_local_opts
--- Possible fields:
--- - <scope> `(string)` - LSP method to use. One of the supported ones (see
--- list above). Default: `nil` which means explicit scope is needed.
@ -1164,20 +1172,22 @@ end
--- Possible fields:
--- - <current_dir> `(boolean)` - whether to return files only from current
--- working directory and its subdirectories. Default: `false`.
--- __extra_pickers_preserve_order
---@param opts __extra_pickers_opts
---
---@return __extra_pickers_return
MiniExtra.pickers.oldfiles = function(local_opts, opts)
local pick = H.validate_pick('oldfiles')
local_opts = vim.tbl_deep_extend('force', { current_dir = false }, local_opts or {})
local_opts = vim.tbl_deep_extend('force', { current_dir = false, preserve_order = false }, local_opts or {})
local oldfiles = vim.v.oldfiles
if not H.islist(oldfiles) then H.error('`pickers.oldfiles` picker needs valid `v:oldfiles`.') end
local show_all = not local_opts.current_dir
local items = vim.schedule_wrap(function()
local cwd = pick.get_picker_opts().source.cwd .. '/'
local cwd = H.normalize_path(pick.get_picker_opts().source.cwd) .. '/'
local res = {}
for _, path in ipairs(oldfiles) do
path = H.normalize_path(path)
if vim.fn.filereadable(path) == 1 and (show_all or vim.startswith(path, cwd)) then
table.insert(res, H.short_path(path, cwd))
end
@ -1186,7 +1196,9 @@ MiniExtra.pickers.oldfiles = function(local_opts, opts)
end)
local show = H.pick_get_config().source.show or H.show_with_icons
return H.pick_start(items, { source = { name = 'Old files', show = show } }, opts)
local match_opts = { preserve_order = local_opts.preserve_order }
local match = function(stritems, inds, query) pick.default_match(stritems, inds, query, match_opts) end
return H.pick_start(items, { source = { name = 'Old files', show = show, match = match } }, opts)
end
--- Neovim options picker
@ -1398,8 +1410,7 @@ end
--- 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`.
--- __extra_pickers_preserve_order
--- - <recency_weight> `(number)` - forwarded to |MiniVisits.gen_sort.default()|.
--- Default: 0.5 to use "robust frecency" sorting.
--- - <sort> `(function)` - forwarded to |MiniVisits.list_paths()|.
@ -1419,28 +1430,20 @@ MiniExtra.pickers.visit_paths = function(local_opts, opts)
local cwd = local_opts.cwd or vim.fn.getcwd()
-- NOTE: Use separate cwd to allow `cwd = ''` to not mean "current directory"
local is_for_cwd = cwd ~= ''
local picker_cwd = cwd == '' and vim.fn.getcwd() or H.full_path(cwd)
local picker_cwd = H.normalize_path(cwd == '' and vim.fn.getcwd() or H.full_path(cwd))
-- Define source
local filter = local_opts.filter or visits.gen_filter.default()
local sort = local_opts.sort or visits.gen_sort.default({ recency_weight = local_opts.recency_weight })
local items = vim.schedule_wrap(function()
local paths = visits.list_paths(cwd, { filter = filter, sort = sort })
paths = vim.tbl_map(function(x) return H.short_path(x, picker_cwd) end, paths)
paths = vim.tbl_map(function(x) return H.normalize_path(H.short_path(x, picker_cwd)) end, paths)
pick.set_picker_items(paths)
end)
local show = H.pick_get_config().source.show or H.show_with_icons
local match
if local_opts.preserve_order then
match = function(stritems, inds, query)
-- Return makes call synchronous, but it shouldn't be too big problem
local res = pick.default_match(stritems, inds, query, true) or {}
table.sort(res)
return res
end
end
local match_opts = { preserve_order = local_opts.preserve_order }
local match = function(stritems, inds, query) pick.default_match(stritems, inds, query, match_opts) end
local name = string.format('Visit paths (%s)', is_for_cwd and 'cwd' or 'all')
local default_source = { name = name, cwd = picker_cwd, match = match, show = show }
@ -1488,7 +1491,7 @@ MiniExtra.pickers.visit_labels = function(local_opts, opts)
local cwd = local_opts.cwd or vim.fn.getcwd()
-- NOTE: Use separate cwd to allow `cwd = ''` to not mean "current directory"
local is_for_cwd = cwd ~= ''
local picker_cwd = cwd == '' and vim.fn.getcwd() or H.full_path(cwd)
local picker_cwd = H.normalize_path(cwd == '' and vim.fn.getcwd() or H.full_path(cwd))
local filter = local_opts.filter or visits.gen_filter.default()
local items = visits.list_labels(local_opts.path, local_opts.cwd, { filter = filter })
@ -1499,7 +1502,7 @@ MiniExtra.pickers.visit_labels = function(local_opts, opts)
return filter(path_data) and type(path_data.labels) == 'table' and path_data.labels[label]
end
local all_paths = visits.list_paths(local_opts.cwd, { filter = new_filter, sort = local_opts.sort })
return vim.tbl_map(function(path) return H.short_path(path, picker_cwd) end, all_paths)
return vim.tbl_map(function(x) return H.normalize_path(H.short_path(x, picker_cwd)) end, all_paths)
end
local preview = function(buf_id, label) vim.api.nvim_buf_set_lines(buf_id, 0, -1, false, list_label_paths(label)) end
@ -1539,6 +1542,9 @@ H.ns_id = {
-- Various cache
H.cache = {}
-- File system information
H.is_windows = vim.loop.os_uname().sysname == 'Windows_NT'
-- Helper functionality =======================================================
-- Settings -------------------------------------------------------------------
H.setup_config = function(config) end
@ -1836,13 +1842,22 @@ H.lsp_make_on_list = function(source, opts)
add_decor_data = function(item)
if type(item.kind) ~= 'string' then return end
local icon, hl = MiniIcons.get('lsp', item.kind)
item.text, item.hl = icon .. ' ' .. item.text, hl
-- If kind is not original, assume it already contains an icon
local icon_prefix = item.kind_orig == item.kind and (icon .. ' ') or ''
item.text, item.hl = icon_prefix .. item.text, hl
end
end
local process = function(items)
if source ~= 'document_symbol' then items = vim.tbl_map(H.pick_prepend_position, items) end
vim.tbl_map(add_decor_data, items)
-- Input `item.kind` is a string (resolved before `on_list`). Account for
-- possibly tweaked symbol map (like after `MiniIcons.tweak_lsp_kind`).
local kind_map = H.get_symbol_kind_map()
for _, item in ipairs(items) do
item.kind_orig, item.kind = item.kind, kind_map[item.kind]
add_decor_data(item)
item.kind_orig = nil
end
table.sort(items, H.lsp_items_compare)
return items
end
@ -1875,6 +1890,17 @@ H.lsp_make_on_list = function(source, opts)
end
end
H.get_symbol_kind_map = function()
-- Compute symbol kind map from "resolved" string kind to its "original" (as in
-- LSP protocol). Those can be different after `MiniIcons.tweak_lsp_kind()`.
local res = {}
local double_map = vim.lsp.protocol.SymbolKind
for k, v in pairs(double_map) do
if type(k) == 'string' and type(v) == 'number' then res[double_map[v]] = k end
end
return res
end
H.lsp_items_compare = function(a, b)
local a_path, b_path = a.path or '', b.path or ''
if a_path < b_path then return true end
@ -2040,13 +2066,17 @@ H.ensure_text_width = function(text, width)
end
H.full_path = function(path) return (vim.fn.fnamemodify(path, ':p'):gsub('(.)/$', '%1')) end
H.normalize_path = function(path) return path end
if H.is_windows then
H.full_path = function(path) return (vim.fn.fnamemodify(path, ':p'):gsub('(.)[\\/]$', '%1')) end
H.normalize_path = function(path) return path:gsub('\\', '/') end
end
H.short_path = function(path, cwd)
cwd = cwd or vim.fn.getcwd()
-- Ensure `cwd` is treated as directory path (to not match similar prefix)
cwd = cwd:sub(-1) == '/' and cwd or (cwd .. '/')
if not vim.startswith(path, cwd) then return vim.fn.fnamemodify(path, ':~') end
local res = path:sub(cwd:len() + 1):gsub('^/+', ''):gsub('/+$', '')
return res
return vim.startswith(path, cwd) and path:sub(cwd:len() + 1) or vim.fn.fnamemodify(path, ':~')
end
-- TODO: Remove after compatibility with Neovim=0.9 is dropped

File diff suppressed because it is too large Load Diff

View File

@ -300,7 +300,8 @@ MiniGit.config = {
--- 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.
@ -309,17 +310,22 @@ MiniGit.config = {
--- - __git_split_field
--- - Fields appropriate for forwarding to other functions.
MiniGit.show_at_cursor = function(opts)
local exec = MiniGit.config.job.git_executable
local cwd = H.get_git_cwd()
-- Try showing commit data at cursor
local commit, cwd
if vim.bo.filetype == 'minideps-confirm' then
commit, cwd = H.deps_pos_to_source()
else
local cword = vim.fn.expand('<cword>')
local is_commit = string.find(cword, '^%x%x%x%x%x%x%x+$') ~= nil and string.lower(cword) == cword
commit = is_commit and cword or nil
cwd = is_commit and H.get_git_cwd() or nil
end
-- Try showing commit at cursor
local cword = vim.fn.expand('<cword>')
local is_commit = string.find(cword, '^%x%x%x%x%x%x%x+$') ~= nil and string.lower(cword) == cword
if is_commit then
if commit ~= nil and cwd ~= nil then
local split = H.normalize_split_opt((opts or {}).split or 'auto', 'opts.split')
local args = { 'show', cword }
local args = { 'show', '--stat', '--patch', commit }
local lines = H.git_cli_output(args, cwd)
if #lines == 0 then return H.notify('Can not show commit ' .. cword, 'WARN') end
if #lines == 0 then return H.notify('Can not show commit ' .. commit .. ' in repo ' .. cwd, 'WARN') end
H.show_in_split(split, lines, 'show', table.concat(args, ' '))
vim.bo.filetype = 'git'
return
@ -432,11 +438,12 @@ MiniGit.show_range_history = function(opts)
-- Construct `:Git log` command that works both with regular files and
-- buffers from `show_diff_source()`
local buf_name = vim.api.nvim_buf_get_name(0)
local cwd = H.get_git_cwd()
local buf_name, cwd = vim.api.nvim_buf_get_name(0), H.get_git_cwd()
local commit, rel_path = H.parse_diff_source_buf_name(buf_name)
if commit == nil then
commit, rel_path = 'HEAD', buf_name:gsub(vim.pesc(cwd) .. '/', '')
commit = 'HEAD'
local cwd_pattern = '^' .. vim.pesc(cwd:gsub('\\', '/')) .. '/'
rel_path = buf_name:gsub('\\', '/'):gsub(cwd_pattern, '')
end
-- Ensure no uncommitted changes as they might result into improper `-L` arg
@ -642,10 +649,10 @@ end
H.apply_config = function(config) MiniGit.config = config end
H.create_autocommands = function()
local augroup = vim.api.nvim_create_augroup('MiniGit', {})
local gr = vim.api.nvim_create_augroup('MiniGit', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
-- NOTE: Try auto enabling buffer on every `BufEnter` to not have `:edit`
@ -1566,6 +1573,29 @@ end
H.parse_diff_source_buf_name = function(buf_name) return string.match(buf_name, '^minigit://%d+/.*show (%x+~?):(.*)$') end
H.deps_pos_to_source = function()
local lines = vim.api.nvim_buf_get_lines(0, 0, vim.fn.line('.'), false)
-- Do nothing if on the title (otherwise it operates on previous plugin info)
if lines[#lines]:find('^[%+%-!]') ~= nil then return end
-- Locate lines with commit and repo path data
local commit, commit_lnum = nil, #lines
while commit == nil and commit_lnum >= 1 do
local l = lines[commit_lnum]
commit = l:match('^[><] (%x%x%x%x%x%x%x%x*) |') or l:match('^State[^:]*: %s*(%x+)')
commit_lnum = commit_lnum - 1
end
local cwd, cwd_lnum = nil, #lines
while cwd == nil and cwd_lnum >= 1 do
cwd, cwd_lnum = lines[cwd_lnum]:match('^Path: %s*(%S+)$'), cwd_lnum - 1
end
-- Do nothing if something is not found or path corresponds to next repo
if commit == nil or cwd == nil or commit_lnum <= cwd_lnum then return end
return commit, cwd
end
-- Folding --------------------------------------------------------------------
H.is_hunk_header = function(lnum) return vim.fn.getline(lnum):find('^@@.*@@') ~= nil end

View File

@ -699,13 +699,14 @@ end
H.apply_config = function(config) MiniHipatterns.config = config end
H.create_autocommands = function()
local augroup = vim.api.nvim_create_augroup('MiniHipatterns', {})
local gr = vim.api.nvim_create_augroup('MiniHipatterns', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
au('BufEnter', '*', H.auto_enable, 'Enable highlighting')
au('ColorScheme', '*', H.create_default_hl, 'Ensure colors')
au('ColorScheme', '*', H.on_colorscheme, 'Reload all enabled pattern highlighters')
end

View File

@ -49,6 +49,7 @@
--- - 'HiPhish/rainbow-delimiters.nvim'
--- - 'hrsh7th/nvim-cmp'
--- - 'justinmk/vim-sneak'
--- - 'kevinhwang91/nvim-bqf'
--- - 'kevinhwang91/nvim-ufo'
--- - 'lewis6991/gitsigns.nvim'
--- - 'lukas-reineke/indent-blankline.nvim'
@ -477,14 +478,16 @@ MiniHues.apply_palette = function(palette, plugins)
hi('Normal', { fg=p.fg, bg=p.bg })
hi('NormalFloat', { fg=p.fg, bg=p.bg_edge })
hi('NormalNC', { link='Normal' })
hi('PMenu', { fg=p.fg, bg=p.bg_mid })
hi('PMenuExtra', { link='PMenu' })
hi('PMenuExtraSel', { link='PMenuSel' })
hi('PMenuKind', { link='PMenu' })
hi('PMenuKindSel', { link='PMenuSel' })
hi('PMenuSbar', { link='PMenu' })
hi('PMenuSel', { fg=p.bg, bg=p.fg, blend=0 })
hi('PMenuThumb', { fg=nil, bg=p.bg_mid2 })
hi('Pmenu', { fg=p.fg, bg=p.bg_mid })
hi('PmenuExtra', { link='Pmenu' })
hi('PmenuExtraSel', { link='PmenuSel' })
hi('PmenuKind', { link='Pmenu' })
hi('PmenuKindSel', { link='PmenuSel' })
hi('PmenuMatch', { fg=p.fg, bg=p.bg_mid, bold=true })
hi('PmenuMatchSel', { fg=nil, bg=nil, bold=true, blend=0, reverse=true })
hi('PmenuSbar', { link='Pmenu' })
hi('PmenuSel', { fg=nil, bg=nil, blend=0, reverse=true })
hi('PmenuThumb', { fg=nil, bg=p.bg_mid2 })
hi('Question', { fg=p.azure, bg=nil })
hi('QuickFixLine', { fg=nil, bg=nil, bold=true })
hi('Search', { fg=p.bg, bg=p.accent })
@ -508,7 +511,7 @@ MiniHues.apply_palette = function(palette, plugins)
hi('VisualNOS', { fg=nil, bg=p.bg_mid })
hi('WarningMsg', { fg=p.yellow, bg=nil })
hi('Whitespace', { fg=p.bg_mid2, bg=nil })
hi('WildMenu', { link='PMenuSel' })
hi('WildMenu', { link='PmenuSel' })
hi('WinBar', { link='StatusLine' })
hi('WinBarNC', { link='StatusLineNC' })
hi('WinSeparator', { fg=p.accent, bg=nil })
@ -749,6 +752,7 @@ MiniHues.apply_palette = function(palette, plugins)
hi('@string.special.symbol', { link='@constant' })
hi('@string.special.path', { link='Directory' })
hi('@string.special.url', { link='@markup.link.url' })
hi('@string.special.vimdoc', { link='@constant' })
-- @character
-- @character.special
@ -807,7 +811,7 @@ MiniHues.apply_palette = function(palette, plugins)
hi('@markup.strong', { link='@text.strong' })
hi('@markup.italic', { link='@text.emphasis' })
hi('@markup.strikethrough', { link='@text.strikethrough' })
hi('@markup.strikethrough', { link='@text.strike' })
hi('@markup.underline', { link='@text.underline' })
hi('@markup.heading', { link='@text.title' })
@ -922,6 +926,7 @@ MiniHues.apply_palette = function(palette, plugins)
hi('MiniPickBorder', { link='FloatBorder' })
hi('MiniPickBorderBusy', { link='DiagnosticFloatingWarn' })
hi('MiniPickBorderText', { link='FloatTitle' })
hi('MiniPickCursor', { blend=100, nocombine=true })
hi('MiniPickIconDirectory', { link='Directory' })
hi('MiniPickIconFile', { link='MiniPickNormal' })
hi('MiniPickHeader', { link='DiagnosticFloatingHint' })
@ -1146,6 +1151,13 @@ MiniHues.apply_palette = function(palette, plugins)
hi('SneakLabel', { fg=p.bg, bg=p.orange, bold=true })
end
-- 'kevinhwang91/nvim-bqf'
if has_integration('kevinhwang91/nvim-bqf') then
hi('BqfPreviewFloat', { link='NormalFloat' })
hi('BqfPreviewTitle', { link='FloatTitle' })
hi('BqfSign', { fg=p.cyan })
end
-- 'kevinhwang91/nvim-ufo'
-- Everything works correctly out of the box

View File

@ -194,6 +194,9 @@ MiniIcons.setup = function(config)
-- Apply config
H.apply_config(config)
-- Define behavior
H.create_autocommands()
-- Create default highlighting
H.create_default_hl()
end
@ -1937,6 +1940,11 @@ H.apply_config = function(config)
H.init_cache(config)
end
H.create_autocommands = function()
local gr = vim.api.nvim_create_augroup('MiniIcons', {})
vim.api.nvim_create_autocmd('ColorScheme', { group = gr, callback = H.create_default_hl, desc = 'Ensure colors' })
end
--stylua: ignore
H.create_default_hl = function()
local hi = function(name, opts)
@ -2035,7 +2043,7 @@ H.get_impl = {
-- Built-in extensions
local icon_data = H.extension_icons[name]
if type(icon_data) == 'string' then return MiniIcons.get('filetype', icon_data) end
if icon_data ~= nil then return icon_data, icon_data.hl end
if icon_data ~= nil then return icon_data end
-- Parts of complex extension (if can be recognized)
local dot = string.find(name, '%..')
@ -2058,7 +2066,8 @@ H.get_impl = {
-- Built-in file names
local icon_data = H.file_icons[basename]
if type(icon_data) == 'string' then return MiniIcons.get('filetype', icon_data) end
if icon_data ~= nil then return icon_data end
-- - Style icon based on the basename and not full name
if icon_data ~= nil then return H.style_icon(icon_data.glyph, basename), icon_data.hl end
-- Basename extensions. Prefer this before `vim.filetype.match()` for speed
-- (as the latter is slow-ish; like 0.1 ms in Neovim<0.11)

View File

@ -660,24 +660,18 @@ H.apply_config = function(config)
end
H.create_autocommands = function()
local augroup = vim.api.nvim_create_augroup('MiniIndentscope', {})
local gr = vim.api.nvim_create_augroup('MiniIndentscope', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
au(
{ 'CursorMoved', 'CursorMovedI', 'ModeChanged' },
'*',
function() H.auto_draw({ lazy = true }) end,
'Auto draw indentscope lazily'
)
au(
{ 'TextChanged', 'TextChangedI', 'TextChangedP', 'WinScrolled' },
'*',
function() H.auto_draw() end,
'Auto draw indentscope'
)
local lazy_events = { 'CursorMoved', 'CursorMovedI', 'ModeChanged' }
au(lazy_events, '*', function() H.auto_draw({ lazy = true }) end, 'Auto draw indentscope lazily')
local now_events = { 'TextChanged', 'TextChangedI', 'TextChangedP', 'WinScrolled' }
au(now_events, '*', function() H.auto_draw() end, 'Auto draw indentscope')
au('ColorScheme', '*', H.create_default_hl, 'Ensure colors')
end
--stylua: ignore
@ -947,7 +941,9 @@ H.make_draw_function = function(indicator, opts)
virt_text_pos = 'overlay',
}
if H.has_wrapped_virt_text and vim.wo.breakindent then extmark_opts.virt_text_repeat_linebreak = true end
if H.has_wrapped_virt_text and vim.wo.breakindent and vim.wo.showbreak == '' then
extmark_opts.virt_text_repeat_linebreak = true
end
local current_event_id = opts.event_id

View File

@ -337,14 +337,15 @@ H.apply_config = function(config)
end
H.create_autocommands = function()
local augroup = vim.api.nvim_create_augroup('MiniJump', {})
local gr = vim.api.nvim_create_augroup('MiniJump', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
au('CursorMoved', '*', H.on_cursormoved, 'On CursorMoved')
au({ 'BufLeave', 'InsertEnter' }, '*', MiniJump.stop_jumping, 'Stop jumping')
au('ColorScheme', '*', H.create_default_hl, 'Ensure colors')
end
H.create_default_hl = function() vim.api.nvim_set_hl(0, 'MiniJump', { default = true, link = 'SpellRare' }) end

View File

@ -721,10 +721,10 @@ H.apply_config = function(config)
end
H.create_autocommands = function(config)
local augroup = vim.api.nvim_create_augroup('MiniJump2d', {})
local gr = vim.api.nvim_create_augroup('MiniJump2d', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { pattern = pattern, group = augroup, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { pattern = pattern, group = gr, callback = callback, desc = desc })
end
-- Corrections for default `<CR>` mapping to not interfere with popular usages
@ -734,8 +734,7 @@ H.create_autocommands = function(config)
au('CmdwinEnter', '*', revert_cr, 'Revert <CR>')
end
-- Ensure proper colors
au('ColorScheme', '*', H.create_default_hl, 'Ensure proper colors')
au('ColorScheme', '*', H.create_default_hl, 'Ensure colors')
end
--stylua: ignore

View File

@ -1034,10 +1034,10 @@ end
H.apply_config = function(config) MiniMap.config = config end
H.create_autocommands = function()
local augroup = vim.api.nvim_create_augroup('MiniMap', {})
local gr = vim.api.nvim_create_augroup('MiniMap', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
au({ 'BufEnter', 'BufWritePost', 'TextChanged', 'VimResized' }, '*', H.on_content_change, 'On content change')
@ -1045,6 +1045,7 @@ H.create_autocommands = function()
au('WinLeave', '*', H.on_winleave, 'On WinLeave')
au('WinClosed', '*', H.on_winclosed, 'On WinClosed')
au('ModeChanged', '*:n', H.on_content_change, 'On return to Normal mode')
au('ColorScheme', '*', H.create_default_hl, 'Ensure colors')
end
--stylua: ignore
@ -1395,7 +1396,7 @@ H.create_map_buffer = function()
local buf_id = vim.api.nvim_create_buf(false, true)
-- Set buffer local options (which don't involve `noautocmd`)
vim.api.nvim_buf_set_option(buf_id, 'filetype', 'minimap')
vim.bo[buf_id].filetype = 'minimap'
-- Make buffer local mappings
vim.keymap.set('n', '<CR>', '<Cmd>lua MiniMap.toggle_focus(false)<CR>', { buffer = buf_id })

View File

@ -272,7 +272,7 @@ MiniMisc.find_root = function(buf_id, names, fallback)
-- Use absolute path to an existing directory
if type(res) ~= 'string' then return end
res = vim.fn.fnamemodify(res, ':p')
res = H.fs_normalize(vim.fn.fnamemodify(res, ':p'))
if vim.fn.isdirectory(res) == 0 then return end
-- Cache result per directory path
@ -286,19 +286,34 @@ H.root_cache = {}
--- 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_termbg_sync = function()
if vim.fn.has('nvim-0.10') == 0 then
-- Handling `'\027]11;?\007'` response was added in Neovim 0.10
H.notify('`setup_termbg_sync()` requires Neovim>=0.10', 'WARN')
return
end
-- Proceed only if there is a valid stdout to use
local has_stdout_tty = false
for _, ui in ipairs(vim.api.nvim_list_uis()) do
has_stdout_tty = has_stdout_tty or ui.stdout_tty
end
if not has_stdout_tty then return end
local augroup = vim.api.nvim_create_augroup('MiniMiscTermbgSync', { clear = true })
local f = function(args)
local ok, bg_init = pcall(H.parse_osc11, args.data)
@ -311,14 +326,16 @@ MiniMisc.setup_termbg_sync = function()
local sync = function()
local normal = vim.api.nvim_get_hl_by_name('Normal', true)
if normal.background == nil then return end
io.write(string.format('\027]11;#%06x\007', normal.background))
-- NOTE: use `io.stdout` instead of `io.write` to ensure correct target
-- Otherwise after `io.output(file); file:close()` there is an error
io.stdout:write(string.format('\027]11;#%06x\007', normal.background))
end
vim.api.nvim_create_autocmd({ 'UIEnter', 'ColorScheme' }, { group = augroup, callback = sync })
vim.api.nvim_create_autocmd({ 'VimResume', 'ColorScheme' }, { group = augroup, callback = sync })
-- Set up reset to the color returned from the very first call
H.termbg_init = H.termbg_init or bg_init
local reset = function() io.write('\027]11;' .. H.termbg_init .. '\007') end
vim.api.nvim_create_autocmd({ 'UILeave' }, { group = augroup, callback = reset })
local reset = function() io.stdout:write('\027]11;' .. H.termbg_init .. '\007') end
vim.api.nvim_create_autocmd({ 'VimLeavePre', 'VimSuspend' }, { group = augroup, callback = reset })
-- Sync immediately
sync()
@ -326,7 +343,7 @@ MiniMisc.setup_termbg_sync = function()
-- Ask about current background color and process the response
local id = vim.api.nvim_create_autocmd('TermResponse', { group = augroup, callback = f, once = true, nested = true })
io.write('\027]11;?\007')
io.stdout:write('\027]11;?\007')
vim.defer_fn(function()
local ok = pcall(vim.api.nvim_del_autocmd, id)
if ok then H.notify('`setup_termbg_sync()` did not get response from terminal emulator', 'WARN') end
@ -553,8 +570,7 @@ MiniMisc.use_nested_comments = function(buf_id)
local leader = vim.trim(comment_parts[1])
local comments = vim.bo[buf_id].comments
local new_comments = string.format('n:%s,%s', leader, comments)
vim.api.nvim_buf_set_option(buf_id, 'comments', new_comments)
vim.bo[buf_id].comments = string.format('n:%s,%s', leader, comments)
end
--- Zoom in and out of a buffer, making it full screen in a floating window
@ -594,7 +610,9 @@ H.setup_config = function(config)
-- General idea: if some table elements are not present in user-supplied
-- `config`, take them from default config
vim.validate({ config = { config, 'table', true } })
config = vim.tbl_deep_extend('force', vim.deepcopy(H.default_config), config or {})
-- NOTE: Don't use `tbl_deep_extend` to prefer full input `make_global` array
-- Needs adjusting if there is a new setting with nested tables
config = vim.tbl_extend('force', vim.deepcopy(H.default_config), config or {})
vim.validate({
make_global = {
@ -639,6 +657,11 @@ H.is_number = function(x) return type(x) == 'number' end
H.is_string = function(x) return type(x) == 'string' end
H.fs_normalize = vim.fs.normalize
if vim.fn.has('nvim-0.9') == 0 then
H.fs_normalize = function(...) return vim.fs.normalize(...):gsub('(.)/+$', '%1') end
end
-- TODO: Remove after compatibility with Neovim=0.9 is dropped
H.islist = vim.fn.has('nvim-0.10') == 1 and vim.islist or vim.tbl_islist

View File

@ -189,6 +189,12 @@ MiniMove.move_selection = function(direction, opts)
local dir_type = (direction == 'up' or direction == 'down') and 'vert' or 'hori'
local is_linewise = cur_mode == 'V'
-- Make early return in small buffer
if vim.api.nvim_buf_line_count(0) == 1 then
if is_linewise and dir_type == 'vert' then return end
if not is_linewise and vim.fn.getline(1):len() == 0 then return end
end
-- Cache useful data because it will be reset when executing commands
local n_times = opts.n_times or vim.v.count1
local ref_curpos, ref_last_col = vim.fn.getcurpos(), vim.fn.col('$')
@ -222,8 +228,9 @@ MiniMove.move_selection = function(direction, opts)
if not cache_virtualedit:find('all') then vim.o.virtualedit = 'onemore' end
-- Cut selection while saving caching register
local cache_z_reg = vim.fn.getreg('z')
cmd('"zx')
local cache_z_reg = vim.fn.getreginfo('z')
-- - Don't use `"zx` directly to not affect registers 1-9
cmd('"zygv"_x')
-- Detect edge selection: last line(s) for vertical and last character(s)
-- for horizontal. At this point (after cutting selection) cursor is on the
@ -310,6 +317,7 @@ end
---@param opts __move_opts
MiniMove.move_line = function(direction, opts)
if H.is_disabled() or not vim.o.modifiable then return end
if vim.api.nvim_buf_line_count(0) == 1 and (direction == 'down' or direction == 'up') then return end
opts = vim.tbl_deep_extend('force', H.get_config().options, opts or {})
@ -340,9 +348,10 @@ MiniMove.move_line = function(direction, opts)
return
end
-- Cut curre lint while saving caching register
local cache_z_reg = vim.fn.getreg('z')
cmd('"zdd')
-- Cut current line while saving caching register
local cache_z_reg = vim.fn.getreginfo('z')
-- - Don't use `"zdd` directly to not affect registers 1-9
cmd('"zyy"_dd')
-- Move cursor
local paste_key = direction == 'up' and 'P' or 'p'
@ -457,7 +466,7 @@ H.make_cmd_normal = function(include_undojoin)
-- Disable 'mini.bracketed' to avoid unwanted entries to its yank history
local cache_minibracketed_disable = vim.b.minibracketed_disable
local cache_unnamed_register = vim.fn.getreg('"')
local cache_unnamed_register = { points_to = vim.fn.getreginfo('"').points_to }
-- Don't track possible put commands into yank history
vim.b.minibracketed_disable = true

View File

@ -105,7 +105,7 @@ MiniNotify.setup = function(config)
H.apply_config(config)
-- Define behavior
H.create_autocommands(config)
H.create_autocommands()
-- Create default highlighting
H.create_default_hl()
@ -596,14 +596,15 @@ H.apply_config = function(config)
end
end
H.create_autocommands = function(config)
local augroup = vim.api.nvim_create_augroup('MiniNotify', {})
H.create_autocommands = function()
local gr = vim.api.nvim_create_augroup('MiniNotify', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
au({ 'TabEnter', 'VimResized' }, '*', function() MiniNotify.refresh() end, 'Refresh notifications')
au('ColorScheme', '*', H.create_default_hl, 'Ensure colors')
end
--stylua: ignore
@ -741,9 +742,10 @@ H.window_open = function(buf_id)
local win_id = vim.api.nvim_open_win(buf_id, false, config)
vim.wo[win_id].foldenable = false
vim.wo[win_id].wrap = true
vim.wo[win_id].foldmethod = 'manual'
vim.wo[win_id].winblend = H.get_config().window.winblend
vim.wo[win_id].winhighlight = 'NormalFloat:MiniNotifyNormal,FloatBorder:MiniNotifyBorder,FloatTitle:MiniNotifyTitle'
vim.wo[win_id].wrap = true
return win_id
end

View File

@ -182,6 +182,9 @@ MiniOperators.setup = function(config)
-- Apply config
H.apply_config(config)
-- Define behavior
H.create_autocommands()
-- Create default highlighting
H.create_default_hl()
end
@ -742,6 +745,11 @@ H.get_config = function(config)
return vim.tbl_deep_extend('force', MiniOperators.config, vim.b.minioperators_config or {}, config or {})
end
H.create_autocommands = function()
local gr = vim.api.nvim_create_augroup('MiniOperators', {})
vim.api.nvim_create_autocmd('ColorScheme', { group = gr, callback = H.create_default_hl, desc = 'Ensure colors' })
end
H.create_default_hl = function()
vim.api.nvim_set_hl(0, 'MiniOperatorsExchangeFrom', { default = true, link = 'IncSearch' })
end
@ -997,7 +1005,7 @@ H.replace_do = function(data)
local edge_to_col = vim.fn.col({ to_line, '$' }) - 1 - (vim.o.selection == 'exclusive' and 0 or 1)
local is_edge_line = submode == 'V' and to_line == vim.fn.line('$')
local is_edge_col = submode ~= 'V' and to_col == edge_to_col
local is_edge_col = submode ~= 'V' and to_col == edge_to_col and vim.o.virtualedit ~= 'all'
local is_edge = is_edge_line or is_edge_col
local covers_linewise_all_buffer = is_edge_line and from_line == 1

View File

@ -494,10 +494,10 @@ H.apply_config = function(config)
end
H.create_autocommands = function()
local augroup = vim.api.nvim_create_augroup('MiniPairs', {})
local gr = vim.api.nvim_create_augroup('MiniPairs', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
au('FileType', { 'TelescopePrompt', 'fzf' }, function() vim.b.minipairs_disable = true end, 'Disable locally')

View File

@ -117,6 +117,7 @@
--- * `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.
@ -692,7 +693,7 @@ MiniPick.setup = function(config)
H.apply_config(config)
-- Define behavior
H.create_autocommands(config)
H.create_autocommands()
-- Create default highlighting
H.create_default_hl()
@ -704,7 +705,7 @@ MiniPick.setup = function(config)
local paste_orig = vim.paste
vim.paste = function(...)
if not MiniPick.is_picker_active() then return paste_orig(...) end
vim.notify('(mini.pick) Use `mappings.paste` (`<C-r>` by default) with "*" or "+" register.', vim.log.levels.HINT)
H.notify('Use `mappings.paste` (`<C-r>` by default) with "*" or "+" register.', 'HINT')
end
end
@ -975,20 +976,35 @@ end
---@param 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.
---@param query table Array of strings.
---@param do_sync boolean|nil Whether to match synchronously. Default: `nil`.
---@param 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):
---@return 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.
MiniPick.default_match = function(stritems, inds, query, do_sync)
local is_sync = do_sync or not MiniPick.is_picker_active()
MiniPick.default_match = function(stritems, inds, query, opts)
-- TODO: Remove after mini.nvim 0.14 release
if opts and type(opts) ~= 'table' then
if not H.notified_match_opts then
local msg = 'Use `{ sync = true }` as fourth argument to `default_match`.'
.. " Current code will not work after the next 'mini.nvim' release."
H.notify(msg, 'WARN')
H.notified_match_opts = true
end
opts = { sync = true }
end
opts = opts or {}
local is_sync = opts.sync or not MiniPick.is_picker_active()
local set_match_inds = is_sync and function(x) return x end or MiniPick.set_picker_match_inds
local f = function()
if #query == 0 then return set_match_inds(H.seq_along(stritems)) end
local match_data, match_type = H.match_filter(inds, stritems, query)
if match_data == nil then return end
if match_type == 'nosort' then return set_match_inds(H.seq_along(stritems)) end
if match_type == 'useall' then return set_match_inds(H.seq_along(stritems)) end
if opts.preserve_order then return set_match_inds(H.match_no_sort(match_data)) end
local match_inds = H.match_sort(match_data)
if match_inds == nil then return end
return set_match_inds(match_inds)
@ -1163,8 +1179,7 @@ MiniPick.default_choose_marked = function(items, opts)
for _, item in ipairs(items) do
local item_data = H.parse_item(item)
if item_data.type == 'file' or item_data.type == 'buffer' or item_data.type == 'uri' then
local is_uri, uri_path = pcall(vim.uri_to_fname, item_data.path)
local entry = { bufnr = item_data.buf_id, filename = is_uri and uri_path or item_data.path }
local entry = { bufnr = item_data.buf_id, filename = H.parse_uri(item_data.path) or item_data.path }
entry.lnum, entry.col, entry.text = item_data.lnum or 1, item_data.col or 1, item_data.text or ''
entry.end_lnum, entry.end_col = item_data.end_lnum, item_data.end_col
table.insert(list, entry)
@ -1655,7 +1670,13 @@ MiniPick.set_picker_items_from_cli = function(command, opts)
local process, pid, stdout = nil, nil, vim.loop.new_pipe()
local spawn_opts = vim.tbl_deep_extend('force', opts.spawn_opts, { args = args, stdio = { nil, stdout, nil } })
if type(spawn_opts.cwd) == 'string' then spawn_opts.cwd = H.full_path(spawn_opts.cwd) end
process, pid = vim.loop.spawn(executable, spawn_opts, function() process:close() end)
process, pid = vim.loop.spawn(executable, spawn_opts, function()
if process:is_active() then process:close() end
end)
-- Make sure to stop the process if picker is stopped
local kill_process = function() pcall(vim.loop.process_kill, process) end
vim.api.nvim_create_autocmd('User', { pattern = 'MiniPickStop', once = true, callback = kill_process })
local data_feed = {}
stdout:read_start(function(err, data)
@ -1809,6 +1830,9 @@ H.querytick = 0
-- General purpose cache
H.cache = {}
-- File system information
H.is_windows = vim.loop.os_uname().sysname == 'Windows_NT'
-- Helper functionality =======================================================
-- Settings -------------------------------------------------------------------
H.setup_config = function(config)
@ -1883,14 +1907,15 @@ H.get_config = function(config)
return vim.tbl_deep_extend('force', MiniPick.config, vim.b.minipick_config or {}, config or {})
end
H.create_autocommands = function(config)
local augroup = vim.api.nvim_create_augroup('MiniPick', {})
H.create_autocommands = function()
local gr = vim.api.nvim_create_augroup('MiniPick', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
au('VimResized', '*', MiniPick.refresh, 'Refresh on resize')
au('ColorScheme', '*', H.create_default_hl, 'Ensure colors')
end
--stylua: ignore
@ -1903,6 +1928,7 @@ H.create_default_hl = function()
hi('MiniPickBorder', { link = 'FloatBorder' })
hi('MiniPickBorderBusy', { link = 'DiagnosticFloatingWarn' })
hi('MiniPickBorderText', { link = 'FloatTitle' })
hi('MiniPickCursor', { blend = 100, nocombine = true })
hi('MiniPickIconDirectory', { link = 'Directory' })
hi('MiniPickIconFile', { link = 'MiniPickNormal' })
hi('MiniPickHeader', { link = 'DiagnosticFloatingHint' })
@ -2126,17 +2152,17 @@ H.picker_new_buf = function()
end
H.picker_new_win = function(buf_id, win_config)
-- Focus cursor on Command line to not see it
if vim.fn.mode() == 'n' then
H.cache.cmdheight = vim.o.cmdheight
vim.o.cmdheight = 1
vim.cmd('noautocmd normal! :')
end
-- Hide cursor while picker is active (to not be visible in the window)
-- This mostly follows a hack from 'folke/noice.nvim'
H.cache.guicursor = vim.o.guicursor
vim.o.guicursor = 'a:MiniPickCursor'
-- Create window and focus on it
local win_id = vim.api.nvim_open_win(buf_id, true, H.picker_compute_win_config(win_config, true))
-- Set window-local data
vim.wo[win_id].foldenable = false
vim.wo[win_id].foldmethod = 'manual'
vim.wo[win_id].list = true
vim.wo[win_id].listchars = 'extends:…'
vim.wo[win_id].scrolloff = 0
@ -2438,7 +2464,10 @@ end
H.picker_stop = function(picker, abort)
vim.tbl_map(function(timer) pcall(vim.loop.timer_stop, timer) end, H.timers)
pcall(function() vim.o.cmdheight = H.cache.cmdheight end)
-- Show cursor (work around `guicursor=''` actually leaving cursor hidden)
if H.cache.guicursor == '' then vim.cmd('set guicursor=a: | redraw') end
pcall(function() vim.o.guicursor = H.cache.guicursor end)
if picker == nil then return end
@ -2759,7 +2788,7 @@ H.match_filter = function(inds, stritems, query)
query = grouped_parts
end
if #query == 0 then return {}, 'nosort', query end
if #query == 0 then return {}, 'useall', query end
local is_fuzzy_plain = not (is_exact_plain or is_exact_start or is_exact_end) and #query > 1
if is_fuzzy_forced or is_fuzzy_plain then return H.match_filter_fuzzy(inds, stritems, query), 'fuzzy', query end
@ -2927,6 +2956,10 @@ H.match_sort = function(match_data)
return res
end
H.match_no_sort = function(match_data)
return vim.tbl_map(function(x) return x[3] end, match_data)
end
-- Default show ---------------------------------------------------------------
H.get_icon = function(x, icons)
local item_data = H.parse_item(x)
@ -3031,14 +3064,15 @@ H.get_fs_type = function(path)
if path == '' then return 'none' end
if vim.fn.filereadable(path) == 1 then return 'file' end
if vim.fn.isdirectory(path) == 1 then return 'directory' end
if pcall(vim.uri_to_fname, path) then return 'uri' end
if H.parse_uri(path) ~= nil then return 'uri' end
return 'none'
end
-- Default preview ------------------------------------------------------------
H.preview_file = function(buf_id, item_data, opts)
-- Fully preview only text files
if not H.is_file_text(item_data.path) then return H.set_buflines(buf_id, { '-Non-text-file-' }) end
-- Fully preview only accessible text files
local is_text = H.is_file_text(item_data.path)
if not is_text then return H.set_buflines(buf_id, { is_text == nil and '-No-access-' or '-Non-text-file-' }) end
-- Compute lines. Limit number of read lines to work better on large files.
local has_lines, lines = pcall(vim.fn.readfile, item_data.path, '', (item_data.lnum or 1) + opts.n_context_lines)
@ -3131,9 +3165,7 @@ end
H.choose_path = function(win_target, item_data)
-- Try to use already created buffer, if present. This avoids not needed
-- `:edit` call and avoids some problems with auto-root from 'mini.misc'.
local path, path_buf_id = item_data.path, nil
local is_uri, uri_path = pcall(vim.uri_to_fname, path)
path = is_uri and uri_path or path
local path, path_buf_id = H.parse_uri(item_data.path) or item_data.path, nil
for _, buf_id in ipairs(vim.api.nvim_list_bufs()) do
local is_target = H.is_valid_buf(buf_id) and vim.bo[buf_id].buflisted and vim.api.nvim_buf_get_name(buf_id) == path
if is_target then path_buf_id = buf_id end
@ -3284,6 +3316,8 @@ end
-- Utilities ------------------------------------------------------------------
H.error = function(msg) error(string.format('(mini.pick) %s', msg), 0) end
H.notify = function(msg, level_name) vim.notify('(mini.pick) ' .. msg, vim.log.levels[level_name]) end
H.is_valid_buf = function(buf_id) return type(buf_id) == 'number' and vim.api.nvim_buf_is_valid(buf_id) end
H.is_valid_win = function(win_id) return type(win_id) == 'number' and vim.api.nvim_win_is_valid(win_id) end
@ -3414,12 +3448,24 @@ end
H.is_file_text = function(path)
local fd = vim.loop.fs_open(path, 'r', 1)
if fd == nil then return nil end
local is_text = vim.loop.fs_read(fd, 1024):find('\0') == nil
vim.loop.fs_close(fd)
return is_text
end
H.full_path = function(path) return (vim.fn.fnamemodify(path, ':p'):gsub('(.)/$', '%1')) end
if H.is_windows then
H.full_path = function(path) return (vim.fn.fnamemodify(path, ':p'):gsub('(.)[\\/]$', '%1')) end
end
H.parse_uri = function(x)
local ok, path = pcall(vim.uri_to_fname, x)
if not ok then return nil end
-- Don't accept Windows paths with volume letter as URI
if H.is_windows and x:find('^%a:') ~= nil and path:find('^%a:') ~= nil then return nil end
return path
end
-- TODO: Remove after compatibility with Neovim=0.9 is dropped
H.islist = vim.fn.has('nvim-0.10') == 1 and vim.islist or vim.tbl_islist

View File

@ -185,7 +185,7 @@ MiniSessions.read = function(session_name, opts)
end
-- Write current session to allow proper switching between sessions
if vim.v.this_session ~= '' then MiniSessions.write(nil, { force = true, verbose = false }) end
if H.get_this_session() ~= '' then MiniSessions.write(nil, { force = true, verbose = false }) end
-- Execute 'pre' hook
H.possibly_execute(opts.hooks.pre, data)
@ -248,13 +248,16 @@ MiniSessions.write = function(session_name, opts)
H.possibly_execute(opts.hooks.pre, data)
-- Make session file
local cmd = ('mksession%s'):format(opts.force and '!' or '')
vim.cmd(('%s %s'):format(cmd, vim.fn.fnameescape(session_path)))
local command = string.format('mksession%s %s', opts.force and '!' or '', vim.fn.fnameescape(session_path))
vim.cmd(command)
data.modify_time = vim.fn.getftime(session_path)
-- Update detected sessions
MiniSessions.detected[data.name] = data
-- Update current session
vim.v.this_session = session_path
-- Possibly notify
if opts.verbose then H.message(('Written session %s'):format(session_path)) end
@ -299,7 +302,7 @@ MiniSessions.delete = function(session_name, opts)
if not H.validate_detected(session_name) then return end
session_path = MiniSessions.detected[session_name].path
local is_current_session = session_path == vim.v.this_session
local is_current_session = session_path == H.get_this_session()
if not opts.force and is_current_session then
H.error([[Can't delete current session when `opts.force` is not `true`.]])
end
@ -441,24 +444,22 @@ H.apply_config = function(config)
end
H.create_autocommands = function(config)
local augroup = vim.api.nvim_create_augroup('MiniSessions', {})
local gr = vim.api.nvim_create_augroup('MiniSessions', {})
if config.autoread then
local autoread = function()
if not H.is_something_shown() then MiniSessions.read() end
end
local opts = { group = augroup, nested = true, once = true, callback = autoread, desc = 'Autoread latest session' }
local opts = { group = gr, nested = true, once = true, callback = autoread, desc = 'Autoread latest session' }
vim.api.nvim_create_autocmd('VimEnter', opts)
end
if config.autowrite then
local autowrite = function()
if vim.v.this_session ~= '' then MiniSessions.write(nil, { force = true }) end
if H.get_this_session() ~= '' then MiniSessions.write(nil, { force = true }) end
end
vim.api.nvim_create_autocmd(
'VimLeavePre',
{ group = augroup, callback = autowrite, desc = 'Autowrite current session' }
)
local opts = { group = gr, callback = autowrite, desc = 'Autowrite current session' }
vim.api.nvim_create_autocmd('VimLeavePre', opts)
end
end
@ -506,14 +507,11 @@ H.detect_sessions_global = function(global_dir)
end
H.detect_sessions_local = function(local_file)
local f = H.join_path(vim.fn.getcwd(), local_file)
local f = vim.fn.getcwd() .. '/' .. local_file
if not H.is_readable_file(f) then return {} end
local res = {}
local s = H.new_session(f, 'local')
res[s.name] = s
return res
return { [s.name] = s }
end
H.new_session = function(session_path, session_type)
@ -547,20 +545,20 @@ H.get_unsaved_listed_buffers = function()
)
end
H.get_current_session_name = function() return vim.fn.fnamemodify(vim.v.this_session, ':t') end
H.get_this_session = function() return H.fs_normalize(vim.v.this_session) end
H.name_to_path = function(session_name)
if session_name == nil then
if vim.v.this_session == '' then H.error('There is no active session. Supply non-nil session name.') end
return vim.v.this_session
local this_session = H.get_this_session()
if this_session == '' then H.error('There is no active session. Supply non-nil session name.') end
return this_session
end
session_name = tostring(session_name)
if session_name == '' then H.error('Supply non-empty session name.') end
local session_dir = (session_name == MiniSessions.config.file) and vim.fn.getcwd() or MiniSessions.config.directory
local path = H.join_path(session_dir, session_name)
return H.full_path(path)
return H.full_path(session_dir .. '/' .. session_name)
end
-- Utilities ------------------------------------------------------------------
@ -599,11 +597,12 @@ end
H.is_readable_file = function(path) return vim.fn.isdirectory(path) ~= 1 and vim.fn.getfperm(path):sub(1, 1) == 'r' end
H.join_path = function(directory, filename)
return (string.format('%s/%s', directory, filename):gsub('\\', '/'):gsub('/+', '/'))
H.fs_normalize = vim.fs.normalize
if vim.fn.has('nvim-0.9') == 0 then
H.fs_normalize = function(...) return vim.fs.normalize(...):gsub('(.)/+$', '%1') end
end
H.full_path = function(path) return vim.fn.resolve(vim.fn.fnamemodify(path, ':p')) end
H.full_path = function(path) return H.fs_normalize(vim.fn.resolve(vim.fn.fnamemodify(path, ':p'))) end
H.is_something_shown = function()
-- Don't autoread session if Neovim is opened to show something. That is

View File

@ -385,9 +385,9 @@ MiniStarter.refresh = function(buf_id)
if not vim.deep_equal(data.items, old_items) then data.current_item_id = 1 end
-- Add content
vim.api.nvim_buf_set_option(buf_id, 'modifiable', true)
vim.bo[buf_id].modifiable = true
vim.api.nvim_buf_set_lines(buf_id, 0, -1, false, MiniStarter.content_to_lines(content))
vim.api.nvim_buf_set_option(buf_id, 'modifiable', false)
vim.bo[buf_id].modifiable = false
-- Add highlighting
H.content_highlight(buf_id)
@ -1053,7 +1053,7 @@ end
H.apply_config = function(config) MiniStarter.config = config end
H.create_autocommands = function(config)
local augroup = vim.api.nvim_create_augroup('MiniStarter', {})
local gr = vim.api.nvim_create_augroup('MiniStarter', {})
if config.autoopen then
local on_vimenter = function()
@ -1065,11 +1065,11 @@ H.create_autocommands = function(config)
vim.cmd('noautocmd lua MiniStarter.open()')
end
vim.api.nvim_create_autocmd(
'VimEnter',
{ group = augroup, nested = true, once = true, callback = on_vimenter, desc = 'Open on VimEnter' }
)
local au_opts = { group = gr, nested = true, once = true, callback = on_vimenter, desc = 'Open on VimEnter' }
vim.api.nvim_create_autocmd('VimEnter', au_opts)
end
vim.api.nvim_create_autocmd('ColorScheme', { group = gr, callback = H.create_default_hl, desc = 'Ensure colors' })
end
--stylua: ignore

View File

@ -168,9 +168,7 @@ MiniStatusline.config = {
-- 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,
}
--minidoc_afterlines_end
@ -510,7 +508,7 @@ H.apply_config = function(config)
MiniStatusline.config = config
-- Set settings to ensure statusline is displayed properly
if config.set_vim_settings then vim.o.laststatus = 2 end
if config.set_vim_settings and (vim.o.laststatus == 0 or vim.o.laststatus == 1) then vim.o.laststatus = 2 end
-- Ensure proper 'statusline' values (to not rely on autocommands trigger)
H.ensure_content()
@ -521,10 +519,10 @@ H.apply_config = function(config)
end
H.create_autocommands = function()
local augroup = vim.api.nvim_create_augroup('MiniStatusline', {})
local gr = vim.api.nvim_create_augroup('MiniStatusline', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
au({ 'WinEnter', 'BufWinEnter' }, '*', H.ensure_content, 'Ensure statusline content')
@ -535,6 +533,8 @@ H.create_autocommands = function()
vim.cmd('redrawstatus')
end)
au({ 'LspAttach', 'LspDetach' }, '*', track_lsp, 'Track LSP clients')
au('ColorScheme', '*', H.create_default_hl, 'Ensure colors')
end
--stylua: ignore

View File

@ -487,6 +487,9 @@ MiniSurround.setup = function(config)
-- Apply config
H.apply_config(config)
-- Define behavior
H.create_autocommands()
-- Create default highlighting
H.create_default_hl()
end
@ -1221,6 +1224,11 @@ H.apply_config = function(config)
--stylua: ignore end
end
H.create_autocommands = function()
local gr = vim.api.nvim_create_augroup('MiniSurround', {})
vim.api.nvim_create_autocmd('ColorScheme', { group = gr, callback = H.create_default_hl, desc = 'Ensure colors' })
end
H.create_default_hl = function() vim.api.nvim_set_hl(0, 'MiniSurround', { default = true, link = 'IncSearch' }) end
H.is_disabled = function() return vim.g.minisurround_disable == true or vim.b.minisurround_disable == true end
@ -1309,20 +1317,20 @@ end
H.make_surrounding_table = function()
-- Extend builtins with data from `config`
local surroundings = vim.tbl_deep_extend('force', H.builtin_surroundings, H.get_config().custom_surroundings or {})
-- Add possibly missing information from default surrounding info
for char, info in pairs(surroundings) do
local surroundings = vim.deepcopy(H.builtin_surroundings)
for char, spec in pairs(H.get_config().custom_surroundings or {}) do
local cur_spec = surroundings[char] or {}
local default = H.get_default_surrounding_info(char)
surroundings[char] = vim.tbl_deep_extend('force', default, info)
-- NOTE: Don't use `tbl_deep_extend` to prefer full `input` arrays
cur_spec.input = spec.input or cur_spec.input or default.input
cur_spec.output = spec.output or cur_spec.output or default.output
surroundings[char] = cur_spec
end
-- Use default surrounding info for not supplied single character identifier
--stylua: ignore start
return setmetatable(surroundings, {
__index = function(_, key) return H.get_default_surrounding_info(key) end,
})
--stylua: ignore end
end
H.get_default_surrounding_info = function(char)
@ -1373,7 +1381,7 @@ end
-- Work with finding surrounding ----------------------------------------------
---@param surr_spec table Composed pattern. Last item(s) - extraction template.
---@param opts table Options.
---@param opts table|nil Options.
---@private
H.find_surrounding = function(surr_spec, opts)
if surr_spec == nil then return end

View File

@ -89,6 +89,12 @@ MiniTabline.setup = function(config)
-- Apply config
H.apply_config(config)
-- Define behavior
H.create_autocommands()
-- Create default highlighting
H.create_default_hl()
-- Function to make tabs clickable
vim.api.nvim_exec(
[[function! MiniTablineSwitchBuffer(buf_id, clicks, button, mod)
@ -96,9 +102,6 @@ MiniTabline.setup = function(config)
endfunction]],
false
)
-- Create default highlighting
H.create_default_hl()
end
--- Module config
@ -219,6 +222,11 @@ H.apply_config = function(config)
vim.o.tabline = '%!v:lua.MiniTabline.make_tabline_string()'
end
H.create_autocommands = function()
local gr = vim.api.nvim_create_augroup('MiniTabline', {})
vim.api.nvim_create_autocmd('ColorScheme', { group = gr, callback = H.create_default_hl, desc = 'Ensure colors' })
end
--stylua: ignore
H.create_default_hl = function()
local set_default_hl = function(name, data)

View File

@ -32,6 +32,8 @@
---
--- - 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.
---
@ -1089,6 +1091,12 @@ MiniTest.new_child_neovim = function()
-- Make unique name for `--listen` pipe
local job = { address = vim.fn.tempname() }
if vim.fn.has('win32') == 1 then
-- Use special local pipe prefix on Windows with (hopefully) unique name
-- Source: https://learn.microsoft.com/en-us/windows/win32/ipc/pipe-names
job.address = [[\\.\pipe\mininvim]] .. vim.fn.fnamemodify(job.address, ':t')
end
--stylua: ignore
local full_args = {
opts.nvim_executable, '--clean', '-n', '--listen', job.address,
@ -1625,11 +1633,8 @@ end
H.apply_config = function(config) MiniTest.config = config end
H.create_autocommands = function()
local augroup = vim.api.nvim_create_augroup('MiniTest', {})
vim.api.nvim_create_autocmd(
'ColorScheme',
{ group = augroup, callback = H.create_default_hl, desc = 'Ensure proper colors' }
)
local gr = vim.api.nvim_create_augroup('MiniTest', {})
vim.api.nvim_create_autocmd('ColorScheme', { group = gr, callback = H.create_default_hl, desc = 'Ensure colors' })
end
H.create_default_hl = function()

View File

@ -147,10 +147,10 @@ end
H.apply_config = function(config) MiniTrailspace.config = config end
H.create_autocommands = function(config)
local augroup = vim.api.nvim_create_augroup('MiniTrailspace', {})
local gr = vim.api.nvim_create_augroup('MiniTrailspace', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
-- NOTE: Respecting both `WinEnter` and `BufEnter` seems to be useful to
@ -165,6 +165,8 @@ H.create_autocommands = function(config)
-- disappears if buffer is reentered.
au('OptionSet', 'buftype', H.track_normal_buffer, 'Track normal buffer')
end
au('ColorScheme', '*', H.create_default_hl, 'Ensure colors')
end
H.create_default_hl = function() vim.api.nvim_set_hl(0, 'MiniTrailspace', { default = true, link = 'Error' }) end

View File

@ -1191,6 +1191,9 @@ H.cache = {
session_start_time = os.time(),
}
-- File system information
H.is_windows = vim.loop.os_uname().sysname == 'Windows_NT'
-- Helper functionality =======================================================
-- Settings -------------------------------------------------------------------
H.setup_config = function(config)
@ -1224,10 +1227,10 @@ end
H.apply_config = function(config) MiniVisits.config = config end
H.create_autocommands = function(config)
local augroup = vim.api.nvim_create_augroup('MiniVisits', {})
local gr = vim.api.nvim_create_augroup('MiniVisits', {})
local au = function(event, pattern, callback, desc)
vim.api.nvim_create_autocmd(event, { group = augroup, pattern = pattern, callback = callback, desc = desc })
vim.api.nvim_create_autocmd(event, { group = gr, pattern = pattern, callback = callback, desc = desc })
end
if config.track.event ~= '' then au(config.track.event, '*', H.autoregister_visit, 'Auto register visit') end
@ -1500,9 +1503,9 @@ H.error = function(msg) error(string.format('(mini.visits) %s', msg), 0) end
H.is_valid_buf = function(buf_id) return type(buf_id) == 'number' and vim.api.nvim_buf_is_valid(buf_id) end
H.buf_get_path = function(buf_id)
-- Get Path only for valid normal buffers
-- Get path only for valid normal buffers
if not H.is_valid_buf(buf_id) or vim.bo[buf_id].buftype ~= '' then return nil end
local res = vim.api.nvim_buf_get_name(buf_id)
local res = H.full_path(vim.api.nvim_buf_get_name(buf_id))
if res == '' then return end
return res
end
@ -1549,12 +1552,20 @@ H.edit_path = function(path)
end
end
H.full_path = function(path) return (vim.fn.fnamemodify(path, ':p'):gsub('\\', '/'):gsub('/+', '/'):gsub('(.)/$', '%1')) end
H.full_path = function(path) return (vim.fn.fnamemodify(path, ':p'):gsub('/+', '/'):gsub('(.)/$', '%1')) end
if H.is_windows then
H.full_path = function(path)
return (vim.fn.fnamemodify(path, ':p'):gsub('\\', '/'):gsub('/+', '/'):gsub('(.)/$', '%1'))
end
end
H.short_path = function(path, cwd)
cwd = cwd or vim.fn.getcwd()
if not vim.startswith(path, cwd) then return vim.fn.fnamemodify(path, ':~') end
local res = path:sub(cwd:len() + 1):gsub('^/+', ''):gsub('/+$', '')
-- Ensure `cwd` is treated as directory path (to not match similar prefix)
cwd = cwd:sub(-1) == '/' and cwd or (cwd .. '/')
if vim.startswith(path, cwd) then return path:sub(cwd:len() + 1) end
local res = vim.fn.fnamemodify(path, ':~')
if H.is_windows then res = res:gsub('\\', '/') end
return res
end

View File

@ -56,6 +56,7 @@ Supported highlight groups:
- [HiPhish/rainbow-delimiters.nvim](https://github.com/HiPhish/rainbow-delimiters.nvim)
- [hrsh7th/nvim-cmp](https://github.com/hrsh7th/nvim-cmp)
- [justinmk/vim-sneak](https://github.com/justinmk/vim-sneak)
- [kevinhwang91/nvim-bqf](https://github.com/kevinhwang91/nvim-bqf)
- [kevinhwang91/nvim-ufo](https://github.com/kevinhwang91/nvim-ufo)
- [lewis6991/gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim)
- [lukas-reineke/indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim)

View File

@ -35,6 +35,13 @@ https://user-images.githubusercontent.com/24854248/173044355-90bfc230-70c4-4932-
- Automatic display in floating window of completion item info (via 'completionItem/resolve' request) and signature help (with highlighting of active parameter if LSP server provides such information).
- Automatic actions are done after some configurable amount of delay. This reduces computational load and allows fast typing (completion and signature help) and item selection (item info)
- User can force two-stage completion via or fallback completion.
- Highlighting of LSP kind (like "Function", "Keyword", etc.). Requires enabled ['mini.icons'](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-icons.md) (uses its "lsp" category) and Neovim>=0.11.
## Dependencies
For full experience needs (still works without any of suggestions):
- Enabled ['mini.icons'](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-icons.md) 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()`.
## Installation
@ -163,12 +170,10 @@ Here are code snippets for some common installation methods (use only one):
-- 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

View File

@ -38,6 +38,7 @@ https://github.com/echasnovski/mini.nvim/assets/24854248/530483a5-fe9a-4e18-9813
- 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.
See `*MiniFiles-examples*` tag in help file for some common configuration examples.
@ -67,7 +68,8 @@ For full experience needs (still works without any of suggestions):
- Press `j`/`k` to navigate down/up.
- Press `l` to expand entry under cursor: show directory or open file in the most recent window.
- Press `h` to go to parent directory.
- Type `g?` for more information about other available mappings.
- Type `m<char>` to set directory path of focused window as bookmark `<char>`. Jump to it with `'<char>`. Go back to before the latest jump with `''`.
- Type `g?` for more information about other available mappings and bookmarks.
- Move as in any other buffer (`$`, `G`, `f`/`t`, etc.).
For bigger overview, see `*MiniFiles-navigation*` tag in help file.
@ -210,6 +212,8 @@ Here are code snippets for some common installation methods (use only one):
go_in_plus = 'L',
go_out = 'h',
go_out_plus = 'H',
mark_goto = "'",
mark_set = 'm',
reset = '<BS>',
reveal_cwd = '@',
show_help = 'g?',

View File

@ -103,6 +103,7 @@ Supported highlight groups:
- [HiPhish/rainbow-delimiters.nvim](https://github.com/HiPhish/rainbow-delimiters.nvim)
- [hrsh7th/nvim-cmp](https://github.com/hrsh7th/nvim-cmp)
- [justinmk/vim-sneak](https://github.com/justinmk/vim-sneak)
- [kevinhwang91/nvim-bqf](https://github.com/kevinhwang91/nvim-bqf)
- [kevinhwang91/nvim-ufo](https://github.com/kevinhwang91/nvim-ufo)
- [lewis6991/gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim)
- [lukas-reineke/indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim)

View File

@ -157,9 +157,7 @@ Here are code snippets for some common installation methods (use only one):
-- 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

@ -40,6 +40,7 @@ https://user-images.githubusercontent.com/24854248/175773105-f33cd3bb-6f62-4a61-
- `MiniTest.gen_reporter.buffer()` for interactive usage.
- `MiniTest.gen_reporter.stdout()` for headless Neovim.
- Customizable project specific testing script.
- Works on Unix (Linux, MacOS, etc.) and Windows.
## Installation

View File

@ -1,67 +0,0 @@
-- Test possibility of checking out and initializing 'mini.nvim'
-- Possible problems:
-- - Long file names (particularly from reference screenshots).
-- - Duplicating file names in case-insensitive OS (particularly from reference
-- screenshots of parametrized test cases).
-- Add project root as full path to runtime path (in order to be able to
-- `require()`) modules from this module
vim.cmd([[let &rtp.=','.getcwd()]])
--stylua: ignore
local test_actions = {
['ai'] = function() require('mini.ai').setup() end,
['align'] = function() require('mini.align').setup() end,
['animate'] = function() require('mini.animate').setup() end,
['base16'] = function()
local palette = require('mini.base16').mini_palette('#000000', '#ffffff', 50)
require('mini.base16').setup({ palette = palette })
end,
['basics'] = function() require('mini.basics').setup() end,
['bracketed'] = function() require('mini.bracketed').setup() end,
['bufremove'] = function() require('mini.bufremove').setup() end,
['clue'] = function() require('mini.clue').setup() end,
['colors'] = function() require('mini.colors').setup() end,
['comment'] = function() require('mini.comment').setup() end,
['completion'] = function() require('mini.completion').setup() end,
['cursorword'] = function() require('mini.cursorword').setup() end,
['deps'] = function() require('mini.deps').setup() end,
['diff'] = function() require('mini.diff').setup() end,
['doc'] = function() require('mini.doc').setup() end,
['extra'] = function() require('mini.extra').setup() end,
['files'] = function() require('mini.files').setup() end,
['fuzzy'] = function() require('mini.fuzzy').setup() end,
['git'] = function() require('mini.git').setup() end,
['hipatterns'] = function() require('mini.hipatterns').setup() end,
['hues'] = function() require('mini.hues').setup({ background = '#000000', foreground = '#ffffff' }) end,
['icons'] = function() require('mini.icons').setup() end,
['indentscope'] = function() require('mini.indentscope').setup() end,
['jump'] = function() require('mini.jump').setup() end,
['jump2d'] = function() require('mini.jump2d').setup() end,
['map'] = function() require('mini.map').setup() end,
['misc'] = function() require('mini.misc').setup() end,
['move'] = function() require('mini.move').setup() end,
['notify'] = function() require('mini.notify').setup() end,
['operators'] = function() require('mini.operators').setup() end,
['pairs'] = function() require('mini.pairs').setup() end,
['pick'] = function() require('mini.pick').setup() end,
['sessions'] = function() require('mini.sessions').setup({ directory = '' }) end,
['splitjoin'] = function() require('mini.splitjoin').setup() end,
['starter'] = function() require('mini.starter').setup() end,
['statusline'] = function() require('mini.statusline').setup() end,
['surround'] = function() require('mini.surround').setup() end,
['tabline'] = function() require('mini.tabline').setup() end,
['test'] = function() require('mini.test').setup() end,
['trailspace'] = function() require('mini.trailspace').setup() end,
['visits'] = function() require('mini.visits').setup() end,
}
for module, test_fun in pairs(test_actions) do
local ok, _ = pcall(test_fun)
if not ok then
io.stdout:write('There is a problem with following module: mini.' .. module .. '\n')
vim.cmd('cquit')
end
end
vim.cmd('qall!')

View File

@ -1,4 +1,4 @@
#!/nix/store/4bj2kxdm1462fzcc2i2s4dn33g2angcc-bash-5.2p32/bin/bash
#!/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash
msg_file_dir='lintcommit-msg-files/'
mkdir -p $msg_file_dir

View File

@ -5,3 +5,9 @@ vim.cmd([[let &rtp.=','.getcwd()]])
-- Ensure persistent color scheme (matters after new default in Neovim 0.10)
vim.o.background = 'dark'
require('mini.hues').setup({ background = '#11262d', foreground = '#c0c8cc' })
-- - Make screenshot tests more robust across Neovim versions
if vim.fn.has('nvim-0.11') == 1 then
vim.api.nvim_set_hl(0, 'PmenuMatch', { link = 'Pmenu' })
vim.api.nvim_set_hl(0, 'PmenuMatchSel', { link = 'PmenuSel' })
end

View File

@ -2,7 +2,7 @@ _G.Months = {}
--stylua: ignore start
Months.items = {
{ name = 'January', kind = 1},
{ name = 'January', kind = 1 },
{ name = 'February', kind = 1 },
{ name = 'March', kind = 2 },
{ name = 'April', kind = 2 },

View File

@ -32,13 +32,14 @@ end
vim.lsp.buf.document_symbol = function(opts)
table.insert(_G.lsp_buf_calls, 'document_symbol')
local symbol_kind = vim.lsp.protocol.SymbolKind
local data = {
context = make_context('textDocument/documentSymbol'),
items = {
{ col = 7, filename = filename, kind = 'Number', lnum = 1, text = '[Number] a' },
{ col = 7, filename = filename, kind = 'Object', lnum = 2, text = '[Object] t' },
{ col = 3, filename = filename, kind = 'Variable', lnum = 3, text = '[Variable] x' },
{ col = 3, filename = filename, kind = 'Variable', lnum = 4, text = '[Variable] y' },
{ col = 7, filename = filename, kind = symbol_kind[16], lnum = 1, text = '[' .. symbol_kind[16] .. '] a' },
{ col = 7, filename = filename, kind = symbol_kind[19], lnum = 2, text = '[' .. symbol_kind[19] .. '] t' },
{ col = 3, filename = filename, kind = symbol_kind[13], lnum = 3, text = '[' .. symbol_kind[13] .. '] x' },
{ col = 3, filename = filename, kind = symbol_kind[13], lnum = 4, text = '[' .. symbol_kind[13] .. '] y' },
},
title = 'Symbols in a.lua',
}
@ -82,13 +83,14 @@ end
vim.lsp.buf.workspace_symbol = function(query, opts)
table.insert(_G.lsp_buf_calls, 'workspace_symbol')
_G.workspace_symbol_query = query
local symbol_kind = vim.lsp.protocol.SymbolKind
local data = {
context = make_context('textDocument/workspaceSymbol'),
items = {
{ col = 7, filename = filename, kind = 'Number', lnum = 1, text = '[Number] a' },
{ col = 7, filename = filename, kind = 'Object', lnum = 2, text = '[Object] t' },
{ col = 3, filename = filename, kind = 'Variable', lnum = 3, text = '[Variable] x' },
{ col = 3, filename = filename, kind = 'Variable', lnum = 4, text = '[Variable] y' },
{ col = 7, filename = filename, kind = symbol_kind[16], lnum = 1, text = '[' .. symbol_kind[16] .. '] a' },
{ col = 7, filename = filename, kind = symbol_kind[19], lnum = 2, text = '[' .. symbol_kind[19] .. '] t' },
{ col = 3, filename = filename, kind = symbol_kind[13], lnum = 3, text = '[' .. symbol_kind[13] .. '] x' },
{ col = 3, filename = filename, kind = symbol_kind[13], lnum = 4, text = '[' .. symbol_kind[13] .. '] y' },
},
title = "Symbols matching ''",
}

View File

@ -1,10 +1,15 @@
_G.process_log = {}
local n_pid, n_stream = 0, 0
local n_pid = 0
local new_process = function(pid)
return {
_is_active_indicator = true,
pid = pid,
close = function(_) table.insert(_G.process_log, 'Process ' .. pid .. ' was closed.') end,
is_active = function(process) return process._is_active_indicator end,
close = function(process)
process._is_active_indicator = false
table.insert(_G.process_log, 'Process ' .. pid .. ' was closed.')
end,
}
end
@ -52,4 +57,7 @@ vim.loop.spawn = function(path, options, on_exit)
return new_process(pid), pid
end
vim.loop.process_kill = function(process) table.insert(_G.process_log, 'Process ' .. process.pid .. ' was killed.') end
vim.loop.process_kill = function(process)
process._is_active_indicator = false
table.insert(_G.process_log, 'Process ' .. process.pid .. ' was killed.')
end

View File

@ -0,0 +1,38 @@
This is a confirmation report before an update.
Other very useful info
!!! plugin_a !!!
Some error
+++ plugin_b +++
Path: /home/user/.local/share/nvim/site/pack/deps/opt/plugin_b
Source: https://github.com/cool-plugins/plugin_b
State before: aa339f6ab611da07183a7fe44daa482605392502
State after: 093b29f2b409278e2ed69a90462fee54714b5a84 (master)
Pending updates from `master`:
> 093b29f2 | 2024-09-06 06:42:29 +0000 | Neo McVim
feat: very important feature
> bfe74a48 | 2024-09-05 13:25:50 +0000 | Neo McVim
fix: very important fix
< 3826d0c4 | 2024-09-04 09:08:06 +0200 | Neo McVim
chore: not very important chore
+++ plugin_c +++
Path: /home/user/.local/share/nvim/site/pack/deps/opt/plugin_c
Source: https://github.com/cool-plugins/plugin_c
State before: 3a3c6244553f13fdd92d312c82722b57ce6c4bec
State after: fe3deb7f67ce0cc4ebfe2ea6c1c7ae1c7a939d73 (main)
Pending updates from `main`:
> fe3deb7 | 2024-09-04 03:40:17 -0500 | Caleb White
fix: even more important fix
--- plugin_d ---
Path: /home/user/.local/share/nvim/site/pack/deps/opt/plugin_d
Source: https://github.com/cool-plugins/plugin_d
State: d231729b13da28fd1625c3d85f2315886ddeb05d (HEAD)

View File

@ -3,8 +3,13 @@ _G.process_log = {}
local n_pid, n_stdout = 0, 0
local new_process = function(pid)
return {
_is_active_indicator = true,
pid = pid,
close = function(_) table.insert(_G.process_log, 'Process ' .. pid .. ' was closed.') end,
is_active = function(process) return process._is_active_indicator end,
close = function(process)
process._is_active_indicator = false
table.insert(_G.process_log, 'Process ' .. pid .. ' was closed.')
end,
}
end
@ -47,4 +52,7 @@ vim.loop.spawn = function(path, options, on_exit)
return new_process(pid), pid
end
vim.loop.process_kill = function(process) table.insert(_G.process_log, 'Process ' .. process.pid .. ' was killed.') end
vim.loop.process_kill = function(process)
process._is_active_indicator = false
table.insert(_G.process_log, 'Process ' .. process.pid .. ' was killed.')
end

View File

@ -40,7 +40,6 @@ Helpers.new_child_neovim = function()
local child = MiniTest.new_child_neovim()
local prevent_hanging = function(method)
-- stylua: ignore
if not child.is_blocked() then return end
local msg = string.format('Can not use `child.%s` because child process is blocked.', method)
@ -157,6 +156,9 @@ Helpers.new_child_neovim = function()
MiniTest.expect.reference_screenshot(child.get_screenshot(screenshot_opts), path, opts)
end
-- Poke child's event loop to make it up to date
child.poke_eventloop = function() child.api.nvim_eval('1') end
return child
end
@ -170,7 +172,41 @@ end
-- Detect CI
Helpers.is_ci = function() return os.getenv('CI') ~= nil end
Helpers.skip_in_ci = function(msg)
if Helpers.is_ci() then MiniTest.skip(msg) end
if Helpers.is_ci() then MiniTest.skip(msg or 'Does not test properly in CI') end
end
-- Detect OS
Helpers.is_windows = function() return vim.fn.has('win32') == 1 end
Helpers.skip_on_windows = function(msg)
if Helpers.is_windows() then MiniTest.skip(msg or 'Does not test properly on Windows') end
end
Helpers.is_macos = function() return vim.fn.has('mac') == 1 end
Helpers.skip_on_macos = function(msg)
if Helpers.is_macos() then MiniTest.skip(msg or 'Does not test properly on MacOS') end
end
-- Standardized way of dealing with time
Helpers.is_slow = function() return Helpers.is_ci() and (Helpers.is_windows() or Helpers.is_macos()) end
Helpers.skip_if_slow = function(msg)
if Helpers.is_slow() then MiniTest.skip(msg or 'Does not test properly in slow context') end
end
Helpers.get_time_const = function(delay)
local coef = 1
if Helpers.is_ci() then
if Helpers.is_windows() then coef = 5 end
if Helpers.is_macos() then coef = 15 end
end
return coef * delay
end
Helpers.sleep = function(ms, child, skip_slow)
if skip_slow then
Helpers.skip_if_slow('Skip because state checks after sleep are hard to make robust in slow context')
end
vim.loop.sleep(math.max(ms, 1))
if child ~= nil then child.poke_eventloop() end
end
return Helpers

View File

@ -0,0 +1,23 @@
--|---------|---------|---------|---------|
01|J
02|January Text
03|June Function
04|July Function
05|~
06|~
07|~
08|~
09|[No Name] [+] 1,2 All
10|-- INSERT --
--|---------|---------|---------|---------|
01|0000000000000000000000000000000000000000
02|1111111122222222233333333333333333333333
03|1111111144444444433333333333333333333333
04|1111111111111111133333333333333333333333
05|3333333333333333333333333333333333333333
06|3333333333333333333333333333333333333333
07|3333333333333333333333333333333333333333
08|3333333333333333333333333333333333333333
09|5555555555555555555555555555555555555555
10|6666666666667777777777777777777777777777

View File

@ -1,33 +1,33 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|
01| [No Name] m//confirm-clean X
02|This is a confirmation report before a clean.
03|
04|Lines `- <plugin>` show plugins to be deleted from disk.
05|Remove line to not delete that plugin.
06|
07|To finish clean, write this buffer (for example, with `:write` command).
08|To cancel clean, close this window (for example, with `:close` command).
09|
10|- plugin_not_in_session_1
11|- plugin_not_in_session_2
01|This is a confirmation report before a clean.
02|
03|Lines `- <plugin>` show plugins to be deleted from disk.
04|Remove line to not delete that plugin.
05|
06|To finish clean, write this buffer (for example, with `:write` command).
07|To cancel clean, close this window (for example, with `:close` command).
08|
09|- plugin_not_in_session_1
10|- plugin_not_in_session_2
11|~
12|~
13|~
14|~
15|
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|00000000000111111111111111111000000000000000000000000000000000000000000000000000
02|22222222222222222222222222222222222222222222233333333333333333333333333333333333
03|33333333333333333333333333333333333333333333333333333333333333333333333333333333
04|22222222222222222222222222222222222222222222222222222222333333333333333333333333
05|22222222222222222222222222222222222222333333333333333333333333333333333333333333
06|33333333333333333333333333333333333333333333333333333333333333333333333333333333
07|22222222222222222222222222222222222222222222222222222222222222222222222233333333
08|22222222222222222222222222222222222222222222222222222222222222222222222233333333
09|33333333333333333333333333333333333333333333333333333333333333333333333333333333
10|33333333333333333333333333333333333333333333333333333333333333333333333333333333
11|33333333333333333333333333333333333333333333333333333333333333333333333333333333
12|44444444444444444444444444444444444444444444444444444444444444444444444444444444
13|44444444444444444444444444444444444444444444444444444444444444444444444444444444
14|44444444444444444444444444444444444444444444444444444444444444444444444444444444
15|55555555555555555555555555555555555555555555555555555555555555555555555555555555
01|00000000000000000000000000000000000000000000011111111111111111111111111111111111
02|11111111111111111111111111111111111111111111111111111111111111111111111111111111
03|00000000000000000000000000000000000000000000000000000000111111111111111111111111
04|00000000000000000000000000000000000000111111111111111111111111111111111111111111
05|11111111111111111111111111111111111111111111111111111111111111111111111111111111
06|00000000000000000000000000000000000000000000000000000000000000000000000011111111
07|00000000000000000000000000000000000000000000000000000000000000000000000011111111
08|11111111111111111111111111111111111111111111111111111111111111111111111111111111
09|11111111111111111111111111111111111111111111111111111111111111111111111111111111
10|11111111111111111111111111111111111111111111111111111111111111111111111111111111
11|22222222222222222222222222222222222222222222222222222222222222222222222222222222
12|22222222222222222222222222222222222222222222222222222222222222222222222222222222
13|22222222222222222222222222222222222222222222222222222222222222222222222222222222
14|22222222222222222222222222222222222222222222222222222222222222222222222222222222
15|33333333333333333333333333333333333333333333333333333333333333333333333333333333

View File

@ -1,33 +1,33 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|
01| [No Name] m//confirm-clean X
02|This is a confirmation report before a clean.
03|
04|Lines `- <plugin>` show plugins to be deleted from disk.
05|Remove line to not delete that plugin.
06|
07|To finish clean, write this buffer (for example, with `:write` command).
08|To cancel clean, close this window (for example, with `:close` command).
09|
10|- plugin_not_in_session_1 (MOCKDIR/pack/deps/opt/plugin_not_in_session_1)
11|- plugin_not_in_session_2
01|This is a confirmation report before a clean.
02|
03|Lines `- <plugin>` show plugins to be deleted from disk.
04|Remove line to not delete that plugin.
05|
06|To finish clean, write this buffer (for example, with `:write` command).
07|To cancel clean, close this window (for example, with `:close` command).
08|
09|- plugin_not_in_session_1 (MOCKDIR/pack/deps/opt/plugin_not_in_session_1)
10|- plugin_not_in_session_2
11|~
12|~
13|~
14|~
15|
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|00000000000111111111111111111000000000000000000000000000000000000000000000000000
02|22222222222222222222222222222222222222222222233333333333333333333333333333333333
03|33333333333333333333333333333333333333333333333333333333333333333333333333333333
04|22222222222222222222222222222222222222222222222222222222333333333333333333333333
05|22222222222222222222222222222222222222333333333333333333333333333333333333333333
06|33333333333333333333333333333333333333333333333333333333333333333333333333333333
07|22222222222222222222222222222222222222222222222222222222222222222222222233333333
08|22222222222222222222222222222222222222222222222222222222222222222222222233333333
09|33333333333333333333333333333333333333333333333333333333333333333333333333333333
10|33333333333333333333333334444444444444444444444444444444444444444444444443333333
01|00000000000000000000000000000000000000000000011111111111111111111111111111111111
02|11111111111111111111111111111111111111111111111111111111111111111111111111111111
03|00000000000000000000000000000000000000000000000000000000111111111111111111111111
04|00000000000000000000000000000000000000111111111111111111111111111111111111111111
05|11111111111111111111111111111111111111111111111111111111111111111111111111111111
06|00000000000000000000000000000000000000000000000000000000000000000000000011111111
07|00000000000000000000000000000000000000000000000000000000000000000000000011111111
08|11111111111111111111111111111111111111111111111111111111111111111111111111111111
09|11111111111111111111111112222222222222222222222222222222222222222222222221111111
10|11111111111111111111111111111111111111111111111111111111111111111111111111111111
11|33333333333333333333333333333333333333333333333333333333333333333333333333333333
12|55555555555555555555555555555555555555555555555555555555555555555555555555555555
13|55555555555555555555555555555555555555555555555555555555555555555555555555555555
14|55555555555555555555555555555555555555555555555555555555555555555555555555555555
15|66666666666666666666666666666666666666666666666666666666666666666666666666666666
12|33333333333333333333333333333333333333333333333333333333333333333333333333333333
13|33333333333333333333333333333333333333333333333333333333333333333333333333333333
14|33333333333333333333333333333333333333333333333333333333333333333333333333333333
15|44444444444444444444444444444444444444444444444444444444444444444444444444444444

View File

@ -1,29 +1,29 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|
01| [No Name] m//confirm-update X
02|This is a confirmation report before an update.
03|
04|Line `+++ <plugin_name> +++` means plugin will be updated.
05|See update details below it.
06|Changes starting with ">"/"<" will be added/removed.
07|Remove the line to not update that plugin.
08|
09|Line `--- <plugin_name> ---` means plugin has nothing to update.
10|
11|Line `!!! <plugin_name> !!!` means plugin had an error and won't be updated.
12|See error details below it.
13|
14|Use regular fold keys (`zM`, `zR`, etc.) to manage shorter view.
15|To finish update, write this buffer (for example, with `:write` command).
16|To cancel update, close this window (for example, with `:close` command).
17|
18|!!! plugin_3 !!!
19| >> ···········································································
20|
21|+++ plugin_2 +++
22| >> Path: MOCKDIR/pack/deps/opt/plugin_2·······························
23|
24|--- plugin_1 ---
25| >> Path: MOCKDIR/pack/deps/opt/plugin_1·····································
01|This is a confirmation report before an update.
02|
03|Line `+++ <plugin_name> +++` means plugin will be updated.
04|See update details below it.
05|Changes starting with ">"/"<" will be added/removed.
06|Remove the line to not update that plugin.
07|
08|Line `--- <plugin_name> ---` means plugin has nothing to update.
09|
10|Line `!!! <plugin_name> !!!` means plugin had an error and won't be updated.
11|See error details below it.
12|
13|Use regular fold keys (`zM`, `zR`, etc.) to manage shorter view.
14|To finish update, write this buffer (for example, with `:write` command).
15|To cancel update, close this window (for example, with `:close` command).
16|
17|!!! plugin_3 !!!
18| >> ···········································································
19|
20|+++ plugin_2 +++
21| >> Path: MOCKDIR/pack/deps/opt/plugin_2·······························
22|
23|--- plugin_1 ---
24| >> Path: MOCKDIR/pack/deps/opt/plugin_1·····································
25|~
26|~
27|~
28|~
@ -31,33 +31,33 @@
30|
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|00000000000111111111111111111100000000000000000000000000000000000000000000000000
02|22222222222222222222222222222222222222222222222333333333333333333333333333333333
03|33333333333333333333333333333333333333333333333333333333333333333333333333333333
04|22222222222222222222222222222222222222222222222222222222223333333333333333333333
05|22222222222222222222222222223333333333333333333333333333333333333333333333333333
06|22222222222222222222222222222222222222222222222222223333333333333333333333333333
07|22222222222222222222222222222222222222222233333333333333333333333333333333333333
08|33333333333333333333333333333333333333333333333333333333333333333333333333333333
09|22222222222222222222222222222222222222222222222222222222222222223333333333333333
10|33333333333333333333333333333333333333333333333333333333333333333333333333333333
11|22222222222222222222222222222222222222222222222222222222222222222222222222223333
12|22222222222222222222222222233333333333333333333333333333333333333333333333333333
13|33333333333333333333333333333333333333333333333333333333333333333333333333333333
14|22222222222222222222222222222222222222222222222222222222222222223333333333333333
15|22222222222222222222222222222222222222222222222222222222222222222222222223333333
16|22222222222222222222222222222222222222222222222222222222222222222222222223333333
17|33333333333333333333333333333333333333333333333333333333333333333333333333333333
18|44444444444444443333333333333333333333333333333333333333333333333333333333333333
19|55555555555555555555555555555555555555555555555555555555555555555555555555555555
20|33333333333333333333333333333333333333333333333333333333333333333333333333333333
21|66666666666666663333333333333333333333333333333333333333333333333333333333333333
22|55555555555555555555555555555555555555555555555555555555555555555555555555555555
23|33333333333333333333333333333333333333333333333333333333333333333333333333333333
24|77777777777777773333333333333333333333333333333333333333333333333333333333333333
25|55555555555555555555555555555555555555555555555555555555555555555555555555555555
26|88888888888888888888888888888888888888888888888888888888888888888888888888888888
27|88888888888888888888888888888888888888888888888888888888888888888888888888888888
28|88888888888888888888888888888888888888888888888888888888888888888888888888888888
29|88888888888888888888888888888888888888888888888888888888888888888888888888888888
30|99999999999999999999999999999999999999999999999999999999999999999999999999999999
01|00000000000000000000000000000000000000000000000111111111111111111111111111111111
02|11111111111111111111111111111111111111111111111111111111111111111111111111111111
03|00000000000000000000000000000000000000000000000000000000001111111111111111111111
04|00000000000000000000000000001111111111111111111111111111111111111111111111111111
05|00000000000000000000000000000000000000000000000000001111111111111111111111111111
06|00000000000000000000000000000000000000000011111111111111111111111111111111111111
07|11111111111111111111111111111111111111111111111111111111111111111111111111111111
08|00000000000000000000000000000000000000000000000000000000000000001111111111111111
09|11111111111111111111111111111111111111111111111111111111111111111111111111111111
10|00000000000000000000000000000000000000000000000000000000000000000000000000001111
11|00000000000000000000000000011111111111111111111111111111111111111111111111111111
12|11111111111111111111111111111111111111111111111111111111111111111111111111111111
13|00000000000000000000000000000000000000000000000000000000000000001111111111111111
14|00000000000000000000000000000000000000000000000000000000000000000000000001111111
15|00000000000000000000000000000000000000000000000000000000000000000000000001111111
16|11111111111111111111111111111111111111111111111111111111111111111111111111111111
17|22222222222222221111111111111111111111111111111111111111111111111111111111111111
18|33333333333333333333333333333333333333333333333333333333333333333333333333333333
19|11111111111111111111111111111111111111111111111111111111111111111111111111111111
20|44444444444444441111111111111111111111111111111111111111111111111111111111111111
21|33333333333333333333333333333333333333333333333333333333333333333333333333333333
22|11111111111111111111111111111111111111111111111111111111111111111111111111111111
23|55555555555555551111111111111111111111111111111111111111111111111111111111111111
24|33333333333333333333333333333333333333333333333333333333333333333333333333333333
25|66666666666666666666666666666666666666666666666666666666666666666666666666666666
26|66666666666666666666666666666666666666666666666666666666666666666666666666666666
27|66666666666666666666666666666666666666666666666666666666666666666666666666666666
28|66666666666666666666666666666666666666666666666666666666666666666666666666666666
29|66666666666666666666666666666666666666666666666666666666666666666666666666666666
30|77777777777777777777777777777777777777777777777777777777777777777777777777777777

View File

@ -1,69 +1,69 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|
01| [No Name] m//confirm-update X
02|This is a confirmation report before an update.
03|
04|Line `+++ <plugin_name> +++` means plugin will be updated.
05|See update details below it.
06|Changes starting with ">"/"<" will be added/removed.
07|Remove the line to not update that plugin.
08|
09|Line `--- <plugin_name> ---` means plugin has nothing to update.
10|
11|Line `!!! <plugin_name> !!!` means plugin had an error and won't be updated.
12|See error details below it.
13|
14|Use regular fold keys (`zM`, `zR`, etc.) to manage shorter view.
15|To finish update, write this buffer (for example, with `:write` command).
16|To cancel update, close this window (for example, with `:close` command).
17|
18|+++ plugin_1 +++
19|Path: MOCKDIR/pack/deps/opt/plugin_1
20|Source: https://github.com/user/plugin_1
21|State before: sha1head
22|State after: wow1head (main)
23|
24|Pending updates from `main`:
25|< sha2head | 2024-01-02 01:01:01 +0200 | Neo McVim
26| feat!: a breaking feature
27|> new2head | 2024-01-02 02:02:02 +0200 | Neo McVim
28| fix(deps)!: a breaking fix
29|> wow2head | 2024-01-02 03:03:03 +0200 | Neo McVim
30| fix: not a fix!: breaking change
01|This is a confirmation report before an update.
02|
03|Line `+++ <plugin_name> +++` means plugin will be updated.
04|See update details below it.
05|Changes starting with ">"/"<" will be added/removed.
06|Remove the line to not update that plugin.
07|
08|Line `--- <plugin_name> ---` means plugin has nothing to update.
09|
10|Line `!!! <plugin_name> !!!` means plugin had an error and won't be updated.
11|See error details below it.
12|
13|Use regular fold keys (`zM`, `zR`, etc.) to manage shorter view.
14|To finish update, write this buffer (for example, with `:write` command).
15|To cancel update, close this window (for example, with `:close` command).
16|
17|+++ plugin_1 +++
18|Path: MOCKDIR/pack/deps/opt/plugin_1
19|Source: https://github.com/user/plugin_1
20|State before: sha1head
21|State after: wow1head (main)
22|
23|Pending updates from `main`:
24|< sha2head | 2024-01-02 01:01:01 +0200 | Neo McVim
25| feat!: a breaking feature
26|> new2head | 2024-01-02 02:02:02 +0200 | Neo McVim
27| fix(deps)!: a breaking fix
28|> wow2head | 2024-01-02 03:03:03 +0200 | Neo McVim
29| fix: not a fix!: breaking change
30|~
31|~
32|~
33|
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|00000000000111111111111111111100000000000000000000000000000000000000000000000000
02|22222222222222222222222222222222222222222222222333333333333333333333333333333333
03|33333333333333333333333333333333333333333333333333333333333333333333333333333333
04|22222222222222222222222222222222222222222222222222222222223333333333333333333333
05|22222222222222222222222222223333333333333333333333333333333333333333333333333333
06|22222222222222222222222222222222222222222222222222223333333333333333333333333333
07|22222222222222222222222222222222222222222233333333333333333333333333333333333333
08|33333333333333333333333333333333333333333333333333333333333333333333333333333333
09|22222222222222222222222222222222222222222222222222222222222222223333333333333333
10|33333333333333333333333333333333333333333333333333333333333333333333333333333333
11|22222222222222222222222222222222222222222222222222222222222222222222222222223333
12|22222222222222222222222222233333333333333333333333333333333333333333333333333333
13|33333333333333333333333333333333333333333333333333333333333333333333333333333333
14|22222222222222222222222222222222222222222222222222222222222222223333333333333333
15|22222222222222222222222222222222222222222222222222222222222222222222222223333333
16|22222222222222222222222222222222222222222222222222222222222222222222222223333333
17|33333333333333333333333333333333333333333333333333333333333333333333333333333333
18|44444444444444443333333333333333333333333333333333333333333333333333333333333333
19|33333333333333555555555555555555555555555555333333333333333333333333333333333333
20|33333333333333555555555555555555555555555555553333333333333333333333333333333333
21|33333333333333555555553333333333333333333333333333333333333333333333333333333333
22|33333333333333555555553222222333333333333333333333333333333333333333333333333333
23|33333333333333333333333333333333333333333333333333333333333333333333333333333333
24|33333333333333333333333333333333333333333333333333333333333333333333333333333333
25|66666666666666666666666666666666666666666666666666333333333333333333333333333333
26|77777777777777777777777777733333333333333333333333333333333333333333333333333333
27|88888888888888888888888888888888888888888888888888333333333333333333333333333333
28|77777777777777777777777777773333333333333333333333333333333333333333333333333333
29|88888888888888888888888888888888888888888888888888333333333333333333333333333333
30|33333333333333333333333333333333333333333333333333333333333333333333333333333333
31|99999999999999999999999999999999999999999999999999999999999999999999999999999999
32|99999999999999999999999999999999999999999999999999999999999999999999999999999999
33|::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
01|00000000000000000000000000000000000000000000000111111111111111111111111111111111
02|11111111111111111111111111111111111111111111111111111111111111111111111111111111
03|00000000000000000000000000000000000000000000000000000000001111111111111111111111
04|00000000000000000000000000001111111111111111111111111111111111111111111111111111
05|00000000000000000000000000000000000000000000000000001111111111111111111111111111
06|00000000000000000000000000000000000000000011111111111111111111111111111111111111
07|11111111111111111111111111111111111111111111111111111111111111111111111111111111
08|00000000000000000000000000000000000000000000000000000000000000001111111111111111
09|11111111111111111111111111111111111111111111111111111111111111111111111111111111
10|00000000000000000000000000000000000000000000000000000000000000000000000000001111
11|00000000000000000000000000011111111111111111111111111111111111111111111111111111
12|11111111111111111111111111111111111111111111111111111111111111111111111111111111
13|00000000000000000000000000000000000000000000000000000000000000001111111111111111
14|00000000000000000000000000000000000000000000000000000000000000000000000001111111
15|00000000000000000000000000000000000000000000000000000000000000000000000001111111
16|11111111111111111111111111111111111111111111111111111111111111111111111111111111
17|22222222222222221111111111111111111111111111111111111111111111111111111111111111
18|11111111111111333333333333333333333333333333111111111111111111111111111111111111
19|11111111111111333333333333333333333333333333331111111111111111111111111111111111
20|11111111111111333333331111111111111111111111111111111111111111111111111111111111
21|11111111111111333333331000000111111111111111111111111111111111111111111111111111
22|11111111111111111111111111111111111111111111111111111111111111111111111111111111
23|11111111111111111111111111111111111111111111111111111111111111111111111111111111
24|44444444444444444444444444444444444444444444444444111111111111111111111111111111
25|55555555555555555555555555511111111111111111111111111111111111111111111111111111
26|66666666666666666666666666666666666666666666666666111111111111111111111111111111
27|55555555555555555555555555551111111111111111111111111111111111111111111111111111
28|66666666666666666666666666666666666666666666666666111111111111111111111111111111
29|11111111111111111111111111111111111111111111111111111111111111111111111111111111
30|77777777777777777777777777777777777777777777777777777777777777777777777777777777
31|77777777777777777777777777777777777777777777777777777777777777777777777777777777
32|77777777777777777777777777777777777777777777777777777777777777777777777777777777
33|88888888888888888888888888888888888888888888888888888888888888888888888888888888

View File

@ -1,67 +1,67 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|
01| [No Name] m//confirm-update X
02|This is a confirmation report before an update.
03|
04|Line `+++ <plugin_name> +++` means plugin will be updated.
05|See update details below it.
06|Changes starting with ">"/"<" will be added/removed.
07|Remove the line to not update that plugin.
08|
09|Line `--- <plugin_name> ---` means plugin has nothing to update.
10|
11|Line `!!! <plugin_name> !!!` means plugin had an error and won't be updated.
12|See error details below it.
13|
14|Use regular fold keys (`zM`, `zR`, etc.) to manage shorter view.
15|To finish update, write this buffer (for example, with `:write` command).
16|To cancel update, close this window (for example, with `:close` command).
17|
18|+++ plugin_1 +++
19|Path: MOCKDIR/pack/deps/opt/plugin_1
20|Source: https://github.com/user/plugin_1
21|State before: sha1head
22|State after: new1head (hello)
23|
24|Pending updates from `hello`:
25|> new1head | 2024-01-02 01:01:01 +0200 | Neo McVim
26| Added commit in checkout.
27|
28|Monitor updates from `world`:
29|> new2head | 2024-01-02 02:02:02 +0200 | Neo McVim
30| Added commit in monitor.
01|This is a confirmation report before an update.
02|
03|Line `+++ <plugin_name> +++` means plugin will be updated.
04|See update details below it.
05|Changes starting with ">"/"<" will be added/removed.
06|Remove the line to not update that plugin.
07|
08|Line `--- <plugin_name> ---` means plugin has nothing to update.
09|
10|Line `!!! <plugin_name> !!!` means plugin had an error and won't be updated.
11|See error details below it.
12|
13|Use regular fold keys (`zM`, `zR`, etc.) to manage shorter view.
14|To finish update, write this buffer (for example, with `:write` command).
15|To cancel update, close this window (for example, with `:close` command).
16|
17|+++ plugin_1 +++
18|Path: MOCKDIR/pack/deps/opt/plugin_1
19|Source: https://github.com/user/plugin_1
20|State before: sha1head
21|State after: new1head (hello)
22|
23|Pending updates from `hello`:
24|> new1head | 2024-01-02 01:01:01 +0200 | Neo McVim
25| Added commit in checkout.
26|
27|Monitor updates from `world`:
28|> new2head | 2024-01-02 02:02:02 +0200 | Neo McVim
29| Added commit in monitor.
30|~
31|~
32|
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|00000000000111111111111111111100000000000000000000000000000000000000000000000000
02|22222222222222222222222222222222222222222222222333333333333333333333333333333333
03|33333333333333333333333333333333333333333333333333333333333333333333333333333333
04|22222222222222222222222222222222222222222222222222222222223333333333333333333333
05|22222222222222222222222222223333333333333333333333333333333333333333333333333333
06|22222222222222222222222222222222222222222222222222223333333333333333333333333333
07|22222222222222222222222222222222222222222233333333333333333333333333333333333333
08|33333333333333333333333333333333333333333333333333333333333333333333333333333333
09|22222222222222222222222222222222222222222222222222222222222222223333333333333333
10|33333333333333333333333333333333333333333333333333333333333333333333333333333333
11|22222222222222222222222222222222222222222222222222222222222222222222222222223333
12|22222222222222222222222222233333333333333333333333333333333333333333333333333333
13|33333333333333333333333333333333333333333333333333333333333333333333333333333333
14|22222222222222222222222222222222222222222222222222222222222222223333333333333333
15|22222222222222222222222222222222222222222222222222222222222222222222222223333333
16|22222222222222222222222222222222222222222222222222222222222222222222222223333333
17|33333333333333333333333333333333333333333333333333333333333333333333333333333333
18|44444444444444443333333333333333333333333333333333333333333333333333333333333333
19|33333333333333555555555555555555555555555555333333333333333333333333333333333333
20|33333333333333555555555555555555555555555555553333333333333333333333333333333333
21|33333333333333555555553333333333333333333333333333333333333333333333333333333333
22|33333333333333555555553222222233333333333333333333333333333333333333333333333333
23|33333333333333333333333333333333333333333333333333333333333333333333333333333333
24|33333333333333333333333333333333333333333333333333333333333333333333333333333333
25|66666666666666666666666666666666666666666666666666333333333333333333333333333333
26|33333333333333333333333333333333333333333333333333333333333333333333333333333333
27|33333333333333333333333333333333333333333333333333333333333333333333333333333333
28|33333333333333333333333333333333333333333333333333333333333333333333333333333333
29|66666666666666666666666666666666666666666666666666333333333333333333333333333333
30|33333333333333333333333333333333333333333333333333333333333333333333333333333333
31|77777777777777777777777777777777777777777777777777777777777777777777777777777777
32|88888888888888888888888888888888888888888888888888888888888888888888888888888888
01|00000000000000000000000000000000000000000000000111111111111111111111111111111111
02|11111111111111111111111111111111111111111111111111111111111111111111111111111111
03|00000000000000000000000000000000000000000000000000000000001111111111111111111111
04|00000000000000000000000000001111111111111111111111111111111111111111111111111111
05|00000000000000000000000000000000000000000000000000001111111111111111111111111111
06|00000000000000000000000000000000000000000011111111111111111111111111111111111111
07|11111111111111111111111111111111111111111111111111111111111111111111111111111111
08|00000000000000000000000000000000000000000000000000000000000000001111111111111111
09|11111111111111111111111111111111111111111111111111111111111111111111111111111111
10|00000000000000000000000000000000000000000000000000000000000000000000000000001111
11|00000000000000000000000000011111111111111111111111111111111111111111111111111111
12|11111111111111111111111111111111111111111111111111111111111111111111111111111111
13|00000000000000000000000000000000000000000000000000000000000000001111111111111111
14|00000000000000000000000000000000000000000000000000000000000000000000000001111111
15|00000000000000000000000000000000000000000000000000000000000000000000000001111111
16|11111111111111111111111111111111111111111111111111111111111111111111111111111111
17|22222222222222221111111111111111111111111111111111111111111111111111111111111111
18|11111111111111333333333333333333333333333333111111111111111111111111111111111111
19|11111111111111333333333333333333333333333333331111111111111111111111111111111111
20|11111111111111333333331111111111111111111111111111111111111111111111111111111111
21|11111111111111333333331000000011111111111111111111111111111111111111111111111111
22|11111111111111111111111111111111111111111111111111111111111111111111111111111111
23|11111111111111111111111111111111111111111111111111111111111111111111111111111111
24|44444444444444444444444444444444444444444444444444111111111111111111111111111111
25|11111111111111111111111111111111111111111111111111111111111111111111111111111111
26|11111111111111111111111111111111111111111111111111111111111111111111111111111111
27|11111111111111111111111111111111111111111111111111111111111111111111111111111111
28|44444444444444444444444444444444444444444444444444111111111111111111111111111111
29|11111111111111111111111111111111111111111111111111111111111111111111111111111111
30|55555555555555555555555555555555555555555555555555555555555555555555555555555555
31|55555555555555555555555555555555555555555555555555555555555555555555555555555555
32|66666666666666666666666666666666666666666666666666666666666666666666666666666666

View File

@ -1,57 +1,57 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|
01| [No Name] m//confirm-update X
02|This is a confirmation report before an update.
03|
04|Line `+++ <plugin_name> +++` means plugin will be updated.
05|See update details below it.
06|Changes starting with ">"/"<" will be added/removed.
07|Remove the line to not update that plugin.
08|
09|Line `--- <plugin_name> ---` means plugin has nothing to update.
10|
11|Line `!!! <plugin_name> !!!` means plugin had an error and won't be updated.
12|See error details below it.
13|
14|Use regular fold keys (`zM`, `zR`, etc.) to manage shorter view.
15|To finish update, write this buffer (for example, with `:write` command).
16|To cancel update, close this window (for example, with `:close` command).
17|
18|--- plugin_1 ---
19|Path: MOCKDIR/pack/deps/opt/plugin_1
20|Source: https://github.com/user/plugin_1
21|State: sha1head (hello)
22|
23|Monitor updates from `world`:
24|<Nothing>
01|This is a confirmation report before an update.
02|
03|Line `+++ <plugin_name> +++` means plugin will be updated.
04|See update details below it.
05|Changes starting with ">"/"<" will be added/removed.
06|Remove the line to not update that plugin.
07|
08|Line `--- <plugin_name> ---` means plugin has nothing to update.
09|
10|Line `!!! <plugin_name> !!!` means plugin had an error and won't be updated.
11|See error details below it.
12|
13|Use regular fold keys (`zM`, `zR`, etc.) to manage shorter view.
14|To finish update, write this buffer (for example, with `:write` command).
15|To cancel update, close this window (for example, with `:close` command).
16|
17|--- plugin_1 ---
18|Path: MOCKDIR/pack/deps/opt/plugin_1
19|Source: https://github.com/user/plugin_1
20|State: sha1head (hello)
21|
22|Monitor updates from `world`:
23|<Nothing>
24|~
25|~
26|~
27|
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|00000000000111111111111111111100000000000000000000000000000000000000000000000000
02|22222222222222222222222222222222222222222222222333333333333333333333333333333333
03|33333333333333333333333333333333333333333333333333333333333333333333333333333333
04|22222222222222222222222222222222222222222222222222222222223333333333333333333333
05|22222222222222222222222222223333333333333333333333333333333333333333333333333333
06|22222222222222222222222222222222222222222222222222223333333333333333333333333333
07|22222222222222222222222222222222222222222233333333333333333333333333333333333333
08|33333333333333333333333333333333333333333333333333333333333333333333333333333333
09|22222222222222222222222222222222222222222222222222222222222222223333333333333333
10|33333333333333333333333333333333333333333333333333333333333333333333333333333333
11|22222222222222222222222222222222222222222222222222222222222222222222222222223333
12|22222222222222222222222222233333333333333333333333333333333333333333333333333333
13|33333333333333333333333333333333333333333333333333333333333333333333333333333333
14|22222222222222222222222222222222222222222222222222222222222222223333333333333333
15|22222222222222222222222222222222222222222222222222222222222222222222222223333333
16|22222222222222222222222222222222222222222222222222222222222222222222222223333333
17|33333333333333333333333333333333333333333333333333333333333333333333333333333333
18|44444444444444443333333333333333333333333333333333333333333333333333333333333333
19|33333333555555555555555555555555555555333333333333333333333333333333333333333333
20|33333333555555555555555555555555555555553333333333333333333333333333333333333333
21|33333333555555553222222233333333333333333333333333333333333333333333333333333333
22|33333333333333333333333333333333333333333333333333333333333333333333333333333333
23|33333333333333333333333333333333333333333333333333333333333333333333333333333333
24|66666666633333333333333333333333333333333333333333333333333333333333333333333333
25|77777777777777777777777777777777777777777777777777777777777777777777777777777777
26|77777777777777777777777777777777777777777777777777777777777777777777777777777777
27|88888888888888888888888888888888888888888888888888888888888888888888888888888888
01|00000000000000000000000000000000000000000000000111111111111111111111111111111111
02|11111111111111111111111111111111111111111111111111111111111111111111111111111111
03|00000000000000000000000000000000000000000000000000000000001111111111111111111111
04|00000000000000000000000000001111111111111111111111111111111111111111111111111111
05|00000000000000000000000000000000000000000000000000001111111111111111111111111111
06|00000000000000000000000000000000000000000011111111111111111111111111111111111111
07|11111111111111111111111111111111111111111111111111111111111111111111111111111111
08|00000000000000000000000000000000000000000000000000000000000000001111111111111111
09|11111111111111111111111111111111111111111111111111111111111111111111111111111111
10|00000000000000000000000000000000000000000000000000000000000000000000000000001111
11|00000000000000000000000000011111111111111111111111111111111111111111111111111111
12|11111111111111111111111111111111111111111111111111111111111111111111111111111111
13|00000000000000000000000000000000000000000000000000000000000000001111111111111111
14|00000000000000000000000000000000000000000000000000000000000000000000000001111111
15|00000000000000000000000000000000000000000000000000000000000000000000000001111111
16|11111111111111111111111111111111111111111111111111111111111111111111111111111111
17|22222222222222221111111111111111111111111111111111111111111111111111111111111111
18|11111111333333333333333333333333333333111111111111111111111111111111111111111111
19|11111111333333333333333333333333333333331111111111111111111111111111111111111111
20|11111111333333331000000011111111111111111111111111111111111111111111111111111111
21|11111111111111111111111111111111111111111111111111111111111111111111111111111111
22|11111111111111111111111111111111111111111111111111111111111111111111111111111111
23|44444444411111111111111111111111111111111111111111111111111111111111111111111111
24|55555555555555555555555555555555555555555555555555555555555555555555555555555555
25|55555555555555555555555555555555555555555555555555555555555555555555555555555555
26|55555555555555555555555555555555555555555555555555555555555555555555555555555555
27|66666666666666666666666666666666666666666666666666666666666666666666666666666666

View File

@ -1,83 +1,83 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|
01| [No Name] m//confirm-update X
02|This is a confirmation report before an update.
03|
04|Line `+++ <plugin_name> +++` means plugin will be updated.
05|See update details below it.
06|Changes starting with ">"/"<" will be added/removed.
07|Remove the line to not update that plugin.
08|
09|Line `--- <plugin_name> ---` means plugin has nothing to update.
10|
11|Line `!!! <plugin_name> !!!` means plugin had an error and won't be updated.
12|See error details below it.
13|
14|Use regular fold keys (`zM`, `zR`, etc.) to manage shorter view.
15|To finish update, write this buffer (for example, with `:write` command).
16|To cancel update, close this window (for example, with `:close` command).
17|
18|!!! plugin_3 !!!
19|
20|ERROR CODE 1
21|Error computing origin
22|
23|+++ plugin_2 +++
24|Path: MOCKDIR/pack/deps/opt/plugin_2
25|Source: https://new_source/plugin_2
26|State before: sha2head
27|State after: new2head (master)
28|
29|Pending updates from `master`:
30|< sha2head | 2024-01-02 01:01:01 +0200 | Neo McVim
31| Removed commit in plugin_2.
32|> new2head | 2024-01-02 02:02:02 +0200 | Neo McVim
33| Added commit in plugin_2.
34|
35|--- plugin_1 ---
36|Path: MOCKDIR/pack/deps/opt/plugin_1
37|Source: https://github.com/user/plugin_1
38|State: sha1head (main)
01|This is a confirmation report before an update.
02|
03|Line `+++ <plugin_name> +++` means plugin will be updated.
04|See update details below it.
05|Changes starting with ">"/"<" will be added/removed.
06|Remove the line to not update that plugin.
07|
08|Line `--- <plugin_name> ---` means plugin has nothing to update.
09|
10|Line `!!! <plugin_name> !!!` means plugin had an error and won't be updated.
11|See error details below it.
12|
13|Use regular fold keys (`zM`, `zR`, etc.) to manage shorter view.
14|To finish update, write this buffer (for example, with `:write` command).
15|To cancel update, close this window (for example, with `:close` command).
16|
17|!!! plugin_3 !!!
18|
19|ERROR CODE 1
20|Error computing origin
21|
22|+++ plugin_2 +++
23|Path: MOCKDIR/pack/deps/opt/plugin_2
24|Source: https://new_source/plugin_2
25|State before: sha2head
26|State after: new2head (master)
27|
28|Pending updates from `master`:
29|< sha2head | 2024-01-02 01:01:01 +0200 | Neo McVim
30| Removed commit in plugin_2.
31|> new2head | 2024-01-02 02:02:02 +0200 | Neo McVim
32| Added commit in plugin_2.
33|
34|--- plugin_1 ---
35|Path: MOCKDIR/pack/deps/opt/plugin_1
36|Source: https://github.com/user/plugin_1
37|State: sha1head (main)
38|~
39|~
40|
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|00000000000111111111111111111100000000000000000000000000000000000000000000000000
02|22222222222222222222222222222222222222222222222333333333333333333333333333333333
03|33333333333333333333333333333333333333333333333333333333333333333333333333333333
04|22222222222222222222222222222222222222222222222222222222223333333333333333333333
05|22222222222222222222222222223333333333333333333333333333333333333333333333333333
06|22222222222222222222222222222222222222222222222222223333333333333333333333333333
07|22222222222222222222222222222222222222222233333333333333333333333333333333333333
08|33333333333333333333333333333333333333333333333333333333333333333333333333333333
09|22222222222222222222222222222222222222222222222222222222222222223333333333333333
10|33333333333333333333333333333333333333333333333333333333333333333333333333333333
11|22222222222222222222222222222222222222222222222222222222222222222222222222223333
12|22222222222222222222222222233333333333333333333333333333333333333333333333333333
13|33333333333333333333333333333333333333333333333333333333333333333333333333333333
14|22222222222222222222222222222222222222222222222222222222222222223333333333333333
15|22222222222222222222222222222222222222222222222222222222222222222222222223333333
16|22222222222222222222222222222222222222222222222222222222222222222222222223333333
17|33333333333333333333333333333333333333333333333333333333333333333333333333333333
18|44444444444444443333333333333333333333333333333333333333333333333333333333333333
19|33333333333333333333333333333333333333333333333333333333333333333333333333333333
20|33333333333333333333333333333333333333333333333333333333333333333333333333333333
21|33333333333333333333333333333333333333333333333333333333333333333333333333333333
22|33333333333333333333333333333333333333333333333333333333333333333333333333333333
23|55555555555555553333333333333333333333333333333333333333333333333333333333333333
24|33333333333333666666666666666666666666666666333333333333333333333333333333333333
25|33333333333333666666666666666666666666666333333333333333333333333333333333333333
26|33333333333333666666663333333333333333333333333333333333333333333333333333333333
27|33333333333333666666663222222223333333333333333333333333333333333333333333333333
28|33333333333333333333333333333333333333333333333333333333333333333333333333333333
29|33333333333333333333333333333333333333333333333333333333333333333333333333333333
30|77777777777777777777777777777777777777777777777777333333333333333333333333333333
31|33333333333333333333333333333333333333333333333333333333333333333333333333333333
32|88888888888888888888888888888888888888888888888888333333333333333333333333333333
33|33333333333333333333333333333333333333333333333333333333333333333333333333333333
34|33333333333333333333333333333333333333333333333333333333333333333333333333333333
35|99999999999999993333333333333333333333333333333333333333333333333333333333333333
36|33333333666666666666666666666666666666333333333333333333333333333333333333333333
37|33333333666666666666666666666666666666663333333333333333333333333333333333333333
38|33333333666666663222222333333333333333333333333333333333333333333333333333333333
39|::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
40|;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
01|00000000000000000000000000000000000000000000000111111111111111111111111111111111
02|11111111111111111111111111111111111111111111111111111111111111111111111111111111
03|00000000000000000000000000000000000000000000000000000000001111111111111111111111
04|00000000000000000000000000001111111111111111111111111111111111111111111111111111
05|00000000000000000000000000000000000000000000000000001111111111111111111111111111
06|00000000000000000000000000000000000000000011111111111111111111111111111111111111
07|11111111111111111111111111111111111111111111111111111111111111111111111111111111
08|00000000000000000000000000000000000000000000000000000000000000001111111111111111
09|11111111111111111111111111111111111111111111111111111111111111111111111111111111
10|00000000000000000000000000000000000000000000000000000000000000000000000000001111
11|00000000000000000000000000011111111111111111111111111111111111111111111111111111
12|11111111111111111111111111111111111111111111111111111111111111111111111111111111
13|00000000000000000000000000000000000000000000000000000000000000001111111111111111
14|00000000000000000000000000000000000000000000000000000000000000000000000001111111
15|00000000000000000000000000000000000000000000000000000000000000000000000001111111
16|11111111111111111111111111111111111111111111111111111111111111111111111111111111
17|22222222222222221111111111111111111111111111111111111111111111111111111111111111
18|11111111111111111111111111111111111111111111111111111111111111111111111111111111
19|11111111111111111111111111111111111111111111111111111111111111111111111111111111
20|11111111111111111111111111111111111111111111111111111111111111111111111111111111
21|11111111111111111111111111111111111111111111111111111111111111111111111111111111
22|33333333333333331111111111111111111111111111111111111111111111111111111111111111
23|11111111111111444444444444444444444444444444111111111111111111111111111111111111
24|11111111111111444444444444444444444444444111111111111111111111111111111111111111
25|11111111111111444444441111111111111111111111111111111111111111111111111111111111
26|11111111111111444444441000000001111111111111111111111111111111111111111111111111
27|11111111111111111111111111111111111111111111111111111111111111111111111111111111
28|11111111111111111111111111111111111111111111111111111111111111111111111111111111
29|55555555555555555555555555555555555555555555555555111111111111111111111111111111
30|11111111111111111111111111111111111111111111111111111111111111111111111111111111
31|66666666666666666666666666666666666666666666666666111111111111111111111111111111
32|11111111111111111111111111111111111111111111111111111111111111111111111111111111
33|11111111111111111111111111111111111111111111111111111111111111111111111111111111
34|77777777777777771111111111111111111111111111111111111111111111111111111111111111
35|11111111444444444444444444444444444444111111111111111111111111111111111111111111
36|11111111444444444444444444444444444444441111111111111111111111111111111111111111
37|11111111444444441000000111111111111111111111111111111111111111111111111111111111
38|88888888888888888888888888888888888888888888888888888888888888888888888888888888
39|88888888888888888888888888888888888888888888888888888888888888888888888888888888
40|99999999999999999999999999999999999999999999999999999999999999999999999999999999

View File

@ -0,0 +1,33 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|---------|
01|local a = 1
02|local t = {
03| x = math.max(a, 2),
04| y = math.min(a, 2),
05|┌> ▏────────────────────────────────────────────────────┐
06|│[ Number] a │
07|│[ Object] t │
08|│[ Variable] x │
09|│[ Variable] y │
10|│ │
11|│ │
12|│ │
13|│ │
14|└ LSP (document_symbol) ───────────────────────── 1|4|4 ┘
15|
--|---------|---------|---------|---------|---------|---------|---------|---------|---------|
01|000001111121111111111111111111111111111111111111111111111111111111111111111111111111111111
02|000001111131111111111111111111111111111111111111111111111111111111111111111111111111111111
03|114111333356665151255111111111111111111111111111111111111111111111111111111111111111111111
04|114111333356665151255111111111111111111111111111111111111111111111111111111111111111111111
05|788877777777777777777777777777777777777777777777777777777111111111111111111111111111111111
06|7999999999999:::::::::::::::::::::::::::::::::::::::::::7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
07|7<<<<<<<<<<<<===========================================7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
08|7>>>>>>>>>>>>>>=========================================7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
09|7>>>>>>>>>>>>>>=========================================7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
11|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14|7@@@@@@@@@@@@@@@@@@@@@@@7777777777777777777777777@@@@@@@7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
15|111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

View File

@ -0,0 +1,33 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|---------|
01|local a = 1
02|local t = {
03| x = math.max(a, 2),
04| y = math.min(a, 2),
05|┌> ▏────────────────────────────────────────────────────┐
06|│[Number ] a │
07|│[Object ] t │
08|│[Variable ] x │
09|│[Variable ] y │
10|│ │
11|│ │
12|│ │
13|│ │
14|└ LSP (document_symbol) ───────────────────────── 1|4|4 ┘
15|
--|---------|---------|---------|---------|---------|---------|---------|---------|---------|
01|000001111121111111111111111111111111111111111111111111111111111111111111111111111111111111
02|000001111131111111111111111111111111111111111111111111111111111111111111111111111111111111
03|114111333356665151255111111111111111111111111111111111111111111111111111111111111111111111
04|114111333356665151255111111111111111111111111111111111111111111111111111111111111111111111
05|788877777777777777777777777777777777777777777777777777777111111111111111111111111111111111
06|7999999999999:::::::::::::::::::::::::::::::::::::::::::7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
07|7<<<<<<<<<<<<===========================================7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
08|7>>>>>>>>>>>>>>=========================================7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
09|7>>>>>>>>>>>>>>=========================================7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
11|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14|7@@@@@@@@@@@@@@@@@@@@@@@7777777777777777777777777@@@@@@@7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
15|111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

View File

@ -0,0 +1,33 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|---------|
01|local a = 1
02|local t = {
03| x = math.max(a, 2),
04| y = math.min(a, 2),
05|┌> ▏────────────────────────────────────────────────────┐
06|│[] a │
07|│[] t │
08|│[] x │
09|│[] y │
10|│ │
11|│ │
12|│ │
13|│ │
14|└ LSP (document_symbol) ───────────────────────── 1|4|4 ┘
15|
--|---------|---------|---------|---------|---------|---------|---------|---------|---------|
01|000001111121111111111111111111111111111111111111111111111111111111111111111111111111111111
02|000001111131111111111111111111111111111111111111111111111111111111111111111111111111111111
03|114111333356665151255111111111111111111111111111111111111111111111111111111111111111111111
04|114111333356665151255111111111111111111111111111111111111111111111111111111111111111111111
05|788877777777777777777777777777777777777777777777777777777111111111111111111111111111111111
06|799999::::::::::::::::::::::::::::::::::::::::::::::::::7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
07|7<<<<<==================================================7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
08|7>>>>>==================================================7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
09|7>>>>>==================================================7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
11|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14|7@@@@@@@@@@@@@@@@@@@@@@@7777777777777777777777777@@@@@@@7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
15|111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

View File

@ -0,0 +1,33 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|---------|
01|local a = 1
02|local t = {
03| x = math.max(a, 2),
04| y = math.min(a, 2),
05|┌> ▏────────────────────────────────────────────────────┐
06|│tests/dir-extra/real-files/a.lua│1│7│ [ Number] a │
07|│tests/dir-extra/real-files/a.lua│2│7│ [ Object] t │
08|│tests/dir-extra/real-files/a.lua│3│3│ [ Variable] x │
09|│tests/dir-extra/real-files/a.lua│4│3│ [ Variable] y │
10|│ │
11|│ │
12|│ │
13|│ │
14|└ LSP (workspace_symbol) ──────────────────────── 1|4|4 ┘
15|
--|---------|---------|---------|---------|---------|---------|---------|---------|---------|
01|000001111121111111111111111111111111111111111111111111111111111111111111111111111111111111
02|000001111131111111111111111111111111111111111111111111111111111111111111111111111111111111
03|114111333356665151255111111111111111111111111111111111111111111111111111111111111111111111
04|114111333356665151255111111111111111111111111111111111111111111111111111111111111111111111
05|788877777777777777777777777777777777777777777777777777777111111111111111111111111111111111
06|799999999999999999999999999999999999999999999999999:::::7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
07|7<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<=====7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
08|7>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>===7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
09|7>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>===7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
11|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14|7@@@@@@@@@@@@@@@@@@@@@@@@777777777777777777777777@@@@@@@7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
15|111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

View File

@ -0,0 +1,33 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|---------|
01|local a = 1
02|local t = {
03| x = math.max(a, 2),
04| y = math.min(a, 2),
05|┌> ▏────────────────────────────────────────────────────┐
06|│tests/dir-extra/real-files/a.lua│1│7│ [Number ] a │
07|│tests/dir-extra/real-files/a.lua│2│7│ [Object ] t │
08|│tests/dir-extra/real-files/a.lua│3│3│ [Variable ] x │
09|│tests/dir-extra/real-files/a.lua│4│3│ [Variable ] y │
10|│ │
11|│ │
12|│ │
13|│ │
14|└ LSP (workspace_symbol) ──────────────────────── 1|4|4 ┘
15|
--|---------|---------|---------|---------|---------|---------|---------|---------|---------|
01|000001111121111111111111111111111111111111111111111111111111111111111111111111111111111111
02|000001111131111111111111111111111111111111111111111111111111111111111111111111111111111111
03|114111333356665151255111111111111111111111111111111111111111111111111111111111111111111111
04|114111333356665151255111111111111111111111111111111111111111111111111111111111111111111111
05|788877777777777777777777777777777777777777777777777777777111111111111111111111111111111111
06|799999999999999999999999999999999999999999999999999:::::7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
07|7<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<=====7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
08|7>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>===7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
09|7>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>===7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
11|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14|7@@@@@@@@@@@@@@@@@@@@@@@@777777777777777777777777@@@@@@@7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
15|111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

View File

@ -0,0 +1,33 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|---------|
01|local a = 1
02|local t = {
03| x = math.max(a, 2),
04| y = math.min(a, 2),
05|┌> ▏────────────────────────────────────────────────────┐
06|│tests/dir-extra/real-files/a.lua│1│7│ [] a │
07|│tests/dir-extra/real-files/a.lua│2│7│ [] t │
08|│tests/dir-extra/real-files/a.lua│3│3│ [] x │
09|│tests/dir-extra/real-files/a.lua│4│3│ [] y │
10|│ │
11|│ │
12|│ │
13|│ │
14|└ LSP (workspace_symbol) ──────────────────────── 1|4|4 ┘
15|
--|---------|---------|---------|---------|---------|---------|---------|---------|---------|
01|000001111121111111111111111111111111111111111111111111111111111111111111111111111111111111
02|000001111131111111111111111111111111111111111111111111111111111111111111111111111111111111
03|114111333356665151255111111111111111111111111111111111111111111111111111111111111111111111
04|114111333356665151255111111111111111111111111111111111111111111111111111111111111111111111
05|788877777777777777777777777777777777777777777777777777777111111111111111111111111111111111
06|79999999999999999999999999999999999999999999::::::::::::7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
07|7<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<============7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
08|7>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>============7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
09|7>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>============7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
11|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13|7???????????????????????????????????????????????????????7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14|7@@@@@@@@@@@@@@@@@@@@@@@@777777777777777777777777@@@@@@@7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
15|111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

View File

@ -0,0 +1,33 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|┌ …es/commo┐┌ .a-dir ────────────────────────────────┐┌ aa-file ───────────┐
02|│ .a-dir ││ aa-file ││ │
03|│ a-dir ││ ab-file ││ │
04|│ b-dir ││ ││ │
05|│ .a-file ││ ││ │
06|│ a-file ││ ││ │
07|└──────────┘└────────────────────────────────────────┘└────────────────────┘
08|~
09|~
10|~
11|~
12|~
13|~
14|~
15| 1,9-7 All
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|01222222222001333333100000000000000000000000000000000001222222210000000000004444
02|05555555566006666666666666666666666666666666666666666006666666666666666666607777
03|08888888111001111111111111111111111111111111111111111009999999999999999999907777
04|08888888111009999999999999999999999999999999999999999009999999999999999999907777
05|01111111111009999999999999999999999999999999999999999009999999999999999999907777
06|01111111111009999999999999999999999999999999999999999009999999999999999999907777
07|00000000000000000000000000000000000000000000000000000000000000000000000000007777
08|77777777777777777777777777777777777777777777777777777777777777777777777777777777
09|77777777777777777777777777777777777777777777777777777777777777777777777777777777
10|77777777777777777777777777777777777777777777777777777777777777777777777777777777
11|77777777777777777777777777777777777777777777777777777777777777777777777777777777
12|77777777777777777777777777777777777777777777777777777777777777777777777777777777
13|77777777777777777777777777777777777777777777777777777777777777777777777777777777
14|77777777777777777777777777777777777777777777777777777777777777777777777777777777
15|44444444444444444444444444444444444444444444444444444444444444444444444444444444

View File

@ -0,0 +1,33 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|┌ …es/commo┐┌ .a-dir ────────────────────────────────┐
02|│ .a-dir ││ aa-file │
03|│ a-dir ││abc │
04|│ b-dir ││ ab-file │
05|│ .a-file ││ │
06|│ a-file ││ │
07|└──────────┘└────────────────────────────────────────┘
08|~
09|~
10|~
11|~
12|~
13|~
14|~
15|-- INSERT -- 2,4 All
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|01222222222031444444133333333333333333333333333333333355555555555555555555555555
02|06666666677031111111111111111111111111111111111111111388888888888888888888888888
03|09999999111037777777777777777777777777777777777777777388888888888888888888888888
04|09999999111031111111111111111111111111111111111111111388888888888888888888888888
05|0111111111103::::::::::::::::::::::::::::::::::::::::388888888888888888888888888
06|0111111111103::::::::::::::::::::::::::::::::::::::::388888888888888888888888888
07|00000000000033333333333333333333333333333333333333333388888888888888888888888888
08|88888888888888888888888888888888888888888888888888888888888888888888888888888888
09|88888888888888888888888888888888888888888888888888888888888888888888888888888888
10|88888888888888888888888888888888888888888888888888888888888888888888888888888888
11|88888888888888888888888888888888888888888888888888888888888888888888888888888888
12|88888888888888888888888888888888888888888888888888888888888888888888888888888888
13|88888888888888888888888888888888888888888888888888888888888888888888888888888888
14|88888888888888888888888888888888888888888888888888888888888888888888888888888888
15|;;;;;;;;;;;;55555555555555555555555555555555555555555555555555555555555555555555

View File

@ -0,0 +1,33 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|┌ MOCK_ROOT/tests/dir-files/common ──────┐
02|│ .a-dir │
03|│def │
04|│ a-dir │
05|│ b-dir │
06|│ .a-file │
07|└────────────────────────────────────────┘
08|~
09|~
10|~
11|~
12|~
13|~
14|~
15|-- INSERT -- 2,4 Top
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|01222222222222222222222222222222221000000033333333333333333333333333333333333333
02|04444444411111111111111111111111111111111055555555555555555555555555555555555555
03|06666666666666666666666666666666666666666055555555555555555555555555555555555555
04|04444444111111111111111111111111111111111055555555555555555555555555555555555555
05|04444444111111111111111111111111111111111055555555555555555555555555555555555555
06|01111111111111111111111111111111111111111055555555555555555555555555555555555555
07|00000000000000000000000000000000000000000055555555555555555555555555555555555555
08|55555555555555555555555555555555555555555555555555555555555555555555555555555555
09|55555555555555555555555555555555555555555555555555555555555555555555555555555555
10|55555555555555555555555555555555555555555555555555555555555555555555555555555555
11|55555555555555555555555555555555555555555555555555555555555555555555555555555555
12|55555555555555555555555555555555555555555555555555555555555555555555555555555555
13|55555555555555555555555555555555555555555555555555555555555555555555555555555555
14|55555555555555555555555555555555555555555555555555555555555555555555555555555555
15|77777777777733333333333333333333333333333333333333333333333333333333333333333333

View File

@ -1,11 +1,11 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|┌MOCK_ROOT/tests/dir-files/temp────────────────────┐
02|│ file-1
03|│ file-2
04|└──────────────────────────────────────────────────┘
05|~
06|~
07|~
01|┌ MOCK_ROOT/tests/dir-files/common ──────┐
02|│def
03|│ a-dir
04|│ b-dir │
05|│ .a-file
06|│a
07|└────────────────────────────────────────┘
08|~
09|~
10|~
@ -13,16 +13,16 @@
12|~
13|~
14|~
15| 2,9-7 All
15|-- INSERT -- 6,2 25%
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|01111111111111111111111111111110000000000000000000002222222222222222222222222222
02|03333333333333333333333333333333333333333333333333304444444444444444444444444444
03|05555555555555555555555555555555555555555555555555504444444444444444444444444444
04|00000000000000000000000000000000000000000000000000004444444444444444444444444444
05|44444444444444444444444444444444444444444444444444444444444444444444444444444444
06|44444444444444444444444444444444444444444444444444444444444444444444444444444444
07|44444444444444444444444444444444444444444444444444444444444444444444444444444444
01|01222222222222222222222222222222221000000033333333333333333333333333333333333333
02|01111111111111111111111111111111111111111044444444444444444444444444444444444444
03|05555555111111111111111111111111111111111044444444444444444444444444444444444444
04|05555555111111111111111111111111111111111044444444444444444444444444444444444444
05|01111111111111111111111111111111111111111044444444444444444444444444444444444444
06|06666666666666666666666666666666666666666044444444444444444444444444444444444444
07|00000000000000000000000000000000000000000044444444444444444444444444444444444444
08|44444444444444444444444444444444444444444444444444444444444444444444444444444444
09|44444444444444444444444444444444444444444444444444444444444444444444444444444444
10|44444444444444444444444444444444444444444444444444444444444444444444444444444444
@ -30,4 +30,4 @@
12|44444444444444444444444444444444444444444444444444444444444444444444444444444444
13|44444444444444444444444444444444444444444444444444444444444444444444444444444444
14|44444444444444444444444444444444444444444444444444444444444444444444444444444444
15|22222222222222222222222222222222222222222222222222222222222222222222222222222222
15|77777777777733333333333333333333333333333333333333333333333333333333333333333333

View File

@ -0,0 +1,33 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|┌ MOCK_ROOT/tests/dir-files/common ──────┐
02|│def │
03|│ a-dir │
04|│ b-dir │
05|│ .a-file │
06|│a-file │
07| a-file ─────────────────────────┘
08| a-dir
09|~
10|~
11|~
12|~
13|~
14|~
15|-- Keyword completion (^N^P) match 1 of 2
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|01222222222222222222222222222222221000000033333333333333333333333333333333333333
02|01111111111111111111111111111111111111111044444444444444444444444444444444444444
03|05555555111111111111111111111111111111111044444444444444444444444444444444444444
04|05555555111111111111111111111111111111111044444444444444444444444444444444444444
05|01111111111111111111111111111111111111111044444444444444444444444444444444444444
06|06666666666666666666666666666666666666666044444444444444444444444444444444444444
07|77777777777777770000000000000000000000000044444444444444444444444444444444444444
08|66666666666666664444444444444444444444444444444444444444444444444444444444444444
09|44444444444444444444444444444444444444444444444444444444444444444444444444444444
10|44444444444444444444444444444444444444444444444444444444444444444444444444444444
11|44444444444444444444444444444444444444444444444444444444444444444444444444444444
12|44444444444444444444444444444444444444444444444444444444444444444444444444444444
13|44444444444444444444444444444444444444444444444444444444444444444444444444444444
14|44444444444444444444444444444444444444444444444444444444444444444444444444444444
15|88888888888888888888888888888999999999999333333333333333333333333333333333333333

View File

@ -1,33 +0,0 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|┌…dir-files/temp┐┌dir───────────────────────────────────────────────┐
02|│ dir ││ file-1 │
03|└───────────────┘│ file │
04|~ └──────────────────────────────────────────────────┘
05|~
06|~
07|~
08|~
09|~
10|~
11|~
12|~
13|~
14|~
15| 1,14-12 All
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|01111111111111110022200000000000000000000000000000000000000000000000033333333333
02|04444455555555550055555555555555555555555555555555555555555555555555066666666666
03|00000000000000000077777777777777777777777777777777777777777777777777066666666666
04|66666666666666666000000000000000000000000000000000000000000000000000066666666666
05|66666666666666666666666666666666666666666666666666666666666666666666666666666666
06|66666666666666666666666666666666666666666666666666666666666666666666666666666666
07|66666666666666666666666666666666666666666666666666666666666666666666666666666666
08|66666666666666666666666666666666666666666666666666666666666666666666666666666666
09|66666666666666666666666666666666666666666666666666666666666666666666666666666666
10|66666666666666666666666666666666666666666666666666666666666666666666666666666666
11|66666666666666666666666666666666666666666666666666666666666666666666666666666666
12|66666666666666666666666666666666666666666666666666666666666666666666666666666666
13|66666666666666666666666666666666666666666666666666666666666666666666666666666666
14|66666666666666666666666666666666666666666666666666666666666666666666666666666666
15|33333333333333333333333333333333333333333333333333333333333333333333333333333333

View File

@ -1,33 +0,0 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|┌…dir-files/temp┐┌dir───────────────────────────────────────────────┐
02|│ dir ││ file │
03|└───────────────┘│ file-1 │
04|~ └──────────────────────────────────────────────────┘
05|~
06|~
07|~
08|~
09|~
10|~
11|~
12|~
13|~
14|~
15| 2,9-7 All
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|01111111111111110022200000000000000000000000000000000000000000000000033333333333
02|04444455555555550066666666666666666666666666666666666666666666666666077777777777
03|00000000000000000055555555555555555555555555555555555555555555555555077777777777
04|77777777777777777000000000000000000000000000000000000000000000000000077777777777
05|77777777777777777777777777777777777777777777777777777777777777777777777777777777
06|77777777777777777777777777777777777777777777777777777777777777777777777777777777
07|77777777777777777777777777777777777777777777777777777777777777777777777777777777
08|77777777777777777777777777777777777777777777777777777777777777777777777777777777
09|77777777777777777777777777777777777777777777777777777777777777777777777777777777
10|77777777777777777777777777777777777777777777777777777777777777777777777777777777
11|77777777777777777777777777777777777777777777777777777777777777777777777777777777
12|77777777777777777777777777777777777777777777777777777777777777777777777777777777
13|77777777777777777777777777777777777777777777777777777777777777777777777777777777
14|77777777777777777777777777777777777777777777777777777777777777777777777777777777
15|33333333333333333333333333333333333333333333333333333333333333333333333333333333

View File

@ -1,33 +0,0 @@
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|┌MOCK_ROOT/tests/dir-files/temp────────────────────┐
02|│ file-1 │
03|│ file-2 │
04|└──────────────────────────────────────────────────┘
05|~
06|~
07|~
08|~
09|~
10|~
11|~
12|~
13|~
14|~
15| 2,14-12 All
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|01111111111111111111111111111110000000000000000000002222222222222222222222222222
02|03333333333333333333333333333333333333333333333333304444444444444444444444444444
03|05555555555555555555555555555555555555555555555555504444444444444444444444444444
04|00000000000000000000000000000000000000000000000000004444444444444444444444444444
05|44444444444444444444444444444444444444444444444444444444444444444444444444444444
06|44444444444444444444444444444444444444444444444444444444444444444444444444444444
07|44444444444444444444444444444444444444444444444444444444444444444444444444444444
08|44444444444444444444444444444444444444444444444444444444444444444444444444444444
09|44444444444444444444444444444444444444444444444444444444444444444444444444444444
10|44444444444444444444444444444444444444444444444444444444444444444444444444444444
11|44444444444444444444444444444444444444444444444444444444444444444444444444444444
12|44444444444444444444444444444444444444444444444444444444444444444444444444444444
13|44444444444444444444444444444444444444444444444444444444444444444444444444444444
14|44444444444444444444444444444444444444444444444444444444444444444444444444444444
15|22222222222222222222222222222222222222222222222222222222222222222222222222222222

View File

@ -13,7 +13,7 @@
12|~
13|~
14|~
15|1 more line; before #1 0 seconds ago 2,9-7 All
15| 2,9-7 All
--|---------|---------|---------|---------|---------|---------|---------|---------|
01|01111111111111111111111111111110000000000000000000002222222222222222222222222222

View File

@ -8,17 +8,19 @@
07|││Go in entry plus │ L │ │
08|││Go out of directory │ h │ │
09|└│Go out of directory plus │ H │─────────────────┘
10|~│Reset <BS>
11|~│Reveal cwd@
12|~│Show Help g?
13|~│Synchronize =
14|~│Trim branch left<
15|~│Trim branch right>
16|~│
17|~│(Press `q` to close)
18|~└───────────────────────────────┘
19|~
20| 1,1 All
10|~│Go to bookmark'
11|~│Reset <BS>
12|~│Reveal cwd@
13|~│Set bookmarkm
14|~│Show Help g?
15|~│Synchronize =
16|~│Trim branch left │ <
17|~│Trim branch right │ >
18|~│ │
19|~│(Press `q` to close)
20|~└───────────────────────────────┘
21|~
22| 1,1 All
--|---------|---------|---------|---------|---------|---------|
01|011111111111111111111111111111111000000000000000000022222222
@ -38,6 +40,8 @@
15|506666666666666666666666666666666055555555555555555555555555
16|506666666666666666666666666666666055555555555555555555555555
17|506666666666666666666666666666666055555555555555555555555555
18|500000000000000000000000000000000055555555555555555555555555
19|555555555555555555555555555555555555555555555555555555555555
20|222222222222222222222222222222222222222222222222222222222222
18|506666666666666666666666666666666055555555555555555555555555
19|506666666666666666666666666666666055555555555555555555555555
20|500000000000000000000000000000000055555555555555555555555555
21|555555555555555555555555555555555555555555555555555555555555
22|222222222222222222222222222222222222222222222222222222222222

View File

@ -8,17 +8,19 @@
07|││Go in entry plus │ L │ │
08|││Go out of directory │ h │ │
09|└│Go out of directory plus │ H │─────────────────┘
10|~│Reset <BS>
11|~│Reveal cwd@
12|~│Show Help Q
13|~│Synchronize =
14|~│Trim branch left<
15|~│Trim branch right>
16|~│
17|~│(Press `q` to close)
18|~└───────────────────────────────┘
19|~
20| 1,1 All
10|~│Go to bookmark'
11|~│Reset <BS>
12|~│Reveal cwd@
13|~│Set bookmarkm
14|~│Show Help Q
15|~│Synchronize =
16|~│Trim branch left │ <
17|~│Trim branch right │ >
18|~│ │
19|~│(Press `q` to close)
20|~└───────────────────────────────┘
21|~
22| 1,1 All
--|---------|---------|---------|---------|---------|---------|
01|011111111111111111111111111111111000000000000000000022222222
@ -38,6 +40,8 @@
15|506666666666666666666666666666666055555555555555555555555555
16|506666666666666666666666666666666055555555555555555555555555
17|506666666666666666666666666666666055555555555555555555555555
18|500000000000000000000000000000000055555555555555555555555555
19|555555555555555555555555555555555555555555555555555555555555
20|222222222222222222222222222222222222222222222222222222222222
18|506666666666666666666666666666666055555555555555555555555555
19|506666666666666666666666666666666055555555555555555555555555
20|500000000000000000000000000000000055555555555555555555555555
21|555555555555555555555555555555555555555555555555555555555555
22|222222222222222222222222222222222222222222222222222222222222

View File

@ -18,7 +18,9 @@
17|~
18|~
19|~
20| g? 1,9-7 All
20|~
21|~
22| g? 1,9-7 All
--|---------|---------|---------|---------|---------|---------|
01|011111111111111111111111111111111000000000000000000022222222
@ -40,4 +42,6 @@
17|555555555555555555555555555555555555555555555555555555555555
18|555555555555555555555555555555555555555555555555555555555555
19|555555555555555555555555555555555555555555555555555555555555
20|222222222222222222222222222222222222222222222222222222222222
20|555555555555555555555555555555555555555555555555555555555555
21|555555555555555555555555555555555555555555555555555555555555
22|222222222222222222222222222222222222222222222222222222222222

View File

@ -5,8 +5,8 @@
04|│ c.gif ││ x = math.max(1, 2), │
05|│ LICENSE ││ y = math.min(1, 2), │
06|│ Makefile ││} │
07|└─────────────────────────┘└─────────────────────────┘
08|~
07|│ top-secret │└─────────────────────────┘
08|└─────────────────────────┘
09|~
10|~
11|~
@ -22,8 +22,8 @@
04|088888888888888888888888880088:8889999;<<<;=;8=;;8888077777777777777777777777777
05|088888888888888888888888880088:8889999;<<<;=;8=;;8888077777777777777777777777777
06|08888888888888888888888888009888888888888888888888888077777777777777777777777777
07|00000000000000000000000000000000000000000000000000000077777777777777777777777777
08|77777777777777777777777777777777777777777777777777777777777777777777777777777777
07|08888888888888888888888888000000000000000000000000000077777777777777777777777777
08|00000000000000000000000000077777777777777777777777777777777777777777777777777777
09|77777777777777777777777777777777777777777777777777777777777777777777777777777777
10|77777777777777777777777777777777777777777777777777777777777777777777777777777777
11|77777777777777777777777777777777777777777777777777777777777777777777777777777777

View File

@ -5,8 +5,8 @@
04|│ c.gif ││Line 3 │
05|│ LICENSE ││Line 4 │
06|│ Makefile ││Line 5 │
07|└─────────────────────────┘│Line 6 │
08|~ │Line 7 │
07|│ top-secret ││Line 6 │
08|└─────────────────────────┘│Line 7 │
09|~ │Line 8 │
10|~ │Line 9 │
11|~ │Line 10 │
@ -22,8 +22,8 @@
04|04444444444444444444444444004444444444444444444444444066666666666666666666666666
05|04444444444444444444444444004444444444444444444444444066666666666666666666666666
06|04444444444444444444444444004444444444444444444444444066666666666666666666666666
07|00000000000000000000000000004444444444444444444444444066666666666666666666666666
08|66666666666666666666666666604444444444444444444444444066666666666666666666666666
07|04444444444444444444444444004444444444444444444444444066666666666666666666666666
08|00000000000000000000000000004444444444444444444444444066666666666666666666666666
09|66666666666666666666666666604444444444444444444444444066666666666666666666666666
10|66666666666666666666666666604444444444444444444444444066666666666666666666666666
11|66666666666666666666666666604444444444444444444444444066666666666666666666666666

Some files were not shown because too many files have changed in this diff Show More