Home Explore Blog CI



neovim

6th chunk of `runtime/doc/news-0.10.txt`
4337e3e572ee7f2aca59a29762cc2473e4b4872e5fb5e32a0000000100001000
 |:setlocal| behaviour. Currently
    only `0` for the buffer index is supported.
  • Improved messages for type errors in `vim.api.*` calls (including `opts` params).
  • Lua type annotations for:
    • `vim.*`
    • `vim.fn.*`
    • `vim.api.*`
    • `vim.v.*`
  • Functions that take a severity as an optional parameter (e.g.
    |vim.diagnostic.get()|) now also accept a list of severities |vim.diagnostic.severity|
  • |vim.diagnostic.count()| returns the number of diagnostics for a given
    buffer and/or namespace, by severity. This is a faster alternative to
    |vim.diagnostic.get()| when only the number of diagnostics is needed, but
    not the diagnostics themselves.
  • |vim.diagnostic.is_enabled()|
  • |vim.version.le()|, |vim.version.ge()|
  • |vim.fs.root()| finds project root directories from a list of "root
    markers".
  • |vim.tbl_contains()| now works for general tables and allows specifying
    a predicate function that is checked for each value. (Use
    |vim.list_contains()| for checking list-like tables (integer keys without
    gaps) for literal values.)
  • vim.region() can use a string accepted by |getpos()| as position.

• Options:
  • 'winfixbuf' keeps a window focused onto a specific buffer
  • 'smoothscroll' option to scroll by screen line rather than by text line
    when 'wrap' is set.
  • 'foldtext' now supports virtual text format. |fold-foldtext|
  • 'foldtext' can be set to an empty string to disable and render the line:
    as normal with regular highlighting and no line wrapping.
  • 'complete' option supports "f" flag for completing buffer names.
  • 'completeopt' option supports "popup" flag to show extra information in
    a floating window.
  • 'errorfile' (|-q|) accepts `-` as an alias for stdin.

• Performance:
  • 'diffopt' "linematch" scoring algorithm now favours larger and less groups
    https://github.com/neovim/neovim/pull/23611
  • Treesitter highlighting now parses injections incrementally during
    screen redraws only for the line range being rendered. This significantly
    improves performance in large files with many injections.
  • 'breakindent' performance is significantly improved for wrapped lines.
  • Cursor movement, insertion with [count] and |screenpos()| are now faster.

• Plugins:
  • Nvim now includes |commenting| support.
  • |:Man| supports the `:hide` modifier to open page in the current window.
  • |:Man| respects 'wrapmargin'

• Startup:
  • |$NVIM_APPNAME| can be set to a relative path instead of only a name.
  • |--startuptime| reports startup times for both processes (TUI + server) as
    separate sections.

• Terminal:
  • |:terminal| accepts some |:command-modifiers| (specifically |:horizontal|
    and those that affect splitting a window).
  • Terminal buffers emit a |TermRequest| autocommand event when the child
    process emits an OSC or DCS control sequence.
  • Terminal buffers respond to OSC background and foreground requests.
    |default-autocmds|

• Treesitter:
  • Bundled parser and queries (highlight, folds) for Markdown (used for LSP
    hover).
  • |:InspectTree| shows root nodes.
  • |:InspectTree| now supports |folding|.
  • |:InspectTree| shows node ranges in 0-based instead of 1-based indexing.
  • |vim.treesitter.foldexpr()| now recognizes folds captured using a
    quantified query pattern.
  • |vim.treesitter.query.omnifunc()| provides completion in treesitter query
    files (set by default).
  • |vim.treesitter.query.edit()| provides live editing of treesitter queries.
  • |Query:iter_matches()| now has the ability to set the maximum start depth
    for matches.
  • `@injection.language` now has smarter resolution and will fall back to
    language aliases (e.g., filetype or custom shorthands) registered via
    |vim.treesitter.language.register()| and/or attempt lower case variants of
    the text.
  • `@injection.filename` will try to match the node text via
    |vim.filetype.match()| and treat the result as a language name in

Title: Nvim 0.10 Release Notes: Lua Updates, New Options, Performance, Plugins, Startup, Terminal, Treesitter
Summary
Nvim 0.10 brings further Lua improvements, including enhanced type error messages, type annotations for various `vim` modules, diagnostic handling, version checks, and table/list utilities. New options include 'winfixbuf', 'smoothscroll', 'foldtext' enhancements, 'complete' flags, and 'errorfile' stdin support. Performance is improved in diff algorithm, Treesitter highlighting, breakindent, and cursor movements. Plugin support includes commenting, `:Man` page enhancements. Startup reports separate TUI/server times. Terminal gains command modifiers and OSC/DCS event handling. Treesitter receives Markdown support, node inspection improvements, fold recognition, query completion/editing, match iteration, and injection language resolution.