Home Explore Blog CI



neovim

4th chunk of `runtime/doc/news-0.10.txt`
514dc330ee938044a4594d0d63d4cc8627e21181b12464f30000000100000ff7
 first. In addition, |nvim_buf_get_extmarks()| has gained an "overlap"
    option to return such ranges even if they started before the specified
    position.

• Defaults:
  • The `workspace/didChangeWatchedFiles` LSP client capability is now enabled
    by default on Mac and Windows. Disabled on Linux since there currently
    isn't a viable backend for watching files that scales well for large
    directories.
  • On Windows 'isfname' does not include ":". Drive letters are handled
    correctly without it. (Use |gF| for filepaths suffixed with ":line:col").
  • 'comments' includes "fb:•".
  • 'shortmess' includes the "C" flag.
  • 'grepprg' uses the -H and -I flags for grep by default,
    and defaults to using ripgrep if available.
  • "]d" and "[d" in Normal mode map to |vim.diagnostic.goto_next()| and
    |vim.diagnostic.goto_prev()|, respectively. |]d-default| |[d-default|
  • <C-W>d (and <C-W><C-D>) map to |vim.diagnostic.open_float()|
    |CTRL-W_d-default|
  • |vim.lsp.start()| sets the following default keymaps (assuming server
    support):
    • |K| in Normal mode maps to |vim.lsp.buf.hover()|, unless 'keywordprg'
      was customized before calling |vim.lsp.start()|.
  • Automatic linting of treesitter query files (see |ft-query-plugin|).
    Can be disabled via: >lua
      vim.g.query_lint_on = {}
<
  • Enabled treesitter highlighting for:
    • Treesitter query files
    • Vim help files
    • Lua files

• Editor:
  • Better cmdline completion for string option value. |complete-set-option|
    • Try it with `:set listchars=<Tab>`
  • By default, the swapfile "ATTENTION" |E325| dialog is skipped if the
    swapfile is owned by a running Nvim process, instead of prompting. If you
    always want the swapfile dialog, delete the default SwapExists handler:
    `autocmd! nvim.swapfile`. |default-autocmds|
  • Navigating the |jumplist| with CTRL+O, CTRL+I behaves more intuitively
    when deleting buffers, and avoids "invalid buffer" cases. #25461
  • |:fclose| command.
  • |v_Q-default| and |v_@-default| repeat a register for each line of a linewise
    visual selection.
  • Clicking on a tabpage in the tabline with the middle mouse button closes it.
  • |:checkhealth| buffer can be opened in a split window using modifiers like
    |:vertical|, |:horizontal| and |:botright|.

• Events:
  • |vim.on_key()| callbacks receive a second argument for keys typed before
    mappings are applied.

• LSP:
  • LSP method names are available in |vim.lsp.protocol.Methods|.
  • Implemented LSP inlay hints: |lsp-inlay_hint|
    https://microsoft.github.io/language-server-protocol/specification/#textDocument_inlayHint
  • Implemented pull diagnostic textDocument/diagnostic: |vim.lsp.diagnostic.on_diagnostic()|
    https://microsoft.github.io/language-server-protocol/specification/#textDocument_diagnostic
  • Implemented LSP type hierarchy: |vim.lsp.buf.typehierarchy()|
    https://microsoft.github.io/language-server-protocol/specification/#textDocument_prepareTypeHierarchy
  • |vim.lsp.status()| consumes the last progress messages as a string.
  • LSP client now always saves and restores named buffer marks when applying
    text edits.
  • LSP client now supports the `positionEncoding` server capability. If a server
    responds with the `positionEncoding` capability in its initialization
    response, Nvim automatically sets the client's `offset_encoding` field.
  • Dynamic registration of LSP capabilities. An implication of this change is
    that checking a client's `server_capabilities` is no longer a sufficient
    indicator to see if a server supports a feature. Instead use
    `client.supports_method(<method>)`. It considers both the dynamic
    capabilities and static `server_capabilities`.
  • `anchor_bias` option to lsp-handlers aids in positioning of floating
    windows.
  • |vim.lsp.util.locations_to_items()| sets the `user_data` of each item to
    the original LSP `Location` or `LocationLink`.
  • Added support for connecting

Title: Nvim 0.10 Release Notes: New Features (Defaults, Editor, Events, LSP)
Summary
This section covers new features in Nvim 0.10. Default changes include LSP client capabilities, 'isfname', 'comments', 'shortmess', 'grepprg', diagnostic keymaps, treesitter linting, and highlighting. Editor improvements include cmdline completion, swapfile handling, intuitive jumplist behavior, `:fclose` command, visual selection register repetition, tab closing with middle mouse, and split window `:checkhealth`. Event updates include a second argument in `vim.on_key()` callbacks. LSP enhancements include LSP method names, inlay hints, pull diagnostics, type hierarchy, `vim.lsp.status()`, saving/restoring buffer marks, `positionEncoding` support, dynamic capability registration, `anchor_bias` option for LSP handlers, and `vim.lsp.util.locations_to_items()` setting `user_data`.