docs: misc (#28761)

Co-authored-by: Florian Zeitz <florob@babelmonkeys.de>
This commit is contained in:
dundargoc 2024-05-16 11:37:46 +02:00 committed by GitHub
parent 668b5fc155
commit b5c3687b6d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 51 additions and 58 deletions

View File

@ -15,7 +15,8 @@ Install from download
Downloads are available on the [Releases](https://github.com/neovim/neovim/releases) page. Downloads are available on the [Releases](https://github.com/neovim/neovim/releases) page.
* Latest [stable release](https://github.com/neovim/neovim/releases/latest) * Latest [stable release](https://github.com/neovim/neovim/releases/latest)
* [macOS](https://github.com/neovim/neovim/releases/latest/download/nvim-macos.tar.gz) * [macOS x86](https://github.com/neovim/neovim/releases/latest/download/nvim-macos-x86_64.tar.gz)
* [macOS arm](https://github.com/neovim/neovim/releases/latest/download/nvim-macos-arm64.tar.gz)
* [Linux](https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz) * [Linux](https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz)
* [Windows](https://github.com/neovim/neovim/releases/latest/download/nvim-win64.msi) * [Windows](https://github.com/neovim/neovim/releases/latest/download/nvim-win64.msi)
* Latest [development prerelease](https://github.com/neovim/neovim/releases/nightly) * Latest [development prerelease](https://github.com/neovim/neovim/releases/nightly)

View File

@ -37,9 +37,9 @@ These changes may require adaptations in your config or plugins.
• 'termguicolors' is enabled by default when Nvim is able to determine that • 'termguicolors' is enabled by default when Nvim is able to determine that
the host terminal emulator supports 24-bit color. the host terminal emulator supports 24-bit color.
• Editor • Editor:
• When switching windows, |CursorMoved| autocommands trigger when Nvim is • When switching windows, |CursorMoved| autocommands trigger when Nvim is
back in the main loop rather than immediately. This is more compatible back on the main loop rather than immediately. This is more compatible
with Vim. with Vim.
• "#" followed by a digit no longer stands for a function key at the start • "#" followed by a digit no longer stands for a function key at the start
of the lhs of a mapping. of the lhs of a mapping.
@ -54,24 +54,23 @@ These changes may require adaptations in your config or plugins.
• Legacy and extmark signs are displayed and listed with the same priority: • Legacy and extmark signs are displayed and listed with the same priority:
line number -> priority -> sign id -> recently placed line number -> priority -> sign id -> recently placed
• `:behave` was removed. • `:behave` was removed.
- If you used `:behave xterm`, the following is equivalent: >vim If you used `:behave xterm`, the following is equivalent: >vim
set mousemodel=extend set mousemodel=extend
< <
- If you used `:behave mswin`, the following is equivalent: >vim If you used `:behave mswin`, the following is equivalent: >vim
set selection=exclusive set selection=exclusive
set selectmode=mouse,key set selectmode=mouse,key
set mousemodel=popup set mousemodel=popup
set keymodel=startsel,stopsel set keymodel=startsel,stopsel
< <
• Events:
• Events
• Returning any truthy value from a callback passed to • Returning any truthy value from a callback passed to
|nvim_create_autocmd()| (rather than just `true`) will delete the |nvim_create_autocmd()| (rather than just `true`) will delete the
autocommand. autocommand.
• LSP • LSP:
• |LanguageTree:parse()| will no longer parse injections by default and now • |LanguageTree:parse()| will no longer parse injections by default and now
requires an explicit range argument to be passed. If injections are requires an explicit range argument to be passed. If injections are
required, provide an explicit range via `parser:parse({ start_row, end_row })`. required, provide an explicit range via `parser:parse({ start_row, end_row })`.
@ -89,7 +88,7 @@ These changes may require adaptations in your config or plugins.
the plugin does not. If necessary, the respective capability can be the plugin does not. If necessary, the respective capability can be
removed when calling |vim.lsp.protocol.make_client_capabilities()|. removed when calling |vim.lsp.protocol.make_client_capabilities()|.
• |LspRequest| and LspProgressUpdate (renamed to |LspProgress|) autocmds • |LspRequest| and LspProgressUpdate (renamed to |LspProgress|) autocmds
were promoted from a |User| autocmd to first class citizen. were promoted from |User| autocmds to first class citizens.
• Lua: • Lua:
• |-l| ensures output ends with a newline if the script prints messages and • |-l| ensures output ends with a newline if the script prints messages and
@ -104,7 +103,7 @@ These changes may require adaptations in your config or plugins.
|vim.isarray()|. |vim.isarray()|.
• Renamed `vim.treesitter.playground` to `vim.treesitter.dev`. • Renamed `vim.treesitter.playground` to `vim.treesitter.dev`.
• Options • Options:
• Removed some Vim 5.0<= option compatibilities: • Removed some Vim 5.0<= option compatibilities:
• 'backspace' no longer supports number values. Instead: • 'backspace' no longer supports number values. Instead:
• for `backspace=0` set `backspace=` (empty) • for `backspace=0` set `backspace=` (empty)
@ -123,15 +122,15 @@ These changes may require adaptations in your config or plugins.
a scope, which means they now behave the same way as string options. a scope, which means they now behave the same way as string options.
• Plugins: • Plugins:
• |:TOhtml| has been rewritten in Lua to support Neovim-specific • |:TOhtml| has been rewritten in Lua to support Nvim-specific decorations,
decorations, and many options have been removed. and many options have been removed.
• Treesitter • Treesitter:
• Treesitter highlight groups have been renamed to be more in line with • Treesitter highlight groups have been renamed to be more in line with
upstream tree-sitter and Helix to make it easier to share queries. The upstream tree-sitter and Helix to make it easier to share queries. The
full list is documented in |treesitter-highlight-groups|. full list is documented in |treesitter-highlight-groups|.
• TUI • TUI:
• In some cases, the cursor in the Nvim |TUI| used to blink even without • In some cases, the cursor in the Nvim |TUI| used to blink even without
configuring 'guicursor' as mentioned in |cursor-blinking|. This was a bug configuring 'guicursor' as mentioned in |cursor-blinking|. This was a bug
that has now been fixed. If your cursor has stopped blinking, add the that has now been fixed. If your cursor has stopped blinking, add the
@ -144,7 +143,7 @@ NEW FEATURES *news-features*
The following new features were added. The following new features were added.
• API • API:
• Passing 0 to |nvim_get_chan_info()| gets info about the current channel. • Passing 0 to |nvim_get_chan_info()| gets info about the current channel.
• |nvim_buf_set_extmark()| supports inline virtual text. • |nvim_buf_set_extmark()| supports inline virtual text.
• |nvim_win_text_height()| computes the number of screen lines occupied • |nvim_win_text_height()| computes the number of screen lines occupied
@ -169,9 +168,9 @@ The following new features were added.
(split) windows, moving floating windows into split windows, and opening (split) windows, moving floating windows into split windows, and opening
windows in non-current tabpages. windows in non-current tabpages.
• Flags added to |nvim_buf_set_extmark()|: • Flags added to |nvim_buf_set_extmark()|:
- "undo_restore": opt-out extmarks of precise undo tracking. "undo_restore": opt-out extmarks of precise undo tracking.
- "invalidate": automatically hide or delete extmarks. "invalidate": automatically hide or delete extmarks.
- "virt_text_repeat_linebreak": repeat virtual text on wrapped lines. "virt_text_repeat_linebreak": repeat virtual text on wrapped lines.
• Extmarks now fully support multi-line ranges, and a single extmark can be • Extmarks now fully support multi-line ranges, and a single extmark can be
used to highlight a range of arbitrary length. The |nvim_buf_set_extmark()| used to highlight a range of arbitrary length. The |nvim_buf_set_extmark()|
API function already allowed you to define such ranges, but highlight API function already allowed you to define such ranges, but highlight
@ -206,13 +205,13 @@ The following new features were added.
vim.g.query_lint_on = {} vim.g.query_lint_on = {}
< <
• Enabled treesitter highlighting for: • Enabled treesitter highlighting for:
treesitter query files Treesitter query files
• Vim help files • Vim help files
• Lua files • Lua files
• Editor • Editor:
• Better cmdline completion for string option value. |complete-set-option| • Better cmdline completion for string option value. |complete-set-option|
• Try it with `:set listchars=<tab>` • Try it with `:set listchars=<Tab>`
• By default, the swapfile "ATTENTION" |E325| dialog is skipped if the • By default, the swapfile "ATTENTION" |E325| dialog is skipped if the
swapfile is owned by a running Nvim process, instead of prompting. If you swapfile is owned by a running Nvim process, instead of prompting. If you
always want the swapfile dialog, delete the default SwapExists handler: always want the swapfile dialog, delete the default SwapExists handler:
@ -220,17 +219,17 @@ The following new features were added.
• Navigating the |jumplist| with CTRL+O, CTRL+I behaves more intuitively • Navigating the |jumplist| with CTRL+O, CTRL+I behaves more intuitively
when deleting buffers, and avoids "invalid buffer" cases. #25461 when deleting buffers, and avoids "invalid buffer" cases. #25461
• |:fclose| command. • |:fclose| command.
• |v_Q-default| and |v_@-default| repeat a register for each line of • |v_Q-default| and |v_@-default| repeat a register for each line of a linewise
a linewise visual selection. visual selection.
• Clicking on a tabpage in the tabline with the middle mouse button closes it. • Clicking on a tabpage in the tabline with the middle mouse button closes it.
• |:checkhealth| buffer can be opened in a split window using modifiers like • |:checkhealth| buffer can be opened in a split window using modifiers like
|:vertical|, |:horizontal| and |:botright|. |:vertical|, |:horizontal| and |:botright|.
• Events • Events:
• |vim.on_key()| callbacks receive a second argument for keys typed before • |vim.on_key()| callbacks receive a second argument for keys typed before
mappings are applied. mappings are applied.
• LSP • LSP:
• LSP method names are available in |vim.lsp.protocol.Methods|. • LSP method names are available in |vim.lsp.protocol.Methods|.
• Implemented LSP inlay hints: |lsp-inlay_hint| • Implemented LSP inlay hints: |lsp-inlay_hint|
https://microsoft.github.io/language-server-protocol/specification/#textDocument_inlayHint https://microsoft.github.io/language-server-protocol/specification/#textDocument_inlayHint
@ -254,7 +253,7 @@ The following new features were added.
• |vim.lsp.util.locations_to_items()| sets the `user_data` of each item to • |vim.lsp.util.locations_to_items()| sets the `user_data` of each item to
the original LSP `Location` or `LocationLink`. the original LSP `Location` or `LocationLink`.
• Added support for connecting to servers using named pipes (Windows) or • Added support for connecting to servers using named pipes (Windows) or
unix domain sockets (Unix) via |vim.lsp.rpc.connect()|. Unix domain sockets (Unix) via |vim.lsp.rpc.connect()|.
• Added support for `completionList.itemDefaults`, reducing overhead when • Added support for `completionList.itemDefaults`, reducing overhead when
computing completion items where properties often share the same value computing completion items where properties often share the same value
(e.g. `commitCharacters`). Note that this might affect plugins and (e.g. `commitCharacters`). Note that this might affect plugins and
@ -310,7 +309,7 @@ The following new features were added.
gaps) for literal values.) gaps) for literal values.)
• |vim.region()| can use a string accepted by |getpos()| as position. • |vim.region()| can use a string accepted by |getpos()| as position.
• Options • Options:
• 'winfixbuf' keeps a window focused onto a specific buffer • 'winfixbuf' keeps a window focused onto a specific buffer
• 'smoothscroll' option to scroll by screen line rather than by text line • 'smoothscroll' option to scroll by screen line rather than by text line
when 'wrap' is set. when 'wrap' is set.
@ -338,10 +337,10 @@ The following new features were added.
• Startup: • Startup:
• |$NVIM_APPNAME| can be set to a relative path instead of only a name. • |$NVIM_APPNAME| can be set to a relative path instead of only a name.
• |--startuptime| reports the startup times for both processes (TUI • |--startuptime| reports startup times for both processes (TUI + server) as
+ server) as separate sections. separate sections.
• Terminal • Terminal:
• |:terminal| accepts some |:command-modifiers| (specifically |:horizontal| • |:terminal| accepts some |:command-modifiers| (specifically |:horizontal|
and those that affect splitting a window). and those that affect splitting a window).
• Terminal buffers emit a |TermRequest| autocommand event when the child • Terminal buffers emit a |TermRequest| autocommand event when the child
@ -349,11 +348,11 @@ The following new features were added.
• Terminal buffers respond to OSC background and foreground requests. • Terminal buffers respond to OSC background and foreground requests.
|default-autocmds| |default-autocmds|
• Treesitter • Treesitter:
• Bundled parsers and queries (highlight, folds) for Markdown, Python, and • Bundled parsers and queries (highlight, folds) for Markdown, Python, and
Bash. Bash.
• |:InspectTree| shows root nodes • |:InspectTree| shows root nodes.
• |:InspectTree| now supports |folding| • |:InspectTree| now supports |folding|.
• |:InspectTree| shows node ranges in 0-based instead of 1-based indexing. • |:InspectTree| shows node ranges in 0-based instead of 1-based indexing.
• |vim.treesitter.foldexpr()| now recognizes folds captured using a • |vim.treesitter.foldexpr()| now recognizes folds captured using a
quantified query pattern. quantified query pattern.
@ -377,7 +376,7 @@ The following new features were added.
control sequence is used. control sequence is used.
• Improved error messages for query parsing. • Improved error messages for query parsing.
• TUI • TUI:
• Builtin TUI can now recognize "super" (|<D-|) and "meta" (|<T-|) modifiers • Builtin TUI can now recognize "super" (|<D-|) and "meta" (|<T-|) modifiers
in a terminal emulator that supports |tui-csiu|. in a terminal emulator that supports |tui-csiu|.
• The |TermResponse| event can be used with |v:termresponse| to read escape • The |TermResponse| event can be used with |v:termresponse| to read escape
@ -385,10 +384,10 @@ The following new features were added.
• A clipboard provider which uses OSC 52 to copy the selection to the system • A clipboard provider which uses OSC 52 to copy the selection to the system
clipboard is now bundled by default and will be automatically enabled under clipboard is now bundled by default and will be automatically enabled under
certain conditions. |clipboard-osc52| certain conditions. |clipboard-osc52|
• 'termsync' option asks the terminal emulator to buffer screen updates • 'termsync' option asks the host terminal to buffer screen updates until
until the redraw cycle is complete. Requires support from the host terminal. the redraw cycle is complete. Requires support from the host terminal.
• UI • UI:
• Enhanced support for rendering multibyte characters using composing • Enhanced support for rendering multibyte characters using composing
characters: the maximum limit was increased from 1+6 codepoints to characters: the maximum limit was increased from 1+6 codepoints to
31 bytes, which is guaranteed to fit all chars from before but often more. 31 bytes, which is guaranteed to fit all chars from before but often more.
@ -405,10 +404,10 @@ These existing features changed their behavior.
• |nvim_buf_call()| and |nvim_win_call()| now preserve any return value (NB: • |nvim_buf_call()| and |nvim_win_call()| now preserve any return value (NB:
not multiple return values) not multiple return values)
• Editor • Editor:
• |gx| now uses |vim.ui.open()| and not netrw. To customize, you can redefine • |gx| now uses |vim.ui.open()| and not netrw. To customize, you can redefine
`vim.ui.open` or remap `gx`. To continue using netrw (deprecated): >vim `vim.ui.open` or remap `gx`. To continue using netrw (deprecated): >vim
:call netrw#BrowseX(expand(exists("g:netrw_gx")? g:netrw_gx : '<cfile>'), netrw#CheckIfRemote())<CR> :call netrw#BrowseX(expand(exists("g:netrw_gx") ? g:netrw_gx : '<cfile>'), netrw#CheckIfRemote())<CR>
• LSP: • LSP:
• LSP hover and signature help now use Treesitter for highlighting of • LSP hover and signature help now use Treesitter for highlighting of
@ -430,21 +429,21 @@ These existing features changed their behavior.
• |vim.diagnostic.config()| now accepts a function for the virtual_text.prefix • |vim.diagnostic.config()| now accepts a function for the virtual_text.prefix
option, which allows for rendering e.g., diagnostic severities differently. option, which allows for rendering e.g., diagnostic severities differently.
• Options • Options:
• Attempting to set an invalid keycode option (e.g. `set t_foo=123`) no • Attempting to set an invalid keycode option (e.g. `set t_foo=123`) no
longer gives an error. longer gives an error.
• Terminal • Terminal:
• Terminal buffers started with no arguments (and use 'shell') close • Terminal buffers started with no arguments (and use 'shell') close
automatically if the job exited without error, eliminating the (often automatically if the job exited without error, eliminating the (often
unwanted) "[Process exited 0]" message. unwanted) "[Process exited 0]" message. |default-autocmds|
• Treesitter • Treesitter:
• |Query:iter_matches()|, |vim.treesitter.query.add_predicate()|, and • |Query:iter_matches()|, |vim.treesitter.query.add_predicate()|, and
|vim.treesitter.query.add_directive()| accept a new `all` option which |vim.treesitter.query.add_directive()| accept a new `all` option which
ensures that all matching nodes are returned as a table. The default option ensures that all matching nodes are returned as a table. The default option
`all=false` returns only a single node, breaking captures with quantifiers `all=false` returns only a single node, breaking captures with quantifiers
like `(comment)+ @comment; it is only provided for backward compatibility like `(comment)+ @comment`; it is only provided for backward compatibility
and will be removed after Nvim 0.10. and will be removed after Nvim 0.10.
• |vim.treesitter.query.add_predicate()| and • |vim.treesitter.query.add_predicate()| and
|vim.treesitter.query.add_directive()| now accept an options table rather |vim.treesitter.query.add_directive()| now accept an options table rather
@ -456,16 +455,15 @@ REMOVED FEATURES *news-removed*
These deprecated features were removed. These deprecated features were removed.
• Vimball support • Vimball support, including `:Vimuntar` command
- :Vimuntar command
• Support for legacy treesitter injection queries • Support for legacy treesitter injection queries
• 'shortmess' flags: • 'shortmess' flags:
- |shm-f|. Always uses "(3 of 5)", never "(file 3 of 5)" • |shm-f|. Always use "(3 of 5)", never "(file 3 of 5)".
- |shm-i|. Always use "[noeol]". |shm-i|. Always use "[noeol]".
- |shm-x|. Always use "[dos]", "[unix]" and "[mac]" |shm-x|. Always use "[dos]", "[unix]" and "[mac]".
- |shm-n|. Always use "[New]". |shm-n|. Always use "[New]".
============================================================================== ==============================================================================
DEPRECATIONS *news-deprecations* DEPRECATIONS *news-deprecations*

View File

@ -1985,15 +1985,9 @@ function M.setloclist(opts)
set_list(true, opts) set_list(true, opts)
end end
--- @deprecated use `vim.diagnostic.enabled(…, false)` --- @deprecated use `vim.diagnostic.enable(false, …)`
function M.disable(bufnr, namespace) function M.disable(bufnr, namespace)
vim.deprecate( vim.deprecate('vim.diagnostic.disable()', 'vim.diagnostic.enable(false, …)', '0.12', nil, false)
'vim.diagnostic.disable()',
'vim.diagnostic.enabled(false, …)',
'0.12',
nil,
false
)
M.enable(false, { bufnr = bufnr, ns_id = namespace }) M.enable(false, { bufnr = bufnr, ns_id = namespace })
end end