mirror of
https://github.com/neovim/neovim.git
synced 2026-05-24 13:50:06 +00:00
Problem: Linter missed backtick and double-quote keynames in the quasi-keyset of the `nvim_create_user_command` docstring. Solution: Update the linter to check backtick-surrounded and quote-surrounded key names.
274 lines
7.7 KiB
Plaintext
274 lines
7.7 KiB
Plaintext
*news.txt* Nvim
|
|
|
|
|
|
NVIM REFERENCE MANUAL
|
|
|
|
|
|
Notable changes since Nvim 0.12 *news*
|
|
|
|
For changes in the previous release, see |news-0.12|.
|
|
|
|
Type |gO| to see the table of contents.
|
|
|
|
==============================================================================
|
|
BREAKING CHANGES IN HEAD OR EXPERIMENTAL *news-breaking-dev*
|
|
|
|
====== Remove this section before release. ======
|
|
|
|
The following changes to UNRELEASED features were made during the development
|
|
cycle (Nvim HEAD, the "master" branch).
|
|
|
|
EVENTS
|
|
|
|
• todo
|
|
|
|
EXPERIMENTS
|
|
|
|
• todo
|
|
|
|
LSP
|
|
|
|
• todo
|
|
|
|
LUA
|
|
|
|
• vim.pos, vim.range always require the `buf` parameter.
|
|
|
|
DIAGNOSTICS
|
|
|
|
• todo
|
|
|
|
OPTIONS
|
|
|
|
• todo
|
|
|
|
TREESITTER
|
|
|
|
• todo
|
|
|
|
UI
|
|
|
|
• todo
|
|
|
|
VIMSCRIPT
|
|
|
|
• todo
|
|
|
|
|
|
==============================================================================
|
|
BREAKING CHANGES *news-breaking*
|
|
|
|
These changes may require adaptations in your config or plugins.
|
|
|
|
API
|
|
|
|
• |nvim_create_autocmd()|, |nvim_exec_autocmds()| and |nvim_clear_autocmds()|
|
|
no longer treat an empty non-nil pattern as nil.
|
|
• |nvim_clear_autocmds()| no longer treats an empty array event as nil.
|
|
• |ui-messages| `msg_show.bufwrite` and `msg_show.completion` messages are now
|
|
`msg_show.progress` events.
|
|
|
|
DIAGNOSTICS
|
|
|
|
• `vim.diagnostic.Opts.Status.format` no longer accepts the table mapping
|
|
from severity to text. Use `vim.diagnostic.Opts.Signs.text` instead.
|
|
|
|
EDITOR
|
|
|
|
• On Windows, the |trust| db now stores paths with "/" slashes. This means the
|
|
trust store will be reset.
|
|
• `stdpath("log")` moved to `stdpath("state")/logs`.
|
|
|
|
EVENTS
|
|
|
|
• |BufModifiedSet| has been removed. Use the |OptionSet| event with pattern
|
|
"modified" instead.
|
|
|
|
LSP
|
|
|
|
• `client.attached_buffers[buf]` now stores `languageId` string (was boolean).
|
|
|
|
LUA
|
|
|
|
• todo
|
|
|
|
OPTIONS
|
|
|
|
• todo
|
|
|
|
PLUGINS
|
|
|
|
• todo
|
|
|
|
TREESITTER
|
|
|
|
• todo
|
|
|
|
==============================================================================
|
|
NEW FEATURES *news-features*
|
|
|
|
The following new features were added.
|
|
|
|
API
|
|
|
|
• |nvim_set_hl()| supports "font" key.
|
|
• |nvim_open_win()| `zindex` controls whether the UI will use a dimmed cursor
|
|
shape when an unfocused float is on top of the cursor.
|
|
• |nvim_echo()| distinguishes zero percent from omitted percent for Progress
|
|
events.
|
|
• |nvim_create_user_command()| accepts `desc` for Vimscript commands.
|
|
|
|
BUILD
|
|
|
|
• Building using "zig build" requires zig 0.16.x.
|
|
|
|
DEFAULTS
|
|
|
|
• todo
|
|
|
|
DIAGNOSTICS
|
|
|
|
• |vim.diagnostic.status()| uses the severity names defined by the `signs`
|
|
field of |vim.diagnostic.config()|, if any.
|
|
|
|
EDITOR
|
|
|
|
• |:command-completion-customlist| can return a list of dictionaries with
|
|
kind/menu/info/abbr for the popup menu.
|
|
• |gf| and |<cfile>| support `file://…` URIs.
|
|
• |:log| opens log files.
|
|
• |ZR| restarts Nvim (|:restart|).
|
|
• |:uptime| displays uptime.
|
|
|
|
EVENTS
|
|
|
|
• |:delmarks| now triggers the |MarkSet| autocommand with line==col==0, same
|
|
as |nvim_buf_del_mark()|
|
|
|
|
HIGHLIGHTS
|
|
|
|
• todo
|
|
|
|
LSP
|
|
|
|
• LSP capabilities:
|
|
• Completion supports `CompletionItem.preselect` if 'completeopt' has
|
|
"preselect". https://microsoft.github.io/language-server-protocol/specification/#completionClientCapabilities
|
|
• `textDocument/foldingRange` |vim.lsp.foldtext()| highlights collapsed text.
|
|
https://microsoft.github.io/language-server-protocol/specification/#textDocument_foldingRange
|
|
• |vim.lsp.buf.declaration()|, |vim.lsp.buf.definition()|, |vim.lsp.buf.definition()|,
|
|
and |vim.lsp.buf.implementation()| now follows 'switchbuf'.
|
|
• Support for nested snippets.
|
|
|
|
LUA
|
|
|
|
• |vim.ui.img| can display images. Use `:checkhealth img` to confirm your
|
|
terminal supports it.
|
|
• |vim.net.request()| can specify custom headers by passing `opts.headers`.
|
|
• |vim.net.request()| can now accept `method` param overload for multiple HTTP methods.
|
|
• |writefile()| treats Lua strings as "blob", so it can be used to write
|
|
binary data.
|
|
• |vim.filetype.inspect()| returns a copy of the internal tables used for
|
|
filetype detection.
|
|
• Added `__eq` metamethod to |vim.VersionRange|. 2 distinct but representing
|
|
the same range instances now compare equal.
|
|
• Documentation for |vim.fn| now points to preferred Lua alternatives when
|
|
available.
|
|
• |vim.list.unique()| and |vim.list.bisect()| now support passing a string
|
|
as a shorthand of a `key`
|
|
• |vim.isnil()| tests if a value is `nil` or |vim.NIL|.
|
|
• |vim.nonnil()| returns the first argument which is not nil.
|
|
• |vim.npcall()| calls the function `fn` in protected-mode like |pcall()|,
|
|
but returns `nil` on error.
|
|
• |vim.pos| can now convert between positions and buffer offsets.
|
|
|
|
OPTIONS
|
|
|
|
• 'ttyfast' can be disabled during startup by setting the environment variable
|
|
`NVIM_NOTTYFAST` to disable automatic background detection.
|
|
• 'scrolloffpad' allows vertically centering cursor at the end of file.
|
|
• 'shortmess' flag |shm-u| silences undo/redo messages.
|
|
• 'winpinned' prevents window from closing unless specifically targeted.
|
|
|
|
PERFORMANCE
|
|
|
|
• |treesitter-highlight| performance on large injection-heavy files improves
|
|
by 50% to 100% by reusing edited child-tree ranges.
|
|
|
|
• Nvim architecture allows pure-Lua implementations of some `vim.fn`
|
|
functions, which skips the Vimscript <=> Lua "bridge" (no data
|
|
conversion/marshalling) entirely, if the `vim.fn` function is called from
|
|
Lua.
|
|
• The table holding LSP data is now cleared using `table.clear`,
|
|
thus reducing GC and memory reallocation during each data reset.
|
|
• When parsing the received Content-Length messages,
|
|
the RPC client will no longer allocate extra strings.
|
|
|
|
PLUGINS
|
|
|
|
• provider: add bun support for Node.js plugins
|
|
|
|
STARTUP
|
|
|
|
• todo
|
|
|
|
TERMINAL
|
|
|
|
• todo
|
|
|
|
TREESITTER
|
|
|
|
• |v_]N| |v_[N| expand selection to sibling treesitter node.
|
|
• |treesitter-highlight-conceal| can be removed by adding a `@noconceal`
|
|
capture.
|
|
• |vim.treesitter.select()| starts or adjusts a visual selection at cursor,
|
|
based on tree nodes.
|
|
|
|
TUI
|
|
|
|
• The TUI will re-query the terminal's background color when resuming from
|
|
a suspended state, and Nvim will update 'background' accordingly.
|
|
|
|
UI
|
|
|
|
• These builtin "picker" menus delegate to |vim.ui.select()|:
|
|
• :browse oldfiles
|
|
• |:recover|
|
|
• |:tselect|
|
|
• |z=| (spell suggest)
|
|
|
|
VIMSCRIPT
|
|
|
|
• |v:exitreason| is set before |QuitPre|.
|
|
• |v:starttime| is the process start time (nanoseconds since UNIX epoch).
|
|
• |v:useractive| indicates user activity.
|
|
• |serverlist()| with `info=true` returns details for each server (own + peers).
|
|
|
|
==============================================================================
|
|
CHANGED FEATURES *news-changed*
|
|
|
|
These existing features changed their behavior.
|
|
|
|
• |:Open| with no arguments uses the current file.
|
|
• The "buffer" key was renamed to "buf" in these functions (but the old name
|
|
"buffer" is still accepted, for backwards compatibility):
|
|
• |nvim_clear_autocmds()|
|
|
• |nvim_create_autocmd()|
|
|
• |nvim_exec_autocmds()|
|
|
• |nvim_get_autocmds()|
|
|
|
|
==============================================================================
|
|
REMOVED FEATURES *news-removed*
|
|
|
|
These deprecated features were removed.
|
|
|
|
• |vim.lsp.buf.declaration()|, |vim.lsp.buf.definition()|, |vim.lsp.buf.definition()|,
|
|
and |vim.lsp.buf.implementation()| no longer accept the `reuse_win` option.
|
|
|
|
==============================================================================
|
|
DEPRECATIONS *news-deprecations*
|
|
|
|
See |deprecated-0.13|.
|
|
|
|
vim:tw=78:ts=8:sw=2:et:ft=help:norl:
|