aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-05-02 15:57:21 +0200
committerJustin M. Keyes <justinkz@gmail.com>2024-05-15 23:19:26 +0200
commit01b6bff7e9bc751be20ce7bb68e7ebe3037441de (patch)
treee4ce03135ae778fc846af197d53862f1ad7f68ae /runtime/doc
parentcdd87222c86c5b2274a13d36f23de0637462e317 (diff)
downloadrneovim-01b6bff7e9bc751be20ce7bb68e7ebe3037441de.tar.gz
rneovim-01b6bff7e9bc751be20ce7bb68e7ebe3037441de.tar.bz2
rneovim-01b6bff7e9bc751be20ce7bb68e7ebe3037441de.zip
docs: news
Set dev_xx.txt help files to use "flow" layout.
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/deprecated.txt28
-rw-r--r--runtime/doc/dev_style.txt2
-rw-r--r--runtime/doc/dev_theme.txt28
-rw-r--r--runtime/doc/develop.txt69
-rw-r--r--runtime/doc/lsp.txt3
-rw-r--r--runtime/doc/lua.txt49
-rw-r--r--runtime/doc/news-0.9.txt2
-rw-r--r--runtime/doc/news.txt742
-rw-r--r--runtime/doc/treesitter.txt6
9 files changed, 429 insertions, 500 deletions
diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt
index 309d5b7d60..06f8319453 100644
--- a/runtime/doc/deprecated.txt
+++ b/runtime/doc/deprecated.txt
@@ -79,20 +79,20 @@ DEPRECATED IN 0.9 *deprecated-0.9*
- *nvim_get_hl_by_id()* Use |nvim_get_hl()| instead.
• The following top level Treesitter functions have been moved:
- *vim.treesitter.inspect_language()* -> |vim.treesitter.language.inspect()|
- *vim.treesitter.get_query_files()* -> |vim.treesitter.query.get_files()|
- *vim.treesitter.set_query()* -> |vim.treesitter.query.set()|
- *vim.treesitter.query.set_query()* -> |vim.treesitter.query.set()|
- *vim.treesitter.get_query()* -> |vim.treesitter.query.get()|
- *vim.treesitter.query.get_query()* -> |vim.treesitter.query.get()|
- *vim.treesitter.parse_query()* -> |vim.treesitter.query.parse()|
- *vim.treesitter.query.parse_query()* -> |vim.treesitter.query.parse()|
- *vim.treesitter.add_predicate()* -> |vim.treesitter.query.add_predicate()|
- *vim.treesitter.add_directive()* -> |vim.treesitter.query.add_directive()|
- *vim.treesitter.list_predicates()* -> |vim.treesitter.query.list_predicates()|
- *vim.treesitter.list_directives()* -> |vim.treesitter.query.list_directives()|
- *vim.treesitter.query.get_range()* -> |vim.treesitter.get_range()|
- *vim.treesitter.query.get_node_text()* -> |vim.treesitter.get_node_text()|
+ - *vim.treesitter.inspect_language()* -> |vim.treesitter.language.inspect()|
+ - *vim.treesitter.get_query_files()* -> |vim.treesitter.query.get_files()|
+ - *vim.treesitter.set_query()* -> |vim.treesitter.query.set()|
+ - *vim.treesitter.query.set_query()* -> |vim.treesitter.query.set()|
+ - *vim.treesitter.get_query()* -> |vim.treesitter.query.get()|
+ - *vim.treesitter.query.get_query()* -> |vim.treesitter.query.get()|
+ - *vim.treesitter.parse_query()* -> |vim.treesitter.query.parse()|
+ - *vim.treesitter.query.parse_query()* -> |vim.treesitter.query.parse()|
+ - *vim.treesitter.add_predicate()* -> |vim.treesitter.query.add_predicate()|
+ - *vim.treesitter.add_directive()* -> |vim.treesitter.query.add_directive()|
+ - *vim.treesitter.list_predicates()* -> |vim.treesitter.query.list_predicates()|
+ - *vim.treesitter.list_directives()* -> |vim.treesitter.query.list_directives()|
+ - *vim.treesitter.query.get_range()* -> |vim.treesitter.get_range()|
+ - *vim.treesitter.query.get_node_text()* -> |vim.treesitter.get_node_text()|
• Lua stdlib:
- *nvim_exec()* Use |nvim_exec2()| instead.
diff --git a/runtime/doc/dev_style.txt b/runtime/doc/dev_style.txt
index 85aeddd425..6c805963a9 100644
--- a/runtime/doc/dev_style.txt
+++ b/runtime/doc/dev_style.txt
@@ -6,7 +6,7 @@
Nvim style guide *dev-style*
-This is style guide for developers working on Nvim's source code.
+Style guidelines for developers working Nvim's source code.
License: CC-By 3.0 https://creativecommons.org/licenses/by/3.0/
diff --git a/runtime/doc/dev_theme.txt b/runtime/doc/dev_theme.txt
index 29a2da0d90..532506abcb 100644
--- a/runtime/doc/dev_theme.txt
+++ b/runtime/doc/dev_theme.txt
@@ -4,9 +4,9 @@
NVIM REFERENCE MANUAL
-Nvim theme style guide *dev-theme*
+Nvim colorscheme guidelines *dev-theme*
-This is style guide for developers working on Nvim's default color scheme.
+Style guidelines for developing Nvim's default colorscheme.
License: CC-By 3.0 https://creativecommons.org/licenses/by/3.0/
@@ -17,19 +17,15 @@ Design
- Be "Neovim branded", i.e. have mostly "green-blue" feel plus one or two
colors reserved for very occasional user attention.
-
- Be oriented for 'termguicolors' (true colors) while being extra minimal for
'notermguicolors' (16 colors) as fallback.
-
- Be accessible, i.e. have high enough contrast ratio (as defined in
https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef).
This means to have value at least 7 for |hl-Normal| and 4.5 for some common
cases (|hl-Visual|, `Comment` with set 'cursorline', colored syntax, `Diff*`,
|hl-Search|).
-
- Be suitable for dark and light backgrounds via exchange of dark and light
palettes.
-
- Be usable, i.e. provide enough visual feedback for common objects.
@@ -38,39 +34,29 @@ Palettes
- There are two separate palettes: dark and light. They all contain the same
set of colors exported as `NvimDark*` and `NvimLight*` colors respectively.
-
- The dark palette is used for background in the dark color scheme and for
foreground in the light color scheme; and vice versa. This introduces
recognizable visual system without too standing out.
-
- Actual computation of palettes should be done in a perceptually uniform
color space. Oklch is a good choice.
-
- Each palette has the following colors (descriptions are for dark background;
reverse for light one):
-
- Four shades of colored "cold" greys for general UI.
-
- Dark ones (from darkest to lightest) are reserved as background for
|hl-NormalFloat| (considered as "black"), |hl-Normal| (background),
|hl-CursorLine|, |hl-Visual|.
-
- Light ones (also from darkest to lightest) are reserved for
`Comment`, |hl-StatusLine|/|hl-TabLine|, |hl-Normal| (foreground),
and color considered as "white".
-
- Six colors to provide enough terminal colors: red, yellow, green, cyan,
blue, magenta.
They should have (reasonably) similar lightness and chroma to make them
visually coherent. Lightness should be as equal to the palette's basic grey
(which is used for |hl-Normal|) as possible. They should have (reasonably)
different hues to make them visually separable.
-
- For 16 colors:
-
- Greys are not used and are replaced with the foreground and background
colors of the terminal emulator.
-
- Non-grey colors fall back to terminal colors as ordered in ANSI codes
(https://en.wikipedia.org/wiki/ANSI_escape_code#3-bit_and_4-bit),
that is red (1, 9), green (2, 10), yellow (3, 11), blue (4, 12),
@@ -78,33 +64,25 @@ Palettes
To increase contrast, colors 1-6 are used for light background and 9-14
for dark background.
-
==============================================================================
Highlight groups
Use:
- Grey shades for general UI according to their design.
-
- Bold text for keywords (`Statement` highlight group). This is an important
choice to increase accessibility for people with color deficiencies, as it
doesn't rely on actual color.
-
- Green for strings, |hl-DiffAdd| (as background), |hl-DiagnosticOk|, and some
minor text UI elements.
-
- Cyan as main syntax color, i.e. for function usage (`Function` highlight
group), |hl-DiffText|, |hl-DiagnosticInfo|, and some minor text UI elements.
-
- Red to generally mean high user attention, i.e. errors; in particular for
|hl-ErrorMsg|, |hl-DiffDelete|, |hl-DiagnosticError|.
-
- Yellow very sparingly to mean mild user attention, i.e. warnings. That is,
|hl-DiagnosticWarn| and |hl-WarningMsg|.
-
- Blue very sparingly as |hl-DiagnosticHint| and some additional important
syntax group (like `Identifier`).
-
- Magenta very carefully (if at all).
In case of 16 colors:
@@ -113,9 +91,7 @@ In case of 16 colors:
colors can be used as foreground". This means that in any
foreground/background combination there should be background and one
non-background color.
-
- Use 0 (black) or 15 (bright white) as foreground for non-grey background,
depending on whether normal background is light or dark.
-
vim:tw=78:ts=8:et:ft=help:norl:
diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt
index 11c25362b6..adbe4eeeff 100644
--- a/runtime/doc/develop.txt
+++ b/runtime/doc/develop.txt
@@ -4,7 +4,7 @@
NVIM REFERENCE MANUAL
-Development of Nvim *development* *dev*
+Development of Nvim *development* *dev*
This reference describes design constraints and guidelines, for developing
Nvim applications or Nvim itself.
@@ -16,13 +16,13 @@ Nvim is free and open source. Everybody is encouraged to contribute.
Type |gO| to see the table of contents.
==============================================================================
-Design goals *design-goals*
+Design goals *design-goals*
Most important things come first (roughly). Some items conflict; this is
intentional. A balance must be found.
-NVIM IS... IMPROVED *design-improved*
+NVIM IS... IMPROVED *design-improved*
The Neo bits of Nvim should make it a better Vim, without becoming a
completely different editor.
@@ -35,7 +35,7 @@ completely different editor.
never break.
-NVIM IS... WELL DOCUMENTED *design-documented*
+NVIM IS... WELL DOCUMENTED *design-documented*
- A feature that isn't documented is a useless feature. A patch for a new
feature must include the documentation.
@@ -44,7 +44,7 @@ NVIM IS... WELL DOCUMENTED *design-documented*
item is easier to find.
-NVIM IS... FAST AND SMALL *design-speed-size*
+NVIM IS... FAST AND SMALL *design-speed-size*
Keep Nvim small and fast. This directly affects versatility and usability.
- Computers are becoming faster and bigger each year. Vim can grow too, but
@@ -59,7 +59,7 @@ Keep Nvim small and fast. This directly affects versatility and usability.
("composability").
-NVIM IS... MAINTAINABLE *design-maintain*
+NVIM IS... MAINTAINABLE *design-maintain*
- The source code should not become a mess. It should be reliable code.
- Use comments in a useful way! Quoting the function name and argument names
@@ -70,7 +70,7 @@ NVIM IS... MAINTAINABLE *design-maintain*
knowledge spread to other parts of the code.
-NVIM IS... NOT *design-not*
+NVIM IS... NOT *design-not*
Nvim is not an operating system; instead it should be composed with other
tools or hosted as a component. Marvim once said: "Unlike Emacs, Nvim does not
@@ -78,10 +78,10 @@ include the kitchen sink... but it's good for plumbing."
==============================================================================
-Developer guidelines *dev-guidelines*
+Developer guidelines *dev-guidelines*
-PROVIDERS *dev-provider*
+PROVIDERS *dev-provider*
A primary goal of Nvim is to allow extension of the editor without special
knowledge in the core. Some core functions are delegated to "providers"
@@ -115,7 +115,7 @@ For example, the Python provider is implemented by the
to 2 only if a valid external Python host is found. Then `has("python")`
reflects whether Python support is working.
- *provider-reload*
+ *provider-reload*
Sometimes a GUI or other application may want to force a provider to
"reload". To reload a provider, undefine its "loaded" flag, then use
|:runtime| to reload it: >vim
@@ -124,7 +124,7 @@ Sometimes a GUI or other application may want to force a provider to
:runtime autoload/provider/clipboard.vim
-DOCUMENTATION *dev-doc*
+DOCUMENTATION *dev-doc*
- "Just say it". Avoid mushy, colloquial phrasing in all documentation
(docstrings, user manual, website materials, newsletters, …). Don't mince
@@ -230,7 +230,7 @@ in src/nvim/api/win_config.c like this: >
Lua docstrings ~
- *dev-lua-doc*
+ *dev-lua-doc*
Lua documentation lives in the source code, as docstrings on the function
definitions. The |lua-vim| :help is generated from the docstrings.
@@ -289,7 +289,7 @@ vim.paste in runtime/lua/vim/_editor.lua like this: >
--- @returns false if client should cancel the paste.
-LUA STDLIB DESIGN GUIDELINES *dev-lua*
+LUA STDLIB DESIGN GUIDELINES *dev-lua*
See also |dev-naming|.
@@ -304,19 +304,22 @@ See also |dev-naming|.
- accept iterable instead of table
- exception: in some cases iterable doesn't make sense, e.g. spair() sorts
the input by definition, so there is no reason for it to accept an
- iterable, because the input needs to be "hydrated", it can't operate on
+ iterable, because the input needs to be "reified"; it can't operate on
a "stream".
- return iterable instead of table
- mimic the pairs() or ipairs() interface if the function is intended to be
used in a "for" loop.
- - when a result-or-error interface is needed, return `result|nil, errmsg|nil`: >
+ - when a result-or-error interface is needed, return `result|nil, nil|errmsg`: >
---@return Foo|nil # Result object, or nil if not found.
---@return nil|string # Error message on failure, or nil on success.
<
- Examples: |vim.ui.open()| |io.open()| |luv-error-handling|
+ *dev-patterns*
Interface conventions ~
+Where possible, these patterns apply to _both_ Lua and the API:
+
- When accepting a buffer id, etc., 0 means "current buffer", nil means "all
buffers". Likewise for window id, tabpage id, etc.
- Examples: |vim.lsp.codelens.clear()| |vim.diagnostic.enable()|
@@ -327,8 +330,19 @@ Interface conventions ~
filter(table, opts, function() … end)
BAD:
filter(function() … end, table, opts)
-
-API DESIGN GUIDELINES *dev-api*
+- "Enable" ("toggle") interface and behavior:
+ - `enable(…, nil)` and `enable(…, {buf=nil})` are synonyms and control the
+ the "global" enablement of a feature.
+ - `is_enabled(nil)` and `is_enabled({buf=nil})`, likewise, query the
+ global state of the feature.
+ - `enable(…, {buf: number})` sets a buffer-local "enable" flag.
+ - `is_enabled({buf: number})`, likewise, queries the buffer-local state of
+ the feature.
+ - See |vim.lsp.inlay_hint.enable()| and |vim.lsp.inlay_hint.is_enabled()|
+ for a reference implementation of these "best practices".
+ - NOTE: open questions: https://github.com/neovim/neovim/issues/28603
+
+API DESIGN GUIDELINES *dev-api*
See also |dev-naming|.
@@ -368,7 +382,7 @@ Naming conventions ~
In general, look for precedent when choosing a name, that is, look at existing
(non-deprecated) functions. In particular, see below...
- *dev-name-common*
+ *dev-name-common*
Use existing common {verb} names (actions) if possible:
- add: Appends or inserts into a collection
- attach: Listens to something to get events from it (TODO: rename to "on"?)
@@ -424,7 +438,7 @@ Do NOT use these deprecated nouns:
- command Use "cmd" instead
- window Use "win" instead
- *dev-name-events*
+ *dev-name-events*
Use the "on_" prefix to name event-handling callbacks and also the interface for
"registering" such handlers (on_key). The dual nature is acceptable to avoid
a confused collection of naming conventions for these related concepts.
@@ -438,7 +452,7 @@ Use this format to name API (RPC) events: >
Example: >
nvim_buf_changedtick_event
<
- *dev-name-api*
+ *dev-api-name*
Use this format to name new RPC |API| functions: >
nvim_{topic}_{verb}_{arbitrary-qualifiers}
@@ -458,7 +472,7 @@ be a parameter (typically manifest as mutually-exclusive buf/win/… flags like
and uses the "del" {verb}.
-INTERFACE PATTERNS *dev-patterns*
+INTERFACE PATTERNS *dev-api-patterns*
Prefer adding a single `nvim_{topic}_{verb}_…` interface for a given topic.
@@ -510,9 +524,9 @@ recommended (compare these 12(!) functions to the above 3 functions): >
nvim_win_get_ns(…)
nvim_tabpage_get_ns(…)
-API-CLIENT *dev-api-client*
+API-CLIENT *dev-api-client*
- *api-client*
+ *api-client*
API clients wrap the Nvim |API| to provide idiomatic "SDKs" for their
respective platforms (see |jargon|). You can build a new API client for your
favorite platform or programming language.
@@ -520,9 +534,10 @@ favorite platform or programming language.
List of API clients:
https://github.com/neovim/neovim/wiki/Related-projects#api-clients
- *pynvim*
-The Python client is the reference implementation for API clients.
- https://github.com/neovim/pynvim
+ *node-client* *pynvim*
+These clients can be considered the "reference implementation" for API clients:
+- https://github.com/neovim/node-client
+- https://github.com/neovim/pynvim
Standard Features ~
@@ -573,7 +588,7 @@ API client implementation guidelines ~
https://github.com/msgpack-rpc/msgpack-rpc
-EXTERNAL UI *dev-ui*
+EXTERNAL UI *dev-ui*
External UIs should be aware of the |api-contract|. In particular, future
versions of Nvim may add new items to existing events. The API is strongly
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index 584fef0ed2..7f6a2e3b73 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -1611,7 +1611,8 @@ get({filter}) *vim.lsp.inlay_hint.get()*
local hint = vim.lsp.inlay_hint.get({ bufnr = 0 })[1] -- 0 for current buffer
local client = vim.lsp.get_client_by_id(hint.client_id)
- resolved_hint = client.request_sync('inlayHint/resolve', hint.inlay_hint, 100, 0).result
+ local resp = client.request_sync('inlayHint/resolve', hint.inlay_hint, 100, 0)
+ local resolved_hint = assert(resp and resp.result, resp.err)
vim.lsp.util.apply_text_edits(resolved_hint.textEdits, 0, client.encoding)
location = resolved_hint.label[1].location
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 20a53537bc..0be3c24b0a 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -34,10 +34,11 @@ Nvim ever ships with Lua 5.4+, a Lua 5.1 compatibility shim will be provided
so that old plugins continue to work transparently.
*lua-luajit*
-Nvim is built with luajit on platforms which support it, which provides
-extra functionality. Lua code in |init.lua| and plugins can assume its presence
-on installations on common platforms. For maximum compatibility with less
-common platforms, availability can be checked using the `jit` global variable: >lua
+On supported platforms, Nvim is built with LuaJIT, which provides extra
+functionality (compared to PUC Lua) such as "bit" and various utilities (see
+|lua-profile|). Lua code in |init.lua| and plugins can assume its presence on
+many platforms, but for maximum compatibility should check the `jit` global
+variable: >lua
if jit then
-- code for luajit
else
@@ -45,9 +46,21 @@ common platforms, availability can be checked using the `jit` global variable: >
end
<
*lua-bit*
-In particular, the luajit "bit" extension module is _always_ available.
-A fallback implementation is included when nvim is built with PUC Lua 5.1,
-and will be transparently used when `require("bit")` is invoked.
+The LuaJIT "bit" extension module is _always_ available: when built with PUC
+Lua, Nvim includes a fallback implementation which provides `require("bit")`.
+
+ *lua-profile*
+To profile Lua code (with LuaJIT-enabled Nvim), the basic steps are: >lua
+ -- Start a profiling session:
+ require('jit.p').start('ri1', '/tmp/profile')
+
+ -- Perform arbitrary tasks (use plugins, scripts, etc.) ...
+
+ -- Stop the session. Profile is written to /tmp/profile.
+ require('jit.p').stop()
+
+See https://luajit.org/ext_profiler.html or the "p.lua" source for details: >
+ :lua vim.cmd.edit(package.searchpath('jit.p', package.path))
==============================================================================
LUA CONCEPTS AND IDIOMS *lua-concepts*
@@ -244,8 +257,8 @@ arguments separated by " " (space) instead of "\t" (tab).
*:lua=* *:lua*
:lua {chunk}
Executes Lua chunk {chunk}. If {chunk} starts with "=" the rest of the
- chunk is evaluated as an expression and printed. `:lua =expr` or `:=expr` is
- equivalent to `:lua print(vim.inspect(expr))`.
+ chunk is evaluated as an expression and printed. `:lua =expr` and `:=expr`
+ are equivalent to `:lua vim.print(expr)`.
Examples: >vim
:lua vim.api.nvim_command('echo "Hello, Nvim!"')
@@ -3060,11 +3073,10 @@ vim.glob.to_lpeg({pattern}) *vim.glob.to_lpeg()*
VIM.LPEG *vim.lpeg*
-LPeg is a pattern-matching library for Lua, based on
-Parsing Expression Grammars (https://bford.info/packrat/) (PEGs).
+LPeg is a pattern-matching library for Lua, based on Parsing Expression
+Grammars (PEGs). https://bford.info/packrat/
- *lua-lpeg*
- *vim.lpeg.Pattern*
+ *lua-lpeg* *vim.lpeg.Pattern*
The LPeg library for parsing expression grammars is included as `vim.lpeg`
(https://www.inf.puc-rio.br/~roberto/lpeg/).
@@ -3457,10 +3469,11 @@ vim.lpeg.version() *vim.lpeg.version()*
VIM.RE *vim.re*
The `vim.re` module provides a conventional regex-like syntax for pattern
-usage within LPeg |vim.lpeg|.
+usage within LPeg |vim.lpeg|. (Unrelated to |vim.regex| which provides Vim
+|regexp| from Lua.)
See https://www.inf.puc-rio.br/~roberto/lpeg/re.html for the original
-documentation including regex syntax and more concrete examples.
+documentation including regex syntax and examples.
vim.re.compile({string}, {defs}) *vim.re.compile()*
@@ -4342,10 +4355,10 @@ vim.snippet.expand({input}) *vim.snippet.expand()*
• {input} (`string`)
vim.snippet.jump({direction}) *vim.snippet.jump()*
- Jumps within the active snippet in the given direction. If the jump isn't
- possible, the function call does nothing.
+ Jumps to the next (or previous) placeholder in the current snippet, if
+ possible.
- You can use this function to navigate a snippet as follows: >lua
+ For example, map `<Tab>` to jump while a snippet is active: >lua
vim.keymap.set({ 'i', 's' }, '<Tab>', function()
if vim.snippet.active({ direction = 1 }) then
return '<cmd>lua vim.snippet.jump(1)<cr>'
diff --git a/runtime/doc/news-0.9.txt b/runtime/doc/news-0.9.txt
index 20c92a2750..7905d6c3e3 100644
--- a/runtime/doc/news-0.9.txt
+++ b/runtime/doc/news-0.9.txt
@@ -4,7 +4,7 @@
NVIM REFERENCE MANUAL
-Notable changes in Nvim 0.9 from 0.8 *news-0.9*
+Notable changes since Nvim 0.8 *news-0.9*
Type |gO| to see the table of contents.
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 6045acf935..3ffc844344 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -13,200 +13,139 @@ For changes in the previous release, see |news-0.9|.
==============================================================================
BREAKING CHANGES *news-breaking*
-The following changes may require adaptations in user config or plugins.
+These changes may require adaptations in your config or plugins.
-• 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
- that has now been fixed. If your cursor has stopped blinking, add the
- following (or similar, adapted to user preference) to your |config| file: >vim
+• API:
+ • |nvim_open_win()| now blocks all autocommands when `noautocmd` is set,
+ rather than just those from setting the `buffer` to display in the window.
- set guicursor+=n-v-c:blinkon500-blinkoff500
-<
-• |vim.islist()| now checks whether a table is actually list-like (i.e.,
- has integer keys without gaps and starting from 1). For the previous
- behavior (only check for integer keys, allow gaps or not starting with 1),
- use |vim.isarray()|.
-
-• "#" followed by a digit no longer stands for a function key at the start of
- the lhs of a mapping.
-
-• `:behave` was removed.
- - If you used `:behave xterm`, the following is equivalent: >vim
+• Defaults:
+ • Default color scheme has been updated to be "Nvim branded" and accessible.
+ Use `:colorscheme vim` to revert to the old legacy color scheme.
+ • These Nvim specific highlight groups are now defined in a meaningfully
+ different way and might need an update:
+ • |hl-FloatBorder| is linked to |hl-NormalFloat| instead of |hl-WinSeparator|.
+ • |hl-NormalFloat| is not linked to |hl-Pmenu|.
+ • |hl-WinBar| has different background.
+ • |hl-WinBarNC| is similar to |hl-WinBar| but not bold.
+ • |hl-WinSeparator| is linked to |hl-Normal| instead of |hl-VertSplit|.
+ • This also might result into some color schemes looking differently due
+ to them relying on implicit assumptions about how highlight groups are
+ defined by default. To account for this, define all attributes of
+ highlight groups explicitly. Alternatively, use `:colorscheme vim` or
+ `:source $VIMRUNTIME/colors/vim.lua` to restore previous definitions.
+ • 'termguicolors' is enabled by default when Nvim is able to determine that
+ the host terminal emulator supports 24-bit color.
- set mousemodel=extend
+• Editor
+ • When switching windows, |CursorMoved| autocommands trigger when Nvim is
+ back in the main loop rather than immediately. This is more compatible
+ with Vim.
+ • "#" followed by a digit no longer stands for a function key at the start
+ of the lhs of a mapping.
+ • |shm-q| now fully hides macro recording message instead of only shortening it.
+ • Signs placed through the legacy |sign-commands| are now stored and
+ displayed as |extmarks| internally. Along with the following changes:
+ • A sign placed twice in the same group with the same identifier will be
+ moved.
+ • Legacy signs are always deleted along with the line it is placed on.
+ • Legacy and extmark signs will show up in both |:sign-place-list| and
+ |nvim_buf_get_extmarks()|.
+ • Legacy and extmark signs are displayed and listed with the same priority:
+ line number -> priority -> sign id -> recently placed
+ • `:behave` was removed.
+ - If you used `:behave xterm`, the following is equivalent: >vim
+
+ 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 selectmode=mouse,key
- set mousemodel=popup
- set keymodel=startsel,stopsel
+ set selection=exclusive
+ set selectmode=mouse,key
+ set mousemodel=popup
+ set keymodel=startsel,stopsel
<
-• When switching windows, |CursorMoved| autocommands trigger when Nvim is back
- in the main loop rather than immediately. This is more compatible with Vim.
-
-• |-l| ensures output ends with a newline if the script prints messages and
- doesn't cause Nvim to exit.
-
-• |LspRequest| and LspProgressUpdate (renamed to |LspProgress|) autocmds were
- promoted from a |User| autocmd to first class citizen.
-
-• Renamed `vim.treesitter.playground` to `vim.treesitter.dev`.
-
-• Removed functions from the |vim.json| module:
- • Unnecessary, undocumented functions which caused global side-effects.
- • `vim.json.null` is redundant with `vim.NIL`.
- • `vim.json.array_mt` (and related) is redundant with `vim.empty_dict()`.
-
-• Removed some Vim 5.0<= option compatibilities:
- • |'backspace'| no longer supports number values. Instead:
- • for `backspace=0` set `backspace=` (empty)
- • for `backspace=1` set `backspace=indent,eol`
- • for `backspace=2` set `backspace=indent,eol,start` (default behavior in Nvim)
- • for `backspace=3` set `backspace=indent,eol,nostop`
- • |'backupdir'| and |'directory'| will no longer remove a `>` at the start
- of the option.
-
-• |LanguageTree:parse()| will no longer parse injections by default and
- now requires an explicit range argument to be passed. If injections are
- required, provide an explicit range via `parser:parse({ start_row, end_row })`.
-
-• |vim.lsp.util.parse_snippet()| will now strictly follow the snippet grammar
- defined by LSP, and hence previously parsed snippets might now be considered
- invalid input.
-
-• |OptionSet| autocommand args |v:option_new|, |v:option_old|,
- |v:option_oldlocal|, |v:option_oldglobal| now have the type of the option
- instead of always being strings. |v:option_old| is now the old global value
- for all global-local options, instead of just string global-local options.
-
-• Local value for a global-local number/boolean option is now unset when
- the option is set (e.g. using |:set| or |nvim_set_option_value()|) without a
- scope, which means they now behave the same way as string options.
-
-• Signs placed through the legacy |sign-commands| are now stored and displayed
- as |extmarks| internally. Along with the following changes:
- • A sign placed twice in the same group with the same identifier will be moved.
- • Legacy signs are always deleted along with the line it is placed on.
- • Legacy and extmark signs will show up in both |:sign-place-list| and |nvim_buf_get_extmarks()|.
- • Legacy and extmark signs are displayed and listed with the same priority:
- line number -> priority -> sign id -> recently placed
-
-• Default color scheme has been updated to be "Nvim branded" and accessible.
- Use `:colorscheme vim` to revert to the old legacy color scheme.
-
- Here is a list of Nvim specific highlight groups which are now defined in
- a meaningfully different way and might need an update:
- • |hl-FloatBorder| is linked to |hl-NormalFloat| instead of |hl-WinSeparator|.
- • |hl-NormalFloat| is not linked to |hl-Pmenu|.
- • |hl-WinBar| has different background.
- • |hl-WinBarNC| is similar to |hl-WinBar| but not bold.
- • |hl-WinSeparator| is linked to |hl-Normal| instead of |hl-VertSplit|.
-
- This also might result into some color schemes looking differently due to
- them relying on implicit assumptions about how highlight groups are defined
- by default. To account for this, define all attributes of highlight groups
- explicitly. Alternatively, use `:colorscheme vim` or `:source
- $VIMRUNTIME/colors/vim.lua` to restore previous definitions.
-
-• 'termguicolors' is enabled by default when Nvim is able to determine that
- the host terminal emulator supports 24-bit color.
-
-• 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 full
- list is documented in |treesitter-highlight-groups|.
-
-• |vim.lsp.codelens.refresh()| now takes an `opts` argument. With this change,
- the default behavior of just refreshing the current buffer has been replaced by
- refreshing all buffers.
-
-• |shm-q| now fully hides macro recording message instead of only shortening it.
-
-• Returning any truthy value from a callback passed to |nvim_create_autocmd()|
- (rather than just `true`) will delete the autocommand.
-
-• |vim.lsp.util.extract_completion_items()| will no longer return reliable
- results, since it does not apply `itemDefaults` when its input is a
- `CompletionList`.
- Moreover, since support for LSP `completionList.itemDefaults` was added,
- some third party plugins might be negatively impacted in case the language
- servers support the feature but the plugin does not.
- If necessary, the respective capability can be
- removed when calling |vim.lsp.protocol.make_client_capabilities()|.
-
-• |:TOhtml| has been rewritten in Lua to support Neovim-specific decorations,
- and many options have been removed.
-
-• |nvim_open_win()| now blocks all autocommands when `noautocmd` is set,
- rather than just those from setting the `buffer` to display in the window.
-
-==============================================================================
-BREAKING CHANGES IN HEAD *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).
-
-• Changed the signature of `vim.lsp.inlay_hint.is_enabled()`.
-
-• `vim.lsp.inlay_hint.enable()` now take effect on all buffers by default.
-
-• Removed `vim.treesitter.foldtext` as transparent foldtext is now supported
- https://github.com/neovim/neovim/pull/20750
-
-• Changed the signature of `vim.lsp.inlay_hint.enable()`.
-
-• Changed the signature of `vim.diagnostic.enable()`.
-
-• Removed vim.iter.map(), vim.iter.filter(), vim.iter.totable().
-
-• Renamed vim.tbl_isarray() to vim.isarray().
-
-• Changed |vim.ui.open()| return-signature to match `result|nil, errormsg|nil` convention.
-
-• Renamed Iter:nextback() to Iter:pop()
-
-• Renamed Iter:peekback() to Iter:rpeek()
-
-• Renamed Iter:skipback() to Iter:rskip()
-• Removed Iter:nthback(), use Iter:nth() with negative index instead.
+• Events
+ • Returning any truthy value from a callback passed to
+ |nvim_create_autocmd()| (rather than just `true`) will delete the
+ autocommand.
-• Renamed nvim_complete_set to nvim__complete_set and marked it as
- experimental.
-
-• Renamed vim.snippet.exit() to vim.snippet.stop().
+• LSP
+ • |LanguageTree:parse()| will no longer parse injections by default and now
+ requires an explicit range argument to be passed. If injections are
+ required, provide an explicit range via `parser:parse({ start_row, end_row })`.
+ • |vim.lsp.util.parse_snippet()| will now strictly follow the snippet
+ grammar defined by LSP, and hence previously parsed snippets might now be
+ considered invalid input.
+ • |vim.lsp.codelens.refresh()| now takes an `opts` argument. With this
+ change, the default behavior of just refreshing the current buffer has
+ been replaced by refreshing all buffers.
+ • |vim.lsp.util.extract_completion_items()| will no longer return reliable
+ results, since it does not apply `itemDefaults` when its input is
+ a `CompletionList`. Moreover, since support for LSP
+ `completionList.itemDefaults` was added, some third party plugins might be
+ negatively impacted in case the language servers support the feature but
+ the plugin does not. If necessary, the respective capability can be
+ removed when call