Home Explore Blog CI



neovim

2nd chunk of `runtime/doc/news-0.10.txt`
a1a2db8de3485fd5d167ad55e75200fd32745efd71f8b58d0000000100000fe2
 Returning any truthy value from a callback passed to
    |nvim_create_autocmd()| (rather than just `true`) will delete the
    autocommand.

• LSP:
  • |LanguageTree:parse()| will no longer parse injections by default and now
    requires an explicit range argument to be passed. If injections are
    required, provide an explicit range via `parser:parse({ start_row, end_row })`.
  • |vim.lsp.util.parse_snippet()| will now strictly follow the snippet
    grammar defined by LSP, and hence previously parsed snippets might now be
    considered invalid input.
  • |vim.lsp.codelens.refresh()| now takes an `opts` argument. With this
    change, the default behavior of just refreshing the current buffer has
    been replaced by refreshing all buffers.
  • |vim.lsp.util.extract_completion_items()| will no longer return reliable
    results, since it does not apply `itemDefaults` when its input is
    a `CompletionList`. Moreover, since support for LSP
    `completionList.itemDefaults` was added, some third party plugins might be
    negatively impacted in case the language servers support the feature but
    the plugin does not. If necessary, the respective capability can be
    removed when calling |vim.lsp.protocol.make_client_capabilities()|.
  • |LspRequest| and LspProgressUpdate (renamed to |LspProgress|) autocmds
    were promoted from |User| autocmds to first class citizens.

• Lua:
  • |-l| ensures output ends with a newline if the script prints messages and
    doesn't cause Nvim to exit.
  • Removed functions from the |vim.json| module:
    • Unnecessary, undocumented functions which caused global side-effects.
    • `vim.json.null` is redundant with `vim.NIL`.
    • `vim.json.array_mt` (and related) is redundant with `vim.empty_dict()`.
  • |vim.islist()| now checks whether a table is actually list-like (i.e., has
    integer keys without gaps and starting from 1). For the previous behavior
    (only check for integer keys, allow gaps or not starting with 1), use
    |vim.isarray()|.
  • Renamed `vim.treesitter.playground` to `vim.treesitter.dev`.

• Options:
  • Removed some Vim 5.0<= option compatibilities:
    • 'backspace' no longer supports number values. Instead:
      • for `backspace=0` set `backspace=` (empty)
      • for `backspace=1` set `backspace=indent,eol`
      • for `backspace=2` set `backspace=indent,eol,start` (default behavior in Nvim)
      • for `backspace=3` set `backspace=indent,eol,nostop`
    • 'backupdir' and 'directory' will no longer remove a `>` at the start of
      the option.
  • |OptionSet| autocommand args |v:option_new|, |v:option_old|,
    |v:option_oldlocal|, |v:option_oldglobal| now have the type of the option
    instead of always being strings. |v:option_old| is now the old global
    value for all global-local options, instead of just string global-local
    options.
  • Local value for a global-local number/boolean option is now unset when the
    option is set (e.g. using |:set| or |nvim_set_option_value()|) without
    a scope, which means they now behave the same way as string options.

• Plugins:
  • |:TOhtml| has been rewritten in Lua to support Nvim-specific decorations,
    and many options have been removed.

• Treesitter:
  • Treesitter highlight groups have been renamed to be more in line with
    upstream tree-sitter and Helix to make it easier to share queries. The
    full list is documented in |treesitter-highlight-groups|.

• TUI:
  • In some cases, the cursor in the Nvim |TUI| used to blink even without
    configuring 'guicursor' as mentioned in |cursor-blinking|. This was a bug
    that has now been fixed. If your cursor has stopped blinking, add the
    following (or similar, adapted to user preference) to your |config| file: >vim
      set guicursor+=n-v-c:blinkon500-blinkoff500
<

==============================================================================
NEW FEATURES

The following new features were added.

• API:
  • Passing 0 to |nvim_get_chan_info()| gets

Title: Nvim 0.10 Release Notes: Breaking Changes (Continued)
Summary
This section continues detailing breaking changes in Nvim 0.10. It covers LSP changes (LanguageTree parsing, snippet parsing, codelens refresh, completion items extraction, and LspRequest/LspProgress autocmds), Lua API modifications (removal of functions from `vim.json`, `vim.islist()` behavior), option handling (removal of Vim 5.0 compatibility for 'backspace', 'backupdir', and 'directory', changes to OptionSet autocommand arguments, local value behavior for global-local options), plugin changes (rewritten :TOhtml), Treesitter highlight group renaming, and a TUI fix for cursor blinking. It then transitions into listing the new features introduced in Nvim 0.10, starting with API additions.