aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/news.txt
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2025-02-05 23:09:29 +0000
committerJosh Rahm <joshuarahm@gmail.com>2025-02-05 23:09:29 +0000
commitd5f194ce780c95821a855aca3c19426576d28ae0 (patch)
treed45f461b19f9118ad2bb1f440a7a08973ad18832 /runtime/doc/news.txt
parentc5d770d311841ea5230426cc4c868e8db27300a8 (diff)
parent44740e561fc93afe3ebecfd3618bda2d2abeafb0 (diff)
downloadrneovim-rahm.tar.gz
rneovim-rahm.tar.bz2
rneovim-rahm.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309HEADrahm
Diffstat (limited to 'runtime/doc/news.txt')
-rw-r--r--runtime/doc/news.txt196
1 files changed, 168 insertions, 28 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index d19df84023..12fac28db8 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -11,16 +11,36 @@ For changes in the previous release, see |news-0.10|.
Type |gO| to see the table of contents.
==============================================================================
-BREAKING CHANGES IN HEAD *news-breaking-dev*
+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).
+EXPERIMENTS
+
+• Removed `vim.loader.disable()`. Use `vim.loader.enable(false)` instead.
+
+LSP
+
+• `lsp/` runtimepath files should return a table instead of calling
+ |vim.lsp.config()| (or assigning to `vim.lsp.config`). See |lsp-config|
+• `vim.lsp.buf.document_symbol()` uses the |location-list| by default. Use
+ `vim.lsp.buf.document_symbol({ loclist = false })` to use the |quickfix|
+ list.
+
+
OPTIONS
• 'jumpoptions' flag "unload" has been renamed to "clean".
+• The `msghistory` option has been removed in favor of 'messagesopt'.
+
+TREESITTER
+
+• *TSNode:child_containing_descendant()* has been removed in the tree-sitter
+ library and is no longer available; use |TSNode:child_with_descendant()|
+ instead.
==============================================================================
BREAKING CHANGES *news-breaking*
@@ -29,7 +49,6 @@ These changes may require adaptations in your config or plugins.
API
-• Improved API "meta" docstrings and :help documentation.
• `vim.rpcnotify(0)` and `rpcnotify(0)` broadcast to ALL channels. Previously
they would "multicast" only to subscribed channels (controlled by
`nvim_subscribe()`). Plugins and clients that want "multicast" behavior must
@@ -45,19 +64,24 @@ API
• Renamed `nvim__id_dictionary` (unsupported/experimental API) to
`nvim__id_dict`.
+BUILD
+
+On Windows, only building with the UCRT runtime is supported.
+
DEFAULTS
-• |]d-default| and |[d-default| accept a count.
-• |[D-default| and |]D-default| jump to the first and last diagnostic in the
- current buffer, respectively.
+• 'number', 'relativenumber', 'signcolumn', and 'foldcolumn' are disabled in
+ |terminal| buffers. See |terminal-config| for an example of changing these defaults.
DIAGNOSTICS
-• |vim.diagnostic.config()| accepts a "jump" table to specify defaults for
- |vim.diagnostic.jump()|.
• The "underline" diagnostics handler sorts diagnostics by severity when using
the "severity_sort" option.
-
+• Diagnostics are filtered by severity before being passed to a diagnostic
+ handler |diagnostic-handlers|.
+• The "virtual_text" handler is disabled by default. Enable with >lua
+ vim.diagnostic.config({ virtual_text = true })
+<
EDITOR
• The order in which signs are placed was changed. Higher priority signs will
@@ -74,14 +98,24 @@ EVENTS
• |vim.ui_attach()| callbacks for |ui-messages| `msg_show` events are executed in
|api-fast| context.
+• New/enhanced arguments in these existing UI events:
+ • `cmdline_hide`: `abort` argument indicating if the cmdline was aborted.
+ • `cmdline_show`:
+ • Prompts that were previously emitted as `msg_show` events, are now routed
+ through `cmdline_show`.
+ • `hl_id` argument to highlight the prompt text.
+ • `msg_show`:
+ • `history` argument indicating if the message was added to the history.
+ • new message kinds: "bufwrite", "completion", "list_cmd", "lua_print",
+ "search_cmd", "shell_out/err/ret", "undo", "verbose", wildlist".
+
+HIGHLIGHTS
+
+• |TermCursorNC| is removed and no longer supported. Unfocused terminals no
+ longer have a cursor.
LSP
-• Improved rendering of LSP hover docs. |K-lsp-default|
-• |vim.lsp.completion.enable()| gained the `convert` callback which enables
- customizing the transformation of an LSP CompletionItem to |complete-items|.
-• |vim.lsp.diagnostic.from()| can be used to convert a list of
- |vim.Diagnostic| objects into their LSP diagnostic representation.
• |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
@@ -95,14 +129,15 @@ LSP
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.
LUA
• API functions now consistently return an empty dictionary as
|vim.empty_dict()|. Earlier, a |lua-special-tbl| was sometimes used.
-• Command-line completions for: `vim.g`, `vim.t`, `vim.w`, `vim.b`, `vim.v`,
- `vim.o`, `vim.wo`, `vim.bo`, `vim.opt`, `vim.opt_local`, `vim.opt_global`,
- and `vim.fn`.
+• |vim.json.encode()| no longer escapes forward slashes "/" by default
OPTIONS
@@ -134,13 +169,17 @@ TREESITTER
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.
-• New |TSNode:child_with_descendant()|, which is nearly identical to
- |TSNode:child_containing_descendant()| except that it can return the
- descendant itself.
+• |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()
+<
TUI
-• TODO
+• 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
@@ -155,7 +194,15 @@ The following new features were added.
API
+• Improved API "meta" docstrings and :help documentation.
• |nvim__ns_set()| can set properties for a namespace
+• |nvim_echo()| `err` field to print error messages and `chunks` accepts
+ highlight group IDs.
+• |nvim_open_win()| `relative` field can be set to "laststatus" and "tabline".
+• |nvim_buf_set_extmark()| `hl_group` field can be an array of layered groups
+• |vim.hl.range()| now has a optional `timeout` field which allows for a timed highlight
+• |nvim_buf_set_extmark()| virt_text_pos accepts `eol_right_align` to
+ allow for right aligned text that truncates before covering up buffer text.
DEFAULTS
@@ -173,6 +220,9 @@ DEFAULTS
on a URL.
• Mouse |popup-menu| includes a "Go to definition" item when LSP is active
in the buffer.
+ • |]d-default| and |[d-default| accept a count.
+ • |[D-default| and |]D-default| jump to the first and last diagnostic in the
+ current buffer, respectively.
• Mappings inspired by Tim Pope's vim-unimpaired:
• |[q|, |]q|, |[Q|, |]Q|, |[CTRL-Q|, |]CTRL-Q| navigate through the |quickfix| list
• |[l|, |]l|, |[L|, |]L|, |[CTRL-L|, |]CTRL-L| navigate through the |location-list|
@@ -187,14 +237,25 @@ DEFAULTS
• `<S-Tab>` in Insert and Select mode maps to `vim.snippet.jump({ direction = -1 })`
when a snippet is active and jumpable backwards.
+DIAGNOSTICS
+
+• |vim.diagnostic.config()| accepts a "jump" table to specify defaults for
+ |vim.diagnostic.jump()|.
+• A "virtual_lines" diagnostic handler was added to render diagnostics using
+ virtual lines below the respective code.
+• The "virtual_text" diagnostic handler accepts a `current_line` option to
+ only show virtual text at the cursor's line.
+
EDITOR
+• Use |g==| in :help docs to execute Lua and Vimscript code examples.
• Improved |paste| handling for redo (dot-repeat) and macros (|recording|):
• Redoing a large paste is significantly faster and ignores 'autoindent'.
• Replaying a macro with |@| also replays pasted text.
• On Windows, filename arguments on the command-line prefixed with "~\" or
"~/" are now expanded to the user's profile directory, not a relative path
to a literal "~" directory.
+• |hl-ComplMatchIns| shows matched text of the currently inserted completion.
• |hl-PmenuMatch| and |hl-PmenuMatchSel| show matched text in completion popup.
EVENTS
@@ -205,6 +266,12 @@ EVENTS
LSP
+• Improved rendering of LSP hover docs. |K-lsp-default|
+• |vim.lsp.completion.enable()| gained the `convert` callback which enables
+ customizing the transformation of an LSP CompletionItem to |complete-items|.
+• |vim.lsp.diagnostic.from()| can be used to convert a list of
+ |vim.Diagnostic| objects into their LSP diagnostic representation.
+• `:checkhealth vim.lsp` displays the server version (if available).
• Completion side effects (including snippet expansion, execution of commands
and application of additional text edits) is now built-in.
• |vim.lsp.util.locations_to_items()| sets `end_col` and `end_lnum` fields.
@@ -218,32 +285,61 @@ LSP
• The client now supports `'utf-8'` and `'utf-32'` position encodings.
• |vim.lsp.buf.hover()| now highlights hover ranges using the
|hl-LspReferenceTarget| highlight group.
+• Functions in |vim.lsp.Client| can now be called as methods.
+• Implemented LSP folding: |vim.lsp.foldexpr()|
+ https://microsoft.github.io/language-server-protocol/specification/#textDocument_foldingRange
+• |vim.lsp.config()| has been added to define default configurations for
+ servers. In addition, configurations can be specified in `lsp/<name>.lua`.
+• |vim.lsp.enable()| has been added to enable servers.
LUA
+• Command-line completions for: `vim.g`, `vim.t`, `vim.w`, `vim.b`, `vim.v`,
+ `vim.o`, `vim.wo`, `vim.bo`, `vim.opt`, `vim.opt_local`, `vim.opt_global`,
+ and `vim.fn`.
• |vim.fs.rm()| can delete files and directories.
• |vim.validate()| now has a new signature which uses less tables,
- is more peformant and easier to read.
+ is more performant and easier to read.
• |vim.str_byteindex()| and |vim.str_utfindex()| gained overload signatures
supporting two new parameters, `encoding` and `strict_indexing`.
+• |vim.json.encode()| has an option to enable forward slash escaping
+• |vim.fs.abspath()| converts paths to absolute paths.
+• |vim.fs.relpath()| gets relative path compared to base path.
+• |vim.fs.dir()| and |vim.fs.find()| now follow symbolic links by default,
+ the behavior can be turn off using the new `follow` option.
OPTIONS
• 'completeopt' flag "fuzzy" enables |fuzzy-matching| during |ins-completion|.
-• 'msghistory' controls maximum number of messages to remember.
+• 'completeopt' flag "preinsert" highlights text to be inserted.
+• 'messagesopt' configures |:messages| and |hit-enter| prompt.
• 'tabclose' controls which tab page to focus when closing a tab page.
PERFORMANCE
-• TODO
+• Significantly reduced redraw time for long lines with treesitter
+ highlighting.
+• LSP diagnostics and inlay hints are de-duplicated (new requests cancel
+ inflight requests). This greatly improves performance with slow LSP servers.
+• 10x speedup for |vim.treesitter.foldexpr()| (when no parser exists for the
+ buffer).
+• Strong |treesitter-query| caching makes repeat |vim.treesitter.query.get()|
+ and |vim.treesitter.query.parse()| calls significantly faster for large
+ queries.
+• Treesitter highlighting is now asynchronous. To force synchronous parsing,
+ use `vim.g._ts_force_sync_parsing = true`.
+• Treesitter folding is now calculated asynchronously.
PLUGINS
• EditorConfig
• spelling_language property is now supported.
+• 'inccommand' incremental preview can run on 'nomodifiable' buffers and
+ restores their 'modifiable' state
STARTUP
+• |-es| ("script mode") disables shada by default.
• Nvim will fail if the |--listen| or |$NVIM_LISTEN_ADDRESS| address is
invalid, instead of silently skipping an invalid address.
@@ -258,12 +354,36 @@ TERMINAL
'scrollback' are not reflown.
• The |terminal| now supports OSC 8 escape sequences and will display
hyperlinks in supporting host terminals.
+• The |terminal| now uses the actual cursor, rather than a "virtual" cursor.
+ This means that escape codes sent by applications running in a terminal
+ buffer can change the cursor shape and visibility. However, it also
+ means that the |TermCursorNC| highlight group is no longer supported: an
+ unfocused terminal window will have no cursor at all (so there is nothing to
+ highlight).
+• |jobstart()| gained the "term" flag.
+• The |terminal| will send theme update notifications when 'background' is
+ changed and DEC mode 2031 is enabled.
+• The |terminal| has experimental support for the Kitty keyboard protocol
+ (sometimes called "CSI u" key encoding). Only the "Disambiguate escape
+ codes" mode is currently supported.
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.
TUI
@@ -272,6 +392,8 @@ TUI
: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
@@ -279,7 +401,7 @@ UI
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
+• `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`.
@@ -287,8 +409,16 @@ UI
|hl-PmenuSel| and |hl-PmenuMatch| both inherit from |hl-Pmenu|, and
|hl-PmenuMatchSel| inherits highlights from both |hl-PmenuSel| and
|hl-PmenuMatch|.
-
+• |vim.diagnostic.setqflist()| updates an existing quickfix list with the
+ given title if found
• |ui-messages| content chunks now also contain the highlight group ID.
+• |:checkhealth| can display in a floating window, controlled by the
+ |g:health| variable.
+
+VIMSCRIPT
+
+• |getchar()| and |getcharstr()| have optional {opts} |Dict| argument to control:
+ cursor behavior, return type, and whether to simplify the returned key.
==============================================================================
CHANGED FEATURES *news-changed*
@@ -309,9 +439,14 @@ These existing features changed their behavior.
more emoji characters than before, including those encoded with multiple
emoji codepoints combined with ZWJ (zero width joiner) codepoints.
-• Text in the 'statusline', 'tabline', and 'winbar' now inherits highlights
- from the respective |hl-StatusLine|, |hl-TabLine|, and |hl-WinBar| highlight
- groups.
+ This also applies to :terminal output, where width of cells will be calculated
+ using the upgraded implementation.
+
+• Custom highlights in 'rulerformat', 'statuscolumn', 'statusline', 'tabline',
+ 'winbar', and the sign/number column are stacked with their respective
+ highlight groups, as opposed to |hl-Normal|.
+ This is also reflected in the `highlights` from |nvim_eval_statusline()|,
+ with a new `groups` field containing an array of stacked highlight groups.
• |vim.on_key()| callbacks won't be invoked recursively when a callback itself
consumes input.
@@ -320,6 +455,11 @@ These existing features changed their behavior.
current window, and it no longer throws |E444| when there is only one window
on the screen. Global variable `vim.g.pager` is removed.
+• Default 'titlestring' is now implemented with 'statusline' "%" format items.
+ This means the default, empty value is essentially an alias to:
+ `%t%(\ %M%)%(\ \(%{expand(\"%:~:h\")}\)%)%a\ -\ Nvim`. This is only an
+ implementation simplification, not a behavior change.
+
==============================================================================
REMOVED FEATURES *news-removed*