Skip to content

Version 0.16.0

Latest
Compare
Choose a tag to compare
@echasnovski echasnovski released this 20 May 13:06
· 102 commits to main since this release
94cae46

There are following change types:

  • Evolve - change in previously intended functionality while adding a new one.
  • Refine - change in previously intended functionality without adding new one. This is usually described as a "breaking change", but used here in a sense that it might break user's expectations about existing functionality.
  • Expand - adding new functionality without affecting existing ones. This is essentially new features.

All

Evolve

  • Unify behavior of floating windows:

    • Truncate title/footer from left if it is too wide.
    • Set default title if window is allowed to have border.
    • Use single space padding for default title/footer.
    • Use 'single' as default window border in modules where it can be configured. On Neovim>=0.11 also respect non-empty 'winborder' option with lower precedence than explicitly configured value for the module.
  • Unify how module-related buffers are named: mini<module-name>://<buffer-number>/<useful-info>. This structure allows creating identifiable, reasonably unique, and useful buffer names. This is a user facing change because in some cases the shown buffer's name will change (like in statusline of opened 'mini.starter' buffer or output of :buffers!).

  • Stop forcing recommended option values behind set_vim_settings config setting. Instead set them automatically in setup(). If it is not essential, do so only if it was not set by user/plugin beforehand (no matter the value). Document this as a new general principle to be followed in the future. Affected modules:

    • 'mini.bufremove' (do nothing as recommended 'hidden' is on by default)
    • 'mini.completion' (conditionally set 'completeopt=menuone,noselect' and flags "c" in 'shortmess')
    • 'mini.statusline' (do nothing as recommended 'laststatus=2' is default)
    • 'mini.tabline' (unconditionally set 'showtabline=2', as it is essential to module's functinonality)

Refine

  • Soft deprecate support for Neovim 0.8. It will be fully stopped in next release.

mini.ai

Refine

  • Visual textobject selection now puts the cursor on the right edge instead of left. This better aligns with the (undocumented) behavior of how built-in a / i textobjects work in Visual mode, as opposed to the (documented in :h operator-resulting-pos) behavior of how it is done after applying the operator.

Expand

  • Textobject identifier can now be any single character supported by :h getcharstr(). This also makes it possible to use characters outside of Latin alphanumeric and punctuation sets as custom_textobjects keys. Default textobject is extended to be anything but Latin letters (to fall back to :h text-objects).

  • Update gen_spec.treesitter() to respect capture ranges specified by query directives (like (#offset! @table.inner 0 1 0 -1)).

mini.base16

Refine

  • Update 'mini.pick' highlight groups to show prompt text with same colors as match ranges, as they are connected.

Expand

  • Add support for colored markdown headings.

  • Add new plugin integrations:

    • 'ibhagwan/fzf-lua'
    • 'MeanderingProgrammer/render-markdown.nvim'
    • 'OXY2DEV/helpview.nvim'
    • 'OXY2DEV/markview.nvim'

mini.colors

Expand

  • Update convert() to have adjust_lightness option which can be used to disable lightness adjustment (which is enabled by default for a more uniform progression from 0 to 100). This can be useful for output to be more consistent with other Oklab/Oklch implementations.

mini.comment

Expand

  • Update textobject to respect ignore_blank_line option. Blank lines between commented lines are treated as part of a textobject.

mini.completion

Evolve

  • Add snippet support. By default uses 'mini.snippets' to manage snippet session (if enabled, **highly recommended), falls back to vim.snippet on Neovim>=0.10. See "Snippets" section in :h MiniCompletion for more details.

    This affect existing functionality because items with Snippet kind are no longer filtered out by default.

  • Rework how LSP completion items are converted to Neovim's completion items:

    • Show detail highlighted as buffer's language at the start of info window, but only if detail provides information not already present in documentation. It was previously used as extra text in the popup menu (via menu field), but this doesn't quite follow LSP specification: detail and documentation fields can be delayed up until completionItem/resolve request which implies they should be treated similarly.
    • Show labelDetails as a part of the popup menu via menu completion item field.
  • Rework how information window is shown with the goal to reduce flickering during fast up/down navigation through completion candidates:

    • Do not close the window immediately after the move. Instead highlight border with MiniCompletionInfoBorderOutdated immediately while update window when its content is ready. Close the window only if no candidate is selected.
    • Show content of already visited/resolved candidate without delay.
    • Show default -No-info- text if there is no extra information about the candidate.
  • Update behavior and capabilities of default_process_items():

    • Add filtersort option to control how items are filtered and/or sorted. Its new default value has changed behavior: do fuzzy matching if 'completeopt' option contains "fuzzy" entry; same as before otherwise.
    • Add kind_priority option to allow arranging items by completion item kind (like "Variable", "Snippet", "Text", etc.) after applying filtersort. This allows finer filter and/or sort based on kind, like "put Variable on top, Snippet on bottom, remove Text".
    • Use filterText and label item fields during matching (instead of textEdit.newText, insertText, and label as before). This is more aligned with LSP specification.

Refine

  • Prefer in some cases to use nil as default config value with explicit fallback. This should not have any user facing effects and marked as breaking only because a structure of a default config has changed. Affected fields:

    • lsp_completion.process_items (use default_process_items as fallback) and fallback_action (use '<C-n>' as fallback). This makes it more aligned with other modules that usually avoid using function values in default config.
    • window.info.border and window.signature.border (use non-empty 'winborder' and 'single' as fallback).
  • Change default value of MiniCompletionActiveParameter highlight group to link to LspSignatureActiveParameter (instead of forcing underline).

  • Call lsp_completion.process_items with an array of items from all buffer servers at once (and not for each server separately). This can be used for more elaborate filter/sort strategies.

Expand

  • Add scrolling in info and signature window. By default can be done with <C-f> / <C-b> when target window is shown. Can be configured via mappings.scroll_down and mappings.scroll_up config options.

  • Respect isIncomplete in LSP completion response and immediately force new completion request on the next key press.

  • Add support for context in 'textDocument/completion' request.

  • Both info and signature help windows now use tree-sitter highlighting:

    • Info window uses "markdown" parser (works best on Neovim>=0.10 as its parser is built-in). Special markdown characters are concealed (i.e. hidden) which might result into seemingly unnecessary whitespace as dimensions are computed not accounting for that.
    • Signature help uses same parser as in current filetype.
  • Update signature help without delay if it is already shown. This helps to keep signature help up to date after cursor jumps in Insert mode (like during snippet session).

  • Add support for item defaults in CompletionList response.

  • Add get_lsp_capabilities() that returns data about which part of LSP specification is supported in 'mini.completion'.

  • Input items for lsp_completion.process_items now have client_id field with the identifier of the server that item came from. Use vim.lsp.get_client_by_id() to get an actual data about the server.

mini.diff

Expand

  • The config.source can now be array of sources, which will be attempted to attach in order. Important for source's attach to either return false or call MiniDiff.fail_attach() (even not immediately) to signal that source has failed to attach to a particular buffer.

  • Overlay virtual lines now scroll horizontally along with buffer lines. Requires Neovim>=0.11 and disabled 'wrap' option.

  • Highlighting of buffer parts of change hunks can now be customized with these new highlight groups:

    • MiniDiffOverChangeBuf - changed buffer text. Previously used MiniDiffOverChange (for changed reference text); links to it by default.
    • MiniDiffOverContextBuf - context of a change shown in buffer overlay. Previously not highlighted, default highlight group is not created.

mini.doc

Expand

  • FEATURE: improve detection and formatting for types in @param, @return, and similar.

mini.fuzzy

Refine

  • Update process_lsp_items() to only use filterText and label item fields during fuzzy matching (instead of textEdit.newText, insertText, and label as before). This is more aligned with LSP specification.

  • Treat empty word as matching any candidate (matched positions is empty array and score is -1). This behavior is usually more useful in practice.

mini.hues

Evolve

Refine

  • Update 'mini.pick' highlight groups to show prompt text with same colors as match ranges, as they are connected.

Expand

  • Add support for colored markdown headings.

  • Add new plugin integrations:

    • 'ibhagwan/fzf-lua'
    • 'MeanderingProgrammer/render-markdown.nvim'
    • 'OXY2DEV/helpview.nvim'
    • 'OXY2DEV/markview.nvim'

mini.keymap

Expand

  • Introduction of a new module.

mini.notify

Expand

  • Add lsp_progress.level option to control level of LSP progress notifications.

  • Add MiniNotifyLspProgress highlight group to be used for LSP progress notifications.

  • Add data field to notification specification and as a new argument to MiniNotify.add(). It can be used to store any data relevant to the notification. For example, notifications from make_notify() output set source field to 'vim.notify', while notifications from LSP progress set source to 'lsp_progress'.

mini.operators

Expand

  • Update setup() to remap built-in gx Normal/Visual mode mappings (for opening an URI under cursor) to gX (if that is not already taken).

mini.pairs

Expand

  • Update all actions to work with pairs containing multibyte characters (like "¿?", "「」", and similar).

mini.pick

Refine

  • Rename prompt_cursor in config.window to prompt_caret for better naming consistency. It works for now, but will stop in the next release. Sorry for the inconvenience.

Expand

  • Add MiniPickPromptCaret and MiniPickPromptPrefix highlight groups to allow finer customization of picker's prompt.

  • Update get_picker_matches() to return data (items and indexes) about currently shown items.

  • Update set_picker_match_inds() to be able to set current match and marked items indexes.

mini.snippets

Expand

  • Add start_lsp_server() to start specialized in-process LSP server to show loaded snippets inside (auto)completion engines (like 'mini.completion').

mini.statusline

Refine

  • Function section_fileinfo() got several updates:
    • File size is now computed based on the current buffer text and not for file's saved version.
    • File info is now shown even for buffers with empty 'filetype'. It previously was treated as a sign of a "temporary buffer", but it might be a result of an unsuccessful filetype matching.

mini.surround

Expand

  • Surrounding identifier can now be any single character supported by :h getcharstr(). This also makes it possible to use characters outside of Latin alphanumeric and punctuation sets as custom_surroundings keys.

  • Update gen_spec.input.treesitter() to respect capture ranges specified by query directives (like (#offset! @table.inner 0 1 0 -1)).

mini.tabline

Expand

  • Add support for showing special (truncation) characters at left and/or right if there are more tabs to the left and/or right. They are shown with the new MiniTablineTrunc highlight group in case 'list' option is enabled (i.e. user deliberately enabled similar functionality for windows). Exact characters are taken from 'listchars' option: precedes and extends fields.

  • Labels for quickfix and location lists are now different.