mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
f0f27e9aef
This reverts commit 5732aa706c
.
Causes editor to freeze in projects with many watcher registrations
219 lines
8.6 KiB
Plaintext
219 lines
8.6 KiB
Plaintext
*news.txt* Nvim
|
|
|
|
|
|
NVIM REFERENCE MANUAL
|
|
|
|
|
|
Notable changes in Nvim 0.9 from 0.8 *news*
|
|
|
|
Type |gO| to see the table of contents.
|
|
|
|
==============================================================================
|
|
BREAKING CHANGES *news-breaking*
|
|
|
|
The following changes may require adaptations in user config or plugins.
|
|
|
|
• Cscope support is now removed (see |cscope| and |nvim-removed|):
|
|
- Commands removed:
|
|
- `:cscope`
|
|
- `:lcscope`
|
|
- `:scscope`
|
|
- `:cstag`
|
|
- Options removed:
|
|
- `cscopepathcomp`
|
|
- `cscopeprg`
|
|
- `cscopequickfix`
|
|
- `cscoperelative`
|
|
- `cscopetag`
|
|
- `cscopetagorder`
|
|
- `cscopeverbose`
|
|
- Eval functions removed:
|
|
- `cscope_connection()`
|
|
|
|
Note: support for |ctags| remains with no plans to remove.
|
|
|
|
See https://github.com/neovim/neovim/pull/20545 for more information.
|
|
|
|
• `:hardcopy` is now removed (see |hardcopy| and |nvim-removed|):
|
|
- Commands removed:
|
|
- `:hardcopy`
|
|
- Options removed:
|
|
- `printdevice`
|
|
- `printencoding`
|
|
- `printexpr`
|
|
- `printfont`
|
|
- `printheader`
|
|
- `printmbcharset`
|
|
|
|
• libiconv is now a required build dependency.
|
|
|
|
• Unsaved changes are now preserved rather than discarded when |channel-stdio|
|
|
is closed.
|
|
|
|
==============================================================================
|
|
NEW FEATURES *news-features*
|
|
|
|
The following new APIs or features were added.
|
|
|
|
• A new environment variable named NVIM_APPNAME enables configuring the
|
|
directories where Neovim should find its configuration and state files. See
|
|
`:help $NVIM_APPNAME` .
|
|
|
|
• |nvim_open_win()| now accepts a relative `mouse` option to open a floating win
|
|
relative to the mouse. Note that the mouse doesn't update frequently without
|
|
setting `vim.o.mousemoveevent = true`
|
|
|
|
• EditorConfig support is now builtin. This is enabled by default and happens
|
|
automatically. To disable it, users should add >lua
|
|
|
|
vim.g.editorconfig = false
|
|
<
|
|
(or the Vimscript equivalent) to their |config| file.
|
|
|
|
• Added support for running Lua scripts from shell using |-l|. >
|
|
nvim -l foo.lua --arg1 --arg2
|
|
< Also works with stdin: >
|
|
echo "print(42)" | nvim -l -
|
|
|
|
• Added a |vim.lsp.codelens.clear()| function to clear codelenses.
|
|
|
|
• |vim.inspect_pos()|, |vim.show_pos()| and |:Inspect| allow a user to get or show items
|
|
at a given buffer position. Currently this includes treesitter captures,
|
|
semantic tokens, syntax groups and extmarks.
|
|
|
|
• Added support for semantic token highlighting to the LSP client. This
|
|
functionality is enabled by default when a client that supports this feature
|
|
is attached to a buffer. Opt-out can be performed by deleting the
|
|
`semanticTokensProvider` from the LSP client's {server_capabilities} in the
|
|
`LspAttach` callback.
|
|
|
|
See |lsp-semantic_tokens| for more information.
|
|
|
|
• |vim.treesitter.show_tree()| opens a split window showing a text
|
|
representation of the nodes in a language tree for the current buffer.
|
|
|
|
• Added support for the `willSave` and `willSaveWaitUntil` capabilities to the
|
|
LSP client. `willSaveWaitUntil` allows a server to modify a document before it
|
|
gets saved. Example use-cases by language servers include removing unused
|
|
imports, or formatting the file.
|
|
|
|
• Treesitter syntax highlighting for `help` files now supports highlighted
|
|
code examples. To enable, create a `.config/nvim/ftplugin/help.lua` with
|
|
the contents >lua
|
|
vim.treesitter.start()
|
|
<
|
|
Note: Highlighted code examples are only available in the Nvim manual, not
|
|
in help files taken from Vim. The treesitter `help` parser is also work in
|
|
progress and not guaranteed to correctly highlight every help file in the
|
|
wild.
|
|
|
|
• |vim.secure.trust()|, |:trust| allows the user to manage files in trust
|
|
database.
|
|
|
|
• |vim.diagnostic.open_float()| (and therefore |vim.diagnostic.config()|) now
|
|
accepts a `suffix` option which, by default, renders LSP error codes.
|
|
Similarly, the `virtual_text` configuration in |vim.diagnostic.config()| now
|
|
has a `suffix` option which does nothing by default.
|
|
|
|
• |vim.fs.dir()| now has a `opts` argument with a depth field to allow
|
|
recursively searching a directory tree.
|
|
|
|
• |vim.secure.read()| reads a file and prompts the user if it should be
|
|
trusted and, if so, returns the file's contents.
|
|
|
|
• When using Nvim inside tmux 3.2 or later, the default clipboard provider
|
|
will now copy to the system clipboard. |provider-clipboard|
|
|
|
|
• |'showcmdloc'| option to display the 'showcmd' information in the
|
|
status line or tab line. A new %S statusline item is available to place
|
|
the 'showcmd' text in a custom 'statusline'. Useful for when |'cmdheight'|
|
|
is set to 0.
|
|
|
|
• |'splitkeep'| option to control the scroll behavior of horizontal splits.
|
|
|
|
• |'statuscolumn'| option to customize the area to the side of a window,
|
|
normally containing the fold, sign and number columns. This new option follows
|
|
the 'statusline' syntax and can be used to transform the line numbers, create
|
|
mouse click callbacks for |signs|, introduce a custom margin or separator etc.
|
|
|
|
• |nvim_select_popupmenu_item()| now supports |cmdline-completion| popup menu.
|
|
|
|
• |'diffopt'| now includes a `linematch` option to enable a second-stage diff
|
|
on individual hunks to provide much more accurate diffs. This option is also
|
|
available to |vim.diff()|
|
|
|
|
See https://github.com/neovim/neovim/pull/14537.
|
|
|
|
• |vim.diagnostic.is_disabled()| checks if diagnostics are disabled in a given
|
|
buffer or namespace.
|
|
|
|
• |--remote-ui| option was added to connect to a remote instance and display
|
|
in it in a |TUI| in the local terminal. This can be used run a headless nvim
|
|
instance in the background and display its UI on demand, which previously
|
|
only was possible using an external UI implementation.
|
|
|
|
• Several improvements were made to make the code generation scripts more
|
|
deterministic, and a `LUA_GEN_PRG` build parameter has been introduced to
|
|
allow for a workaround for some remaining reproducibility problems.
|
|
|
|
• |:highlight| now supports an additional attribute "altfont".
|
|
|
|
• Treesitter captures can now be transformed by directives. This will allow
|
|
more complicated dynamic language injections.
|
|
|
|
• |vim.treesitter.query.get_node_text()| now accepts a `metadata` option for
|
|
writing custom directives using |vim.treesitter.query.add_directive()|.
|
|
|
|
• |vim.treesitter.language.add()| as a new replacement for
|
|
`vim.treesitter.language.require_language`.
|
|
|
|
• `require'bit'` is now always available |lua-bit|
|
|
|
|
• |vim.treesitter.foldexpr()| can be used for 'foldexpr' to use treesitter for folding.
|
|
|
|
==============================================================================
|
|
CHANGED FEATURES *news-changes*
|
|
|
|
The following changes to existing APIs or features add new behavior.
|
|
|
|
• 'exrc' now supports `.nvim.lua` file.
|
|
• 'exrc' is no longer marked deprecated.
|
|
|
|
• The |TUI| is changed to run in a separate process (previously, a separate
|
|
thread was used). This is not supposed to be a visible change to the user,
|
|
but might be the cause of subtle changes of behavior and bugs.
|
|
|
|
Previously, the TUI could be disabled as a build time feature (+tui/-tui),
|
|
resulting in a nvim binary which only could be run headless or embedded
|
|
in an external process. As of this version, TUI is always available.
|
|
|
|
• API calls now show more information about where an exception happened.
|
|
|
|
==============================================================================
|
|
REMOVED FEATURES *news-removed*
|
|
|
|
The following deprecated functions or APIs were removed.
|
|
|
|
• It is no longer possible to scroll the whole screen when showing messages
|
|
longer than 'cmdheight'. |msgsep| is now always enabled even if 'display'
|
|
doesn't contain the "msgsep" flag.
|
|
|
|
• `filetype.vim` is removed in favor of |lua-filetype|
|
|
(Note that filetype logic and tests still align with Vim, so additions or
|
|
changes need to be contributed there first.)
|
|
See https://github.com/neovim/neovim/pull/20674.
|
|
|
|
==============================================================================
|
|
DEPRECATIONS *news-deprecations*
|
|
|
|
The following functions are now deprecated and will be removed in the next
|
|
release.
|
|
|
|
• `vim.treesitter.language.require_language()` has been deprecated in favour
|
|
of |vim.treesitter.language.add()|.
|
|
|
|
• |vim.treesitter.get_node_at_pos()| and |vim.treesitter.get_node_at_cursor()|
|
|
are both deprecated in favor of |vim.treesitter.get_node()|.
|
|
|
|
vim:tw=78:ts=8:sw=2:et:ft=help:norl:
|