Home Explore Blog CI



neovim

7th chunk of `runtime/doc/news-0.11.txt`
ce85670ddc45d3d125eff6feb39dfa55b50aee2321be8fd00000000100000b4f
 cursor position when the sequence was received.

TREESITTER

• |LanguageTree:node_for_range()| gets anonymous and named nodes for a range
• |vim.treesitter.get_node()| now takes an option `include_anonymous`, default
  false, which allows it to return anonymous nodes as well as named nodes.
• |treesitter-directive-trim!| can trim all whitespace (not just empty lines)
  from both sides of a node.
• |vim.treesitter.get_captures_at_pos()| now returns the `id` of each capture
• New |TSNode:child_with_descendant()|, which efficiently gets the node's
  child that contains a given node as descendant.
• |LanguageTree:parse()| optionally supports asynchronous invocation, which is
  activated by passing the `on_parse` callback parameter.
• |vim.treesitter.query.set()| can now inherit and/or extend runtime file
  queries in addition to overriding.
• |LanguageTree:is_valid()| now accepts a range parameter to narrow the scope
  of the validity check.
• |:InspectTree| now shows which nodes are missing.
• Bundled markdown highlight queries use `conceal_lines` metadata to conceal
  code block fence lines vertically.
• |vim.treesitter.language.inspect()| shows additional information, including
  parser version for ABI 15 parsers.
• |TSQuery:disable_pattern()| and |TSQuery:disable_capture()| to turn off
  a specific pattern or capture in a query.
• |vim.treesitter.get_captures_at_pos()| returns the `pattern_id` of the
  pattern used to match each capture.
• |Query:iter_captures()| now accepts an `opts` parameter, similar to
  |Query:iter_matches()|.

TUI

• The builtin UI declares info |nvim_set_client_info()| on its channel. See
  |startup-tui|. To see the current UI info, try this: >
    :lua =vim.api.nvim_get_chan_info(vim.api.nvim_list_uis()[1].chan)
• |log| messages written by the builtin UI client (TUI, |--remote-ui|) are
  now prefixed with "ui" instead of "?".
• The TUI will re-query the terminal's background color when a theme update
  notification is received and Nvim will update 'background' accordingly.

UI

• |:detach| the current UI, let the Nvim server continue running as a background
  process. Works with the builtin TUI, and all GUIs.
• |vim.ui.open()| (by default bound to |gx|) accepts an `opt.cmd` parameter
  which controls the tool used to open the given path or URL. If you want to
  globally set this, you can override vim.ui.open using the same approach
  described at |vim.paste()|.
• `vim.ui.open()` now supports
  [lemonade](https://github.com/lemonade-command/lemonade) as an option for
  opening urls/files. This is handy if you are in an ssh connection and use
  `lemonade`.
• The |ins-completion-menu| now supports cascading highlight styles.
  |hl-PmenuSel| and |hl-PmenuMatch| both inherit from |hl-Pmenu|, and
  |hl-PmenuMatchSel| inherits highlights from both |hl-PmenuSel| and
  |hl-PmenuMatch|.

Title: Nvim 0.11: Treesitter, TUI, and UI Updates
Summary
This section details updates to Treesitter, the TUI, and UI features in Nvim 0.11. Treesitter enhancements include more options for working with nodes, queries, and captures, plus improved markdown highlighting and inspection. The TUI now declares client info and re-queries the terminal's background color on theme updates. The UI introduces features such as detaching, customizing the tool used to open URLs and files with `vim.ui.open()`, and cascading highlight styles for the completion menu.