Home Explore Blog CI



neovim

2nd chunk of `runtime/doc/news-0.11.txt`
47dff83d08631ce448f4131babb4a9835d882cbe83e8df3c0000000100000fd0
 history.
    • new message kinds: "bufwrite", "completion", "list_cmd", "lua_print",
      "search_cmd", "shell_out/err/ret", "undo", "verbose", wildlist".
• |TermRequest| and |TermResponse| |event-data| is now a table. The "sequence"
  field contains the received sequence. |TermRequest| also contains a "cursor"
  field indicating the cursor's position when the sequence was received.

HIGHLIGHTS

• |TermCursorNC| is removed and no longer supported. Unfocused terminals no
  longer have a cursor.

LSP

• |vim.lsp.buf.references()|, |vim.lsp.buf.declaration()|, |vim.lsp.buf.definition()|,
  |vim.lsp.buf.type_definition()|, |vim.lsp.buf.implementation()| and
  |vim.lsp.buf.hover()| now support merging the results of multiple clients
  but no longer trigger the global handlers from `vim.lsp.handlers`
• |vim.lsp.buf.typehierarchy()| now passes the correct params for each
  client request.
• |vim.lsp.handlers.signature_help()| is no longer used.
• |vim.lsp.diagnostic.on_publish_diagnostics()| and
  |vim.lsp.diagnostic.on_diagnostic()| no longer accept a config parameter and
  can no longer be configured with |vim.lsp.with()|.
  Instead use: >lua
    vim.diagnostic.config(config, vim.lsp.diagnostic.get_namespace(client_id))
<
• |vim.lsp.util.make_position_params()|, |vim.lsp.util.make_range_params()|
  and |vim.lsp.util.make_given_range_params()| now require the `position_encoding`
  parameter.
• |vim.lsp.util.symbols_to_items()| now requires the `position_encoding` parameter.

LUA

• API functions now consistently return an empty dictionary as
  |vim.empty_dict()|. Earlier, a |lua-special-tbl| was sometimes used.
• |vim.json.encode()| no longer escapes forward slashes "/" by default

OPTIONS

• The 'statuscolumn' `%l` item can now be used as a number column segment that
  changes according to related options. It takes care of alignment, 'number',
  'relativenumber' and 'signcolumn' set to "number". The now redundant `%r` item
  is no longer treated specially for 'statuscolumn'.
• `:set {option}<` removes the local value for all |global-local| options instead
  of just string |global-local| options.
• `:setlocal {option}<` copies the global value to the local value for number
  and boolean |global-local| options instead of removing the local value.
• Setting |hidden-options| now gives an error. In particular, setting
  'noshellslash' is now only allowed on Windows.

TREESITTER

• |Query:iter_matches()| correctly returns all matching nodes in a match
  instead of only the last node. This means that the returned table maps
  capture IDs to a list of nodes that need to be iterated over. For
  backwards compatibility, an option `all=false` (only return the last
  matching node) is provided that will be removed in a future release.
• |vim.treesitter.language.get_filetypes()| always includes the {language}
  argument in addition to explicitly registered filetypes.
• |vim.treesitter.language.get_lang()| falls back to the {filetype} argument
  if no languages are explicitly registered.
• |vim.treesitter.language.add()| returns `true` if a parser was loaded
  successfully and `nil,errmsg` otherwise instead of throwing an error.
• |vim.treesitter.get_parser()| and |vim.treesitter.start()| no longer parse the
  tree before returning. Scripts must call |LanguageTree:parse()| explicitly. >lua
    local p = vim.treesitter.get_parser(0, 'c')
    p:parse()
• |vim.treesitter.get_parser()| expects its buffer to be loaded.

TUI

• OSC 52 is used as a fallback clipboard provider when no other
  |clipboard-tool| is found, even when not using SSH |clipboard-osc52|. To
  disable OSC 52 queries, set the "osc52" key of |g:termfeatures| to false.

VIMSCRIPT

• |v:msgpack_types| has the type "binary" removed. |msgpackparse()| no longer
  treats BIN, STR and FIXSTR as separate types. Any of these is returned as a
  string if possible, or a |blob| if the value contained embedded NUL:s.

==============================================================================

Title: Nvim 0.11 Notable Changes (Continued)
Summary
This section continues detailing breaking changes in Nvim 0.11. It covers changes to LSP, including modifications to handler configurations and parameter requirements, updates to Lua API functions, option handling for `statuscolumn` and global-local options, Treesitter functionality, TUI behavior with OSC 52 clipboard, and Vimscript's `v:msgpack_types`.