From b1577d371a6db43222de9e3a525def82320ebdb1 Mon Sep 17 00:00:00 2001 From: Sean Dewar Date: Wed, 7 Feb 2024 21:44:42 +0000 Subject: fix(api): make win_set_config with "win" for splits need "split/vertical" Problem: currently, for splits, nvim_win_set_config accepts win without any of split or vertical set, which has little effect and seems error-prone. Solution: require at least one of split or vertical to also be set for splits. Also, update nvim_win_set_config docs, as it's no longer limited to just floating and external windows. --- runtime/doc/api.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 1b00777532..125976342b 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -3291,11 +3291,11 @@ nvim_win_get_config({window}) *nvim_win_get_config()* Map defining the window configuration, see |nvim_open_win()| nvim_win_set_config({window}, {config}) *nvim_win_set_config()* - Configures window layout. Currently only for floating and external windows - (including changing a split window to those layouts). + Configures window layout. Cannot be used to move the last window in a + tabpage to a different one. - When reconfiguring a floating window, absent option keys will not be - changed. `row`/`col` and `relative` must be reconfigured together. + When reconfiguring a window, absent option keys will not be changed. + `row`/`col` and `relative` must be reconfigured together. Parameters: ~ • {window} Window handle, or 0 for current window -- cgit From a70eae57bd44208a77b5ac29839e8a39ab3c9cd8 Mon Sep 17 00:00:00 2001 From: Sean Dewar Date: Sun, 11 Feb 2024 22:53:37 +0000 Subject: fix(api): make open_win block only enter/leave events if !enter && !noautocmd Problem: nvim_open_win blocking all win_set_buf autocommands when !enter && !noautocmd is too aggressive. Solution: temporarily block WinEnter/Leave and BufEnter/Leave events when setting the buffer. Delegate the firing of BufWinEnter back to win_set_buf, which also has the advantage of keeping the timing consistent (e.g: before the epilogue in enter_buffer, which also handles restoring the cursor position if autocommands didn't change it, among other things). Reword the documentation for noautocmd a bit. I pondered modifying do_buffer and callees to allow for BufEnter/Leave being conditionally disabled, but it seems too invasive (and potentially error-prone, especially if new code paths to BufEnter/Leave are added in the future). Unfortunately, doing this has the drawback of blocking ALL such events for the duration, which also means blocking unrelated such events; like if window switching occurs in a ++nested autocmd fired by win_set_buf. If this turns out to be a problem in practice, a different solution specialized for nvim_open_win could be considered. :-) --- runtime/doc/api.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 125976342b..adaf66c2d9 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -3265,9 +3265,9 @@ nvim_open_win({buffer}, {enter}, {config}) *nvim_open_win()* • footer_pos: Footer position. Must be set with `footer` option. Value can be one of "left", "center", or "right". Default is `"left"`. - • noautocmd: If true then no buffer-related autocommand - events such as |BufEnter|, |BufLeave| or |BufWinEnter| may - fire from calling this function. + • noautocmd: If true then autocommands triggered from + setting the `buffer` to display are blocked (e.g: + |BufEnter|, |BufLeave|, |BufWinEnter|). • fixed: If true when anchor is NW or SW, the float window would be kept fixed even if the window would be truncated. • hide: If true the floating window will be hidden. -- cgit From 24dfa47e4f4ca41d0c5f8c1c0f851602362c81d3 Mon Sep 17 00:00:00 2001 From: Sean Dewar <6256228+seandewar@users.noreply.github.com> Date: Sat, 24 Feb 2024 23:18:50 +0000 Subject: vim-patch:partial:9.1.0117: Stop split-moving from firing WinNew and WinNewPre autocommands Problem: win_splitmove fires WinNewPre and possibly WinNew when moving windows, even though no new windows are created. Solution: don't fire WinNew and WinNewPre when inserting an existing window, even if it isn't the current window. Improve the accuracy of related documentation. (Sean Dewar) https://github.com/vim/vim/commit/96cc4aef3d47d0fd70e68908af3d48a0dce8ea70 Partial as WinNewPre has not been ported yet (it currently has problems anyway). --- runtime/doc/builtin.txt | 8 ++++---- runtime/doc/windows.txt | 30 ++++++++++++++---------------- 2 files changed, 18 insertions(+), 20 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index c5f3946871..4b1ccc0c5c 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -8901,10 +8901,10 @@ win_screenpos({nr}) *win_screenpos()* tabpage. win_splitmove({nr}, {target} [, {options}]) *win_splitmove()* - Move the window {nr} to a new split of the window {target}. - This is similar to moving to {target}, creating a new window - using |:split| but having the same contents as window {nr}, and - then closing {nr}. + Temporarily switch to window {target}, then move window {nr} + to a new split adjacent to {target}. + Unlike commands such as |:split|, no new windows are created + (the |window-ID| of window {nr} is unchanged after the move). Both {nr} and {target} can be window numbers or |window-ID|s. Both must be in the current tab page. diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index b71e7c80ab..4791e73929 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -502,35 +502,33 @@ horizontally split windows. CTRL-W H does it the other way around. *CTRL-W_K* CTRL-W K Move the current window to be at the very top, using the full - width of the screen. This works like closing the current - window and then creating another one with ":topleft split", - except that the current window contents is used for the new - window. + width of the screen. This works like `:topleft split`, except + it is applied to the current window and no new window is + created. *CTRL-W_J* CTRL-W J Move the current window to be at the very bottom, using the - full width of the screen. This works like closing the current - window and then creating another one with ":botright split", - except that the current window contents is used for the new - window. + full width of the screen. This works like `:botright split`, + except it is applied to the current window and no new window + is created. *CTRL-W_H* CTRL-W H Move the current window to be at the far left, using the - full height of the screen. This works like closing the - current window and then creating another one with - `:vert topleft split`, except that the current window contents - is used for the new window. + full height of the screen. This works like + `:vert topleft split`, except it is applied to the current + window and no new window is created. *CTRL-W_L* CTRL-W L Move the current window to be at the far right, using the full - height of the screen. This works like closing the - current window and then creating another one with - `:vert botright split`, except that the current window - contents is used for the new window. + height of the screen. This works like `:vert botright split`, + except it is applied to the current window and no new window + is created. *CTRL-W_T* CTRL-W T Move the current window to a new tab page. This fails if there is only one window in the current tab page. + This works like `:tab split`, except the previous window is + closed. When a count is specified the new tab page will be opened before the tab page with this index. Otherwise it comes after the current tab page. -- cgit From b465ede2c7a4fb39cf84682d645a3acd08631010 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 10 Mar 2024 17:08:00 +0800 Subject: vim-patch:9.1.0138: too many STRLEN calls when getting a memline (#27799) Problem: too many STRLEN calls when getting a memline Solution: Optimize calls to STRLEN(), add a few functions in memline.c that return the byte length instead of relying on STRLEN() (John Marriott) closes: vim/vim#14052 https://github.com/vim/vim/commit/02d7a6c6cfceb3faf9c98fcb7c458760cd50d269 Cherry-pick line break changes from patch 8.1.0226. Cherry-pick ml_line_len from patch 8.1.0579. Cherry-pick test_comments.vim change from patch 9.1.0153. Co-authored-by: John Marriott --- runtime/doc/dev_vimpatch.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/dev_vimpatch.txt b/runtime/doc/dev_vimpatch.txt index 96307dc7df..1f48324d46 100644 --- a/runtime/doc/dev_vimpatch.txt +++ b/runtime/doc/dev_vimpatch.txt @@ -209,6 +209,8 @@ information. utf_off2cells grid_off2cells ml_get_curline get_cursor_line_ptr ml_get_cursor get_cursor_pos_ptr + ml_get_curline_len get_cursor_line_len + ml_get_cursor_len get_cursor_pos_len screen_char ui_line screen_line grid_put_linebuf screen_* (most functions) grid_* -- cgit From 47942db30780b22774e810e1d0ade96bb6ba2da4 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 11 Mar 2024 06:41:53 +0800 Subject: vim-patch:675cbfb47f03 (#27806) runtime(doc): Update Markdown syntax, add missing configs fixes: vim/vim#14168 https://github.com/vim/vim/commit/675cbfb47f03c65b2a5c245b632bdd7a0bf10e4f Co-authored-by: Christian Brabandt --- runtime/doc/syntax.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index c02752a2b7..4b99fbface 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1764,10 +1764,19 @@ MARKDOWN *ft-markdown-syntax* If you have long regions there might be wrong highlighting. At the cost of slowing down displaying, you can have the engine look further back to sync on -the start of a region, for example 500 lines: > +the start of a region, for example 500 lines (default is 50): > :let g:markdown_minlines = 500 +If you want to enable fenced code block syntax highlighting in your markdown +documents you can enable like this: > + + :let g:markdown_fenced_languages = ['html', 'python', 'bash=sh'] + +To disable markdown syntax concealing add the following to your vimrc: > + + :let g:markdown_syntax_conceal = 0 + MATHEMATICA *mma.vim* *ft-mma-syntax* *ft-mathematica-syntax* -- cgit From 09a919f313ec8ae691798e45ee459a4467ce5d6a Mon Sep 17 00:00:00 2001 From: Riley Bruins Date: Sat, 30 Dec 2023 21:08:07 -0800 Subject: docs: more accurate typing for vim.tbl_extend --- runtime/doc/lua.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 367b5c36d2..89f62126bb 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2190,8 +2190,8 @@ vim.tbl_deep_extend({behavior}, {...}) *vim.tbl_deep_extend()* Merges recursively two or more tables. Parameters: ~ - • {behavior} (`"error"|"keep"|"force"`) (string) Decides what to do if - a key is found in more than one map: + • {behavior} (`'error'|'keep'|'force'`) Decides what to do if a key is + found in more than one map: • "error": raise an error • "keep": use value from the leftmost map • "force": use value from the rightmost map @@ -2207,8 +2207,8 @@ vim.tbl_extend({behavior}, {...}) *vim.tbl_extend()* Merges two or more tables. Parameters: ~ - • {behavior} (`string`) Decides what to do if a key is found in more - than one map: + • {behavior} (`'error'|'keep'|'force'`) Decides what to do if a key is + found in more than one map: • "error": raise an error • "keep": use value from the leftmost map • "force": use value from the rightmost map -- cgit From a09ddd7ce55037edc9747a682810fba6a26bc201 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Sat, 9 Mar 2024 12:21:01 +0000 Subject: docs(editorconfig): move to source --- runtime/doc/editorconfig.txt | 106 +++++++++++++++++++++---------------------- runtime/doc/lua.txt | 13 ++++++ 2 files changed, 65 insertions(+), 54 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/editorconfig.txt b/runtime/doc/editorconfig.txt index a2281a7b7c..c7011cfbba 100644 --- a/runtime/doc/editorconfig.txt +++ b/runtime/doc/editorconfig.txt @@ -3,7 +3,7 @@ NVIM REFERENCE MANUAL - +============================================================================== EditorConfig integration *editorconfig* Nvim supports EditorConfig. When a file is opened, Nvim searches all parent @@ -13,69 +13,23 @@ entire (recursive) directory. For more information see https://editorconfig.org/. *g:editorconfig* *b:editorconfig* -EditorConfig is enabled by default. To disable it, add to your config: >lua +EditorConfig is enabled by default. To disable it, add to your config: >lua vim.g.editorconfig = false < + (Vimscript: `let g:editorconfig = v:false`). It can also be disabled per-buffer by setting the |b:editorconfig| buffer-local variable to `false`. Nvim stores the applied properties in |b:editorconfig| if it is not `false`. - *editorconfig-properties* -The following properties are supported by default: - - *editorconfig_root* -root If "true", then stop searching for .editorconfig files - in parent directories. This property must be at the - top-level of the .editorconfig file (i.e. it must not - be within a glob section). - - *editorconfig_charset* -charset One of "utf-8", "utf-8-bom", "latin1", "utf-16be", or - "utf-16le". Sets the 'fileencoding' and 'bomb' - options. - - *editorconfig_end_of_line* -end_of_line One of "lf", "crlf", or "cr". These correspond to - setting 'fileformat' to "unix", "dos", or "mac", - respectively. - - *editorconfig_indent_style* -indent_style One of "tab" or "space". Sets the 'expandtab' option. - - *editorconfig_indent_size* -indent_size A number indicating the size of a single indent. - Alternatively, use the value "tab" to use the value of - the tab_width property. Sets the 'shiftwidth' and - 'softtabstop' options. - If this value is not "tab" and the tab_width property - is not set, 'tabstop' is also set to this value. - - *editorconfig_insert_final_newline* -insert_final_newline "true" or "false" to ensure the file always has a - trailing newline as its last byte. Sets the - 'fixendofline' and 'endofline' options. - - *editorconfig_max_line_length* -max_line_length A number indicating the maximum length of a single - line. Sets the 'textwidth' option. - - *editorconfig_tab_width* -tab_width The display size of a single tab character. Sets the - 'tabstop' option. - - *editorconfig_trim_trailing_whitespace* -trim_trailing_whitespace - When "true", trailing whitespace is automatically - removed when the buffer is written. - *editorconfig-custom-properties* + New properties can be added by adding a new entry to the "properties" table. The table key is a property name and the value is a callback function which -accepts the number of the buffer to be modified, the value of the property -in the .editorconfig file, and (optionally) a table containing all of the -other properties and their values (useful for properties which depend on other +accepts the number of the buffer to be modified, the value of the property in +the `.editorconfig` file, and (optionally) a table containing all of the other +properties and their values (useful for properties which depend on other properties). The value is always a string and must be coerced if necessary. Example: >lua @@ -86,4 +40,48 @@ Example: >lua vim.b[bufnr].foo = val end < - vim:tw=78:ts=8:et:sw=4:ft=help:norl: + + *editorconfig-properties* + +The following properties are supported by default: + + +charset *editorconfig.charset* + One of `"utf-8"`, `"utf-8-bom"`, `"latin1"`, `"utf-16be"`, or + `"utf-16le"`. Sets the 'fileencoding' and 'bomb' options. + +end_of_line *editorconfig.end_of_line* + One of `"lf"`, `"crlf"`, or `"cr"`. These correspond to setting + 'fileformat' to "unix", "dos", or "mac", respectively. + +indent_size *editorconfig.indent_size* + A number indicating the size of a single indent. Alternatively, use the + value "tab" to use the value of the tab_width property. Sets the + 'shiftwidth' and 'softtabstop' options. If this value is not "tab" and the + tab_width property is not set, 'tabstop' is also set to this value. + +indent_style *editorconfig.indent_style* + One of `"tab"` or `"space"`. Sets the 'expandtab' option. + +insert_final_newline *editorconfig.insert_final_newline* + `"true"` or `"false"` to ensure the file always has a trailing newline as + its last byte. Sets the 'fixendofline' and 'endofline' options. + +max_line_length *editorconfig.max_line_length* + A number indicating the maximum length of a single line. Sets the + 'textwidth' option. + +root *editorconfig.root* + If "true", then stop searching for `.editorconfig` files in parent + directories. This property must be at the top-level of the `.editorconfig` + file (i.e. it must not be within a glob section). + +tab_width *editorconfig.tab_width* + The display size of a single tab character. Sets the 'tabstop' option. + +trim_trailing_whitespace *editorconfig.trim_trailing_whitespace* + When `"true"`, trailing whitespace is automatically removed when the + buffer is written. + + + vim:tw=78:ts=8:sw=4:sts=4:et:ft=help:norl: diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 89f62126bb..e1e3f88a1d 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -1161,6 +1161,7 @@ Lua list copies the list object to Vimscript and does NOT modify the Lua list: > vim.print(list) --> "{ 1, 2, 3 }" < + vim.call({func}, {...}) *vim.call()* Invokes |vim-function| or |user-function| {func} with arguments {...}. See also |vim.fn|. @@ -1239,6 +1240,7 @@ vim.v *vim.v* |v:| variables. Invalid or unset key returns `nil`. + *lua-options* *lua-vim-options* *lua-vim-set* @@ -1262,6 +1264,7 @@ window-scoped options. Note that this must NOT be confused with |local-options| and |:setlocal|. There is also |vim.go| that only accesses the global value of a |global-local| option, see |:setglobal|. + *vim.opt_local* *vim.opt_global* *vim.opt* @@ -3897,6 +3900,7 @@ Iter:enumerate() *Iter:enumerate()* < Example: >lua + local it = vim.iter(vim.gsplit('abc', '')):enumerate() it:next() -- 1 'a' @@ -3931,6 +3935,7 @@ Iter:find({f}) *Iter:find()* found. Examples: >lua + local it = vim.iter({ 3, 6, 9, 12 }) it:find(12) -- 12 @@ -4011,6 +4016,7 @@ Iter:last() *Iter:last()* Drains the iterator and returns the last item. Example: >lua + local it = vim.iter(vim.gsplit('abcdefg', '')) it:last() -- 'g' @@ -4051,6 +4057,7 @@ Iter:next() *Iter:next()* Gets the next value from the iterator. Example: >lua + local it = vim.iter(string.gmatch('1 2 3', '%d+')):map(tonumber) it:next() -- 1 @@ -4082,6 +4089,7 @@ Iter:nth({n}) *Iter:nth()* Gets the nth value of an iterator (and advances to it). Example: >lua + local it = vim.iter({ 3, 6, 9, 12 }) it:nth(2) -- 6 @@ -4099,6 +4107,7 @@ Iter:nthback({n}) *Iter:nthback()* Gets the nth value from the end of a |list-iterator| (and advances to it). Example: >lua + local it = vim.iter({ 3, 6, 9, 12 }) it:nthback(2) -- 9 @@ -4116,6 +4125,7 @@ Iter:peek() *Iter:peek()* Gets the next value in a |list-iterator| without consuming it. Example: >lua + local it = vim.iter({ 3, 6, 9, 12 }) it:peek() -- 3 @@ -4150,6 +4160,7 @@ Iter:rev() *Iter:rev()* Reverses a |list-iterator| pipeline. Example: >lua + local it = vim.iter({ 3, 6, 9, 12 }):rev() it:totable() -- { 12, 9, 6, 3 } @@ -4166,6 +4177,7 @@ Iter:rfind({f}) *Iter:rfind()* found. Examples: >lua + local it = vim.iter({ 1, 2, 3, 2, 1 }):enumerate() it:rfind(1) -- 5 1 @@ -4186,6 +4198,7 @@ Iter:skip({n}) *Iter:skip()* Skips `n` values of an iterator pipeline. Example: >lua + local it = vim.iter({ 3, 6, 9, 12 }):skip(2) it:next() -- 9 -- cgit From 141182d6c6c06ad56413b81a518ba9b777a0cbe0 Mon Sep 17 00:00:00 2001 From: Colin Kennedy Date: Mon, 25 Dec 2023 20:41:09 -0800 Subject: vim-patch:9.1.0147: Cannot keep a buffer focused in a window Problem: Cannot keep a buffer focused in a window (Amit Levy) Solution: Add the 'winfixbuf' window-local option (Colin Kennedy) fixes: vim/vim#6445 closes: vim/vim#13903 https://github.com/vim/vim/commit/215703563757a4464907ead6fb9edaeb7f430bea N/A patch: vim-patch:58f1e5c0893a --- runtime/doc/message.txt | 7 +++++++ runtime/doc/news.txt | 2 ++ runtime/doc/options.txt | 11 +++++++++++ runtime/doc/quickref.txt | 1 + runtime/doc/tagsrch.txt | 29 ++++++++++++++++++----------- 5 files changed, 39 insertions(+), 11 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index c3154fc372..16d88407d5 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -114,6 +114,13 @@ wiped out a buffer which contains a mark or is referenced in another way. You cannot have two buffers with exactly the same name. This includes the path leading to the file. + *E1513* > + Cannot edit buffer. 'winfixbuf' is enabled + +If a window has 'winfixbuf' enabled, you cannot change that window's current +buffer. You need to set 'nowinfixbuf' before continuing. You may use [!] to +force the window to switch buffers, if your command supports it. + *E72* > Close error on swap file diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 3029414500..3ba7c5e681 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -160,6 +160,8 @@ The following new APIs and features were added. • 'breakindent' performance is significantly improved for wrapped lines. • Cursor movement, insertion with [count] and |screenpos()| are now faster. +• |'winfixbuf'| keeps a window focused onto a specific buffer + • |vim.iter()| provides a generic iterator interface for tables and Lua iterators |for-in|. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index edd5149621..f35700218c 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -6271,6 +6271,8 @@ A jump table for the options with a short description can be found at |Q_op|. "split" when both are present. uselast If included, jump to the previously used window when jumping to errors with |quickfix| commands. + If a window has 'winfixbuf' enabled, 'switchbuf' is currently not + applied to the split window. *'synmaxcol'* *'smc'* 'synmaxcol' 'smc' number (default 3000) @@ -7170,6 +7172,15 @@ A jump table for the options with a short description can be found at |Q_op|. Note: Do not confuse this with the height of the Vim window, use 'lines' for that. + *'winfixbuf'* *'wfb'* *'nowinfixbuf'* *'nowfb'* +'winfixbuf' 'wfb' boolean (default off) + local to window + If enabled, the buffer and any window that displays it are paired. + For example, attempting to change the buffer with |:edit| will fail. + Other commands which change a window's buffer such as |:cnext| will + also skip any window with 'winfixbuf' enabled. However if a command + has an "!" option, a window can be forced to switch buffers. + *'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'* 'winfixheight' 'wfh' boolean (default off) local to window |local-noglobal| diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 572dc8a841..4ef4392f92 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -939,6 +939,7 @@ Short explanation of each option: *option-list* 'wildoptions' 'wop' specifies how command line completion is done 'winaltkeys' 'wak' when the windows system handles ALT keys 'window' 'wi' nr of lines to scroll for CTRL-F and CTRL-B +'winfixbuf' 'wfb' keep window focused on a single buffer 'winfixheight' 'wfh' keep window height when opening/closing windows 'winfixwidth' 'wfw' keep window width when opening/closing windows 'winheight' 'wh' minimum number of lines for the current window diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt index 2b5b253a09..ac2bf9337b 100644 --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -402,17 +402,22 @@ If the tag is in the current file this will always work. Otherwise the performed actions depend on whether the current file was changed, whether a ! is added to the command and on the 'autowrite' option: - tag in file autowrite ~ -current file changed ! option action ~ - --------------------------------------------------------------------------- - yes x x x goto tag - no no x x read other file, goto tag - no yes yes x abandon current file, read other file, goto - tag - no yes no on write current file, read other file, goto - tag - no yes no off fail - --------------------------------------------------------------------------- + tag in file autowrite ~ +current file changed ! winfixbuf option action ~ + ----------------------------------------------------------------------------- + yes x x no x goto tag + no no x no x read other file, goto tag + no yes yes no x abandon current file, + read other file, goto tag + no yes no no on write current file, + read other file, goto tag + no yes no no off fail + yes x yes x x goto tag + no no no yes x fail + no yes no yes x fail + no yes no yes on fail + no yes no yes off fail + ----------------------------------------------------------------------------- - If the tag is in the current file, the command will always work. - If the tag is in another file and the current file was not changed, the @@ -428,6 +433,8 @@ current file changed ! option action ~ the changes, use the ":w" command and then use ":tag" without an argument. This works because the tag is put on the stack anyway. If you want to lose the changes you can use the ":tag!" command. +- If the tag is in another file and the window includes 'winfixbuf', the + command will fail. If the tag is in the same file then it may succeed. *tag-security* Note that Vim forbids some commands, for security reasons. This works like -- cgit From 0f20b7d803779950492c2838e2b042a38f4ee22f Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Mon, 11 Mar 2024 02:02:52 +0100 Subject: docs: adjust fswatch overflow message to mention docs with info - Add :h fswatch-limitations that notifies user about default inotify limitations on linux and how to adjust them - Check for Event queue overflow message from fswatch and refer user to new documentation Signed-off-by: Tomas Slusny --- runtime/doc/lua.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index e1e3f88a1d..135a1b42de 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -530,6 +530,16 @@ Example: File-change detection *watch-file* vim.api.nvim_command( "command! -nargs=1 Watch call luaeval('watch_file(_A)', expand(''))") < + *fswatch-limitations* +When on Linux and using fswatch, you may need to increase the maximum number +of `inotify` watches and queued events as the default limit can be too low. To +increase the limit, run: >sh + sysctl fs.inotify.max_user_watches=100000 + sysctl fs.inotify.max_queued_events=100000 +< +This will increase the limit to 100000 watches and queued events. These lines +can be added to `/etc/sysctl.conf` to make the changes persistent. + Example: TCP echo-server *tcp-server* 1. Save this code to a file. 2. Execute it with ":luafile %". -- cgit From 9cc755ad6a60e2b028d61c1dca62f8fe20f652d7 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 12 Mar 2024 05:39:21 +0800 Subject: vim-patch:0049a495c8d4 (#27817) runtime(doc): improve 'winfixbuf' docs (vim/vim#14180) - Make it not sound like a buffer option. - "!" is called a modifier, not an option. https://github.com/vim/vim/commit/0049a495c8d4a597773587f622d8cc8573c2eb75 --- runtime/doc/options.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index f35700218c..271652f8ae 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -270,6 +270,7 @@ created, thus they behave slightly differently: Option Reason ~ 'previewwindow' there can only be a single one 'scroll' specific to existing window + 'winfixbuf' specific to existing window 'winfixheight' specific to existing window 'winfixwidth' specific to existing window @@ -7175,11 +7176,11 @@ A jump table for the options with a short description can be found at |Q_op|. *'winfixbuf'* *'wfb'* *'nowinfixbuf'* *'nowfb'* 'winfixbuf' 'wfb' boolean (default off) local to window - If enabled, the buffer and any window that displays it are paired. + If enabled, the window and the buffer it is displaying are paired. For example, attempting to change the buffer with |:edit| will fail. Other commands which change a window's buffer such as |:cnext| will - also skip any window with 'winfixbuf' enabled. However if a command - has an "!" option, a window can be forced to switch buffers. + also skip any window with 'winfixbuf' enabled. However if an Ex + command has a "!" modifier, it can force switching buffers. *'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'* 'winfixheight' 'wfh' boolean (default off) -- cgit From a74e869ffa503cc9c2d21836e24fec7a7ffca147 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 12 Mar 2024 06:51:53 +0100 Subject: docs: small fixes (#27364) Co-authored-by: C.D. MacEachern Co-authored-by: Ynda Jas Co-authored-by: Owen Hines Co-authored-by: Wanten <41904684+WantenMN@users.noreply.github.com> Co-authored-by: lukasvrenner <118417051+lukasvrenner@users.noreply.github.com> Co-authored-by: cuinix <915115094@qq.com> --- runtime/doc/index.txt | 1 - runtime/doc/lsp.txt | 14 +++++++------- runtime/doc/luaref.txt | 2 +- runtime/doc/map.txt | 2 +- runtime/doc/vim_diff.txt | 1 + 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index c1a8aec40e..969346c4c7 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -699,7 +699,6 @@ tag char note action in Normal mode ~ tag char note action in Normal mode ~ ------------------------------------------------------------------------------ ~ -g_CTRL-A g CTRL-A dump a memory profile |g_CTRL-G| g CTRL-G show information about current cursor position |g_CTRL-H| g CTRL-H start Select block mode diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index eb37cb2a6f..cecf7c8d38 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -978,9 +978,9 @@ Lua module: vim.lsp.client *lsp-client* case-sensitive. • {flags} (`table`) A table with flags for the client. The current (experimental) flags are: - • {allow_incremental_sync}? (`boolean`) Allow - using incremental sync for buffer edits - (defailt: `true`) + • {allow_incremental_sync}? (`boolean`, + default: `true`) Allow using incremental + sync for buffer edits • {debounce_text_changes} (`integer`, default: `150`) Debounce `didChange` notifications to the server by the given number in @@ -1149,9 +1149,9 @@ Lua module: vim.lsp.client *lsp-client* initialize request. Invalid/empty values will • {flags}? (`table`) A table with flags for the client. The current (experimental) flags are: - • {allow_incremental_sync}? (`boolean`) Allow - using incremental sync for buffer edits - (defailt: `true`) + • {allow_incremental_sync}? (`boolean`, default: + `true`) Allow using incremental sync for + buffer edits • {debounce_text_changes} (`integer`, default: `150`) Debounce `didChange` notifications to the server by the given number in @@ -2096,7 +2096,7 @@ rename({old_fname}, {new_fname}, {opts}) *vim.lsp.util.rename()* It deletes existing buffers that conflict with the renamed file name only when • `opts` requests overwriting; or - • the conflicting buffers are not loaded, so that deleting thme does not + • the conflicting buffers are not loaded, so that deleting them does not result in data loss. Parameters: ~ diff --git a/runtime/doc/luaref.txt b/runtime/doc/luaref.txt index e7b62f4c6c..cd0b648560 100644 --- a/runtime/doc/luaref.txt +++ b/runtime/doc/luaref.txt @@ -932,7 +932,7 @@ implicit extra parameter `self`. Thus, the statement is syntactic sugar for - `t.a.b.c:f = function (self, (` `params` `)` `body` `end` + `t.a.b.c:f = function (` `self`, `params` `)` `body` `end` ============================================================================== 2.6 Visibility Rules *lua-visibility* diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 68206dd494..9ec34d5d52 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -604,7 +604,7 @@ instead. Example: > map A oanother line Works like: > map \A oanother line -But after: +But after: > let mapleader = "," It works like: > map ,A oanother line diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index b0caf9fdaf..a76166abf7 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -80,6 +80,7 @@ Defaults *nvim-defaults* - 'tags' defaults to "./tags;,tags" - 'termguicolors' is enabled by default if Nvim can detect support from the host terminal +- 'ttimeout' is enabled - 'ttimeoutlen' defaults to 50 - 'ttyfast' is always set - 'undodir' defaults to ~/.local/state/nvim/undo// (|xdg|), auto-created -- cgit From cb46f6e467268edf917cc3617b4c024a66b256de Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Tue, 12 Mar 2024 09:32:17 -0500 Subject: feat(treesitter): support URLs (#27132) Tree-sitter queries can add URLs to a capture using the `#set!` directive, e.g. (inline_link (link_text) @text.reference (link_destination) @text.uri (#set! @text.reference "url" @text.uri)) The pattern above is included by default in the `markdown_inline` highlight query so that users with supporting terminals will see hyperlinks. For now, this creates a hyperlink for *all* Markdown URLs of the pattern [link text](link url), even if `link url` does not contain a valid protocol (e.g. if `link url` is a path to a file). We may wish to change this in the future to only linkify when the URL has a valid protocol scheme, but for now we delegate handling this to the terminal emulator. In order to support directives which reference other nodes, the highlighter must be updated to use `iter_matches` rather than `iter_captures`. The former provides the `match` table which maps capture IDs to nodes. However, this has its own challenges: - `iter_matches` does not guarantee the order in which patterns are iterated matches the order in the query file. So we must enforce ordering manually using "subpriorities" (#27131). The pattern index of each match dictates the extmark's subpriority. - When injections are used, the highlighter contains multiple trees. The pattern indices of each tree must be offset relative to the maximum pattern index from all previous trees to ensure that extmarks appear in the correct order. - The `iter_captures` implementation currently has a bug where the "match" table is only returned for the first capture within a pattern (see #27274). This bug means that `#set!` directives in a query apply only to the first capture within a pattern. Unfortunately, many queries in the wild have come to depend on this behavior. `iter_matches` does not share this flaw, so switching to `iter_matches` exposed bugs in existing highlight queries. These queries have been updated in this repo, but may still need to be updated by users. The `#set!` directive applies to the _entire_ query pattern when used without a capture argument. To make `#set!` apply only to a single capture, the capture must be given as an argument. --- runtime/doc/news.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 3ba7c5e681..44833e5f84 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -254,6 +254,9 @@ The following new APIs and features were added. indexing. • |:InspectTree| shows root nodes • |:InspectTree| now supports |folding| + • The `#set!` directive can set the "url" property of a node to have the + node emit a hyperlink. Hyperlinks are UI specific: in the TUI, the OSC 8 + control sequence is used. • |vim.ui.open()| opens URIs using the system default handler (macOS `open`, Windows `explorer`, Linux `xdg-open`, etc.) -- cgit From ca7b603d02ecd1ed4098f487cd01acd470ca6a74 Mon Sep 17 00:00:00 2001 From: Sean Dewar <6256228+seandewar@users.noreply.github.com> Date: Tue, 12 Mar 2024 21:08:50 +0000 Subject: vim-patch:9.1.0170: Re-allow curwin == prevwin, but document it instead Problem: more places exist where curwin == prevwin, and it may even be expected in some cases. Solution: revert v9.1.0001, but document that it's possible instead. (Sean Dewar) I've had a change of heart for the following reasons: - A quick 'n dirty [GitHub code search](https://github.com/search?q=%2F%28winnr%5C%28%5C%29%5Cs*%3D%3D%5Cs*winnr%5C%28%5B%27%22%5D%23%5B%27%22%5D%5C%29%7Cwinnr%5C%28%5B%27%22%5D%23%5B%27%22%5D%5C%29%5Cs*%3D%3D%5Cs*winnr%5C%28%5C%29%29%2F&type=code) reveals some cases where it's expected in the wild. Particularly, it made me aware `winnr() == winnr('#')` is possible when curwin is changed temporarily during the evaluation of a &statusline expression item (`%{...}`), and is used to show something different on the statusline belonging to the previous window; that behaviour wasn't changed in v9.1.0001, but it means curwin == prevwin makes sense in some cases. - The definition and call sites of back_to_prevwin imply some expectation that prevwin == wp (== curwin) is possible, as it's used to skip entering the prevwin in that case. - Prior to v9.1.0001, `:wincmd p` would not beep in the case that was patched in v9.1.0001, but now does. That resulted in vim/vim#14047 being opened, as it affected the CtrlP plugin. I find it odd that `:wincmd p` had cases where it wouldn't beep despite doing nothing, but it may be preferable to keep things that way (or instead also beep if curwin == prevwin, if that's preferred). - After more digging, I found cases in win_free_mem, enter_tabpage, aucmd_restbuf and qf_open_new_cwindow where curwin == prevwin is possible (many of them from autocommands). Others probably exist too, especially in places where curwin is changed temporarily. fixes: vim/vim#14047 closes: vim/vim#14186 https://github.com/vim/vim/commit/d64801e913314d2e19dbb38f60e6d285238debff --- runtime/doc/builtin.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 4b1ccc0c5c..1a7efc3d79 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -9007,7 +9007,9 @@ winnr([{arg}]) *winnr()* # the number of the last accessed window (where |CTRL-W_p| goes to). If there is no previous window or it is in another tab page 0 is - returned. + returned. May refer to the current window in + some cases (e.g. when evaluating 'statusline' + expressions). {N}j the number of the Nth window below the current window (where |CTRL-W_j| goes to). {N}k the number of the Nth window above the current -- cgit From c048beef6c034a46e324fcea7210082d48db32ee Mon Sep 17 00:00:00 2001 From: Sean Dewar <6256228+seandewar@users.noreply.github.com> Date: Tue, 12 Mar 2024 21:41:35 +0000 Subject: vim-patch:9a660d2883f9 runtime(doc): add reference to matchbufline() at :h search() related: vim/vim#14173 https://github.com/vim/vim/commit/9a660d2883f92b3a3761c964dc14363a8f70c8d8 Co-authored-by: Christian Brabandt --- runtime/doc/builtin.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 1a7efc3d79..3df24a3b5f 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -6054,6 +6054,7 @@ search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]]) *search()* When a match has been found its line number is returned. If there is no match a 0 is returned and the cursor doesn't move. No error message is given. + To get the matched string, use |matchbufline()|. {flags} is a String, which can contain these character flags: 'b' search Backward instead of forward -- cgit From bbb68e2a034ad3aaea99178c09301ca458ee8dff Mon Sep 17 00:00:00 2001 From: Sean Dewar <6256228+seandewar@users.noreply.github.com> Date: Wed, 13 Mar 2024 22:06:39 +0000 Subject: vim-patch:9.1.0175: wrong window positions with 'winfix{width,height}' (#27845) Problem: winframe functions incorrectly recompute window positions if the altframe wasn't adjacent to the closed frame, which is possible if adjacent windows had 'winfix{width,height}' set. Solution: recompute for windows within the parent of the altframe and closed frame. Skip this (as before) if the altframe was top/left, but only if adjacent to the closed frame, as positions won't change in that case. Also correct the return value documentation for win_screenpos. (Sean Dewar) The issue revealed itself after removing the win_comp_pos call below winframe_restore in win_splitmove. Similarly, wrong positions could result from windows closed in other tabpages, as win_free_mem uses winframe_remove (at least until it is entered later, where enter_tabpage calls win_comp_pos). NOTE: As win_comp_pos handles only curtab, it's possible via other means for positions in non-current tabpages to be wrong (e.g: after changing 'laststatus', 'showtabline', etc.). Given enter_tabpage recomputes it, maybe it's intentional as an optimization? Should probably be documented in win_screenpos then, but I won't address that here. closes: vim/vim#14191 Nvim: don't reuse "wp" for "topleft" in winframe_remove, so the change integrates better with the call to winframe_find_altwin before it. https://github.com/vim/vim/commit/5866bc3a0f54115d5982fdc09bdbe4c45069265a --- runtime/doc/builtin.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 3df24a3b5f..68d1874542 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -8898,8 +8898,7 @@ win_screenpos({nr}) *win_screenpos()* [1, 1], unless there is a tabline, then it is [2, 1]. {nr} can be the window number or the |window-ID|. Use zero for the current window. - Returns [0, 0] if the window cannot be found in the current - tabpage. + Returns [0, 0] if the window cannot be found. win_splitmove({nr}, {target} [, {options}]) *win_splitmove()* Temporarily switch to window {target}, then move window {nr} -- cgit From b17be231a61f69b52eb809b6c72b20d3b089495d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 14 Mar 2024 06:44:50 +0800 Subject: vim-patch:9.1.0178: E1513 might be confusing (#27846) Problem: E1513 might be confusing (Christoph Thoma) Solution: reword error message, fix test to not depend on the actual message fixes: vim/vim#14189 https://github.com/vim/vim/commit/0a32b8854b52381fd17a6fcc5e38a3b9e77c8923 Co-authored-by: Christian Brabandt --- runtime/doc/message.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index 16d88407d5..afe64300e7 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -115,7 +115,7 @@ You cannot have two buffers with exactly the same name. This includes the path leading to the file. *E1513* > - Cannot edit buffer. 'winfixbuf' is enabled + Cannot switch buffer. 'winfixbuf' is enabled If a window has 'winfixbuf' enabled, you cannot change that window's current buffer. You need to set 'nowinfixbuf' before continuing. You may use [!] to -- cgit From 120c4ec855bc654ae067fafdb63bb16460d97c88 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 28 Feb 2024 18:47:47 +0100 Subject: fix(terminal): disable reflow again reverts https://github.com/neovim/neovim/commit/c855eee919f2d4edc9b9fa91b277454290fbabfe This setting introduces constant CI failures on macos (see https://github.com/neovim/neovim/issues/23762). --- runtime/doc/news.txt | 4 ---- runtime/doc/options.txt | 3 --- 2 files changed, 7 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 44833e5f84..0402a63cb8 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -179,10 +179,6 @@ The following new APIs and features were added. • |'foldtext'| can be set to an empty string to disable and render the line: as normal with regular highlighting and no line wrapping. -• The terminal buffer now supports reflow (wrapped lines adapt when the buffer - is resized horizontally). Note: Lines that are not visible and kept in - |'scrollback'| are not reflown. - • |vim.system()| for running system commands. • |vim.lpeg| and |vim.re| expose the bundled Lpeg expression grammar parser diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 271652f8ae..dd3b60b7b8 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -4953,9 +4953,6 @@ A jump table for the options with a short description can be found at |Q_op|. Minimum is 1, maximum is 100000. Only in |terminal| buffers. - Note: Lines that are not visible and kept in scrollback are not - reflown when the terminal buffer is resized horizontally. - *'scrollbind'* *'scb'* *'noscrollbind'* *'noscb'* 'scrollbind' 'scb' boolean (default off) local to window -- cgit From d326e04860427b0a6a0b66da86fae8e5d23c8a7c Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 15 Mar 2024 08:05:59 +0800 Subject: vim-patch:9.1.0181: no overflow check for string formatting (#27863) Problem: no overflow check for string formatting Solution: Check message formatting function for overflow. (Chris van Willegen) closes: vim/vim#13799 https://github.com/vim/vim/commit/c35fc03dbd47582b256776fb11f11d8ceb24f8f0 Co-authored-by: Christ van Willegen --- runtime/doc/builtin.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 68d1874542..be81451d08 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -5486,6 +5486,9 @@ printf({fmt}, {expr1} ...) *printf()* echo printf("%1$*2$.*3$f", 1.4142135, 6, 2) < 1.41 + You will get an overflow error |E1510|, when the field-width + or precision will result in a string longer than 6400 chars. + *E1500* You cannot mix positional and non-positional arguments: >vim echo printf("%s%1$s", "One", "Two") -- cgit From 25e729970712a89d2d125084e4df83418553d55d Mon Sep 17 00:00:00 2001 From: Tomasz N Date: Sat, 16 Mar 2024 02:00:25 +0100 Subject: feat(man): allow opening pages in current window (#27861) With :hide modifier, open page in current window. --- runtime/doc/filetype.txt | 12 +++++++++--- runtime/doc/news.txt | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 071a45c9c3..7b576be929 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -626,8 +626,10 @@ Man Open the manpage for the (man buffers) or (non-man buffers) under the cursor. Man! Display the current buffer contents as a manpage. -|:Man| accepts command modifiers. For example, to use a vertical split: > +|:Man| accepts command modifiers. For example, to use a vertical split: >vim :vertical Man printf +To reuse the current window: >vim + :hide Man printf Local mappings: K or CTRL-] Jump to the manpage for the under the @@ -647,14 +649,14 @@ Variables: empty. Enabled by default. Set |FALSE| to enable soft wrapping. -To use Nvim as a manpager: > +To use Nvim as a manpager: >sh export MANPAGER='nvim +Man!' Note that when running `man` from the shell and with that `MANPAGER` in your environment, `man` will pre-format the manpage using `groff`. Thus, Nvim will inevitably display the manual page as it was passed to it from stdin. One of the caveats of this is that the width will _always_ be hard-wrapped and not -soft wrapped as with `g:man_hardwrap=0`. You can set in your environment: > +soft wrapped as with `g:man_hardwrap=0`. You can set in your environment: >sh export MANWIDTH=999 So `groff`'s pre-formatting output will be the same as with `g:man_hardwrap=0` i.e soft-wrapped. @@ -662,6 +664,10 @@ So `groff`'s pre-formatting output will be the same as with `g:man_hardwrap=0` i To disable bold highlighting: > :highlight link manBold Normal +An alternative to using `MANPAGER` in shell can be redefined `man`, for example: >sh + man() { + nvim "+hide Man $1" + } MARKDOWN *ft-markdown-plugin* diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 0402a63cb8..0222d547b0 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -254,6 +254,8 @@ The following new APIs and features were added. node emit a hyperlink. Hyperlinks are UI specific: in the TUI, the OSC 8 control sequence is used. +• |:Man| now supports `:hide` modifier to open page in the current window. + • |vim.ui.open()| opens URIs using the system default handler (macOS `open`, Windows `explorer`, Linux `xdg-open`, etc.) -- cgit From 848e64322a3246f351a44fc1955eecc5ea163c72 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 16 Mar 2024 16:38:40 +0800 Subject: vim-patch:989faa4fce65 (#27880) runtime(doc): make :h tag-! more consistent (vim/vim#14208) - Use "on" and "off" for 'winfixbuf' option values. - Retab the table. https://github.com/vim/vim/commit/989faa4fce65a48d95fd8c9ae402672d70b8de7f --- runtime/doc/tagsrch.txt | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt index ac2bf9337b..6e53b5ebae 100644 --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -400,23 +400,23 @@ the pattern. *tag-!* If the tag is in the current file this will always work. Otherwise the performed actions depend on whether the current file was changed, whether a ! -is added to the command and on the 'autowrite' option: +is added to the command and on the 'autowrite' and 'winfixbuf' options: - tag in file autowrite ~ -current file changed ! winfixbuf option action ~ + tag in file winfixbuf autowrite ~ +current file changed ! option option action ~ ----------------------------------------------------------------------------- - yes x x no x goto tag - no no x no x read other file, goto tag - no yes yes no x abandon current file, + yes x x off x goto tag + no no x off x read other file, goto tag + no yes yes off x abandon current file, read other file, goto tag - no yes no no on write current file, + no yes no off on write current file, read other file, goto tag - no yes no no off fail - yes x yes x x goto tag - no no no yes x fail - no yes no yes x fail - no yes no yes on fail - no yes no yes off fail + no yes no off off fail + yes x yes x x goto tag + no no no on x fail + no yes no on x fail + no yes no on on fail + no yes no on off fail ----------------------------------------------------------------------------- - If the tag is in the current file, the command will always work. -- cgit From 542c910a1d3ffd29b59278b740abd7487315cb47 Mon Sep 17 00:00:00 2001 From: Caleb Marshall Date: Sat, 9 Mar 2024 14:23:25 -0600 Subject: fix(lsp): add missing LSP semantic token highlight links Added the following LSP semantic token types to be linked to highlight groups by default: * @lsp.type.event * @lsp.type.keyword * @lsp.type.modifier * @lsp.type.number * @lsp.type.operator * @lsp.type.regexp * @lsp.type.string --- runtime/doc/lsp.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index cecf7c8d38..5488226f78 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -460,13 +460,20 @@ The following groups are linked by default to standard |group-name|s: @lsp.type.decorator Function @lsp.type.enum Structure @lsp.type.enumMember Constant +@lsp.type.event Type @lsp.type.function Function @lsp.type.interface Structure +@lsp.type.keyword Keyword @lsp.type.macro Macro @lsp.type.method Function +@lsp.type.modifier Type @lsp.type.namespace Structure +@lsp.type.number Number +@lsp.type.operator Operator @lsp.type.parameter Identifier @lsp.type.property Identifier +@lsp.type.regexp SpecialChar +@lsp.type.string String @lsp.type.struct Structure @lsp.type.type Type @lsp.type.typeParameter TypeDef -- cgit From 14e4b6bbd8640675d7393bdeb3e93d74ab875ff1 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Sat, 16 Mar 2024 17:11:42 +0000 Subject: refactor(lua): type annotations --- runtime/doc/lua.txt | 45 +++++++++++++++++++++++---------------------- runtime/doc/treesitter.txt | 45 +++++++++++++++++++++++---------------------- 2 files changed, 46 insertions(+), 44 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 135a1b42de..85f3d3288e 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -643,12 +643,14 @@ vim.highlight.range({bufnr}, {ns}, {higroup}, {start}, {finish}, {opts}) tuple or string accepted by |getpos()| • {finish} (`integer[]|string`) End of region as a (line, column) tuple or string accepted by |getpos()| - • {opts} (`table?`) Optional parameters - • regtype type of range (see |setreg()|, default charwise) - • inclusive boolean indicating whether the range is - end-inclusive (default false) - • priority number indicating priority of highlight (default - priorities.user) + • {opts} (`table?`) A table with the following fields: + • {regtype}? (`string`, default: `'charwise'`) Type of + range. See |setreg()| + • {inclusive}? (`boolean`, default: `false`) Indicates + whether the range is end-inclusive + • {priority}? (`integer`, default: + `vim.highlight.priorities.user`) Indicates priority of + highlight ============================================================================== @@ -2794,9 +2796,9 @@ vim.keymap.del({modes}, {lhs}, {opts}) *vim.keymap.del()* Parameters: ~ • {modes} (`string|string[]`) • {lhs} (`string`) - • {opts} (`table?`) A table of optional arguments: - • "buffer": (integer|boolean) Remove a mapping from the given - buffer. When `0` or `true`, use the current buffer. + • {opts} (`table?`) A table with the following fields: + • {buffer}? (`integer|boolean`) Remove a mapping from the + given buffer. When `0` or `true`, use the current buffer. See also: ~ • |vim.keymap.set()| @@ -2818,20 +2820,20 @@ vim.keymap.set({mode}, {lhs}, {rhs}, {opts}) *vim.keymap.set()* < Parameters: ~ - • {mode} (`string|table`) Mode short-name, see |nvim_set_keymap()|. Can - also be list of modes to create mapping on multiple modes. + • {mode} (`string|string[]`) Mode short-name, see |nvim_set_keymap()|. + Can also be list of modes to create mapping on multiple modes. • {lhs} (`string`) Left-hand side |{lhs}| of the mapping. • {rhs} (`string|function`) Right-hand side |{rhs}| of the mapping, can be a Lua function. - • {opts} (`table?`) Table of |:map-arguments|. - • Same as |nvim_set_keymap()| {opts}, except: - • "replace_keycodes" defaults to `true` if "expr" is `true`. - • "noremap": inverse of "remap" (see below). - • Also accepts: - • "buffer": (integer|boolean) Creates buffer-local mapping, - `0` or `true` for current buffer. - • "remap": (boolean) Make the mapping recursive. Inverse of - "noremap". Defaults to `false`. + • {opts} (`table?`) Table of |:map-arguments|. Same as + |nvim_set_keymap()| {opts}, except: + • {replace_keycodes} defaults to `true` if "expr" is `true`. + + Also accepts: + • {buffer}? (`integer|boolean`) Creates buffer-local mapping, + `0` or `true` for current buffer. + • {remap}? (`boolean`, default: `false`) Make the mapping + recursive. Inverse of {noremap}. See also: ~ • |nvim_set_keymap()| @@ -3566,7 +3568,7 @@ vim.secure.trust({opts}) *vim.secure.trust()* The trust database is located at |$XDG_STATE_HOME|/nvim/trust. Parameters: ~ - • {opts} (`table?`) A table with the following fields: + • {opts} (`table`) A table with the following fields: • {action} (`'allow'|'deny'|'remove'`) - `'allow'` to add a file to the trust database and trust it, • `'deny'` to add a file to the trust database and deny it, @@ -3777,7 +3779,6 @@ vim.version.range({spec}) *vim.version.range()* (`table?`) A table with the following fields: • {from} (`vim.Version`) • {to}? (`vim.Version`) - • {has} (`fun(self: vim.VersionRangeversion: string|vim.Version)`) See also: ~ • https://github.com/npm/node-semver#ranges diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 5f33802ad5..74dcc5a120 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -978,7 +978,7 @@ add_directive({name}, {handler}, {opts}) Parameters: ~ • {name} (`string`) Name of the directive, without leading # - • {handler} (`function`) + • {handler} (`fun(match: table, pattern: integer, source: integer|string, predicate: any[], metadata: table)`) • match: A table mapping capture IDs to a list of captured nodes • pattern: the index of the matching pattern in the query @@ -986,10 +986,10 @@ add_directive({name}, {handler}, {opts}) • predicate: list of strings containing the full directive being called, e.g. `(node (#set! conceal "-"))` would get the predicate `{ "#set!", "conceal", "-" }` - • {opts} (`table`) Optional options: - • force (boolean): Override an existing predicate of the - same name - • all (boolean): Use the correct implementation of the + • {opts} (`table`) A table with the following fields: + • {force}? (`boolean`) Override an existing predicate of + the same name + • {all}? (`boolean`) Use the correct implementation of the match table where capture IDs map to a list of nodes instead of a single node. Defaults to false (for backward compatibility). This option will eventually become the @@ -1001,13 +1001,13 @@ add_predicate({name}, {handler}, {opts}) Parameters: ~ • {name} (`string`) Name of the predicate, without leading # - • {handler} (`function`) + • {handler} (`fun(match: table, pattern: integer, source: integer|string, predicate: any[], metadata: table)`) • see |vim.treesitter.query.add_directive()| for argument meanings - • {opts} (`table`) Optional options: - • force (boolean): Override an existing predicate of the - same name - • all (boolean): Use the correct implementation of the + • {opts} (`table`) A table with the following fields: + • {force}? (`boolean`) Override an existing predicate of + the same name + • {all}? (`boolean`) Use the correct implementation of the match table where capture IDs map to a list of nodes instead of a single node. Defaults to false (for backward compatibility). This option will eventually become the @@ -1079,13 +1079,13 @@ list_directives() *vim.treesitter.query.list_directives()* Lists the currently available directives to use in queries. Return: ~ - (`string[]`) List of supported directives. + (`string[]`) Supported directives. list_predicates() *vim.treesitter.query.list_predicates()* Lists the currently available predicates to use in queries. Return: ~ - (`string[]`) List of supported predicates. + (`string[]`) Supported predicates. omnifunc({findstart}, {base}) *vim.treesitter.query.omnifunc()* Omnifunc for completing node names and predicates in treesitter queries. @@ -1319,7 +1319,7 @@ LanguageTree:language_for_range({range}) • {range} (`Range4`) `{ start_line, start_col, end_line, end_col }` Return: ~ - (`vim.treesitter.LanguageTree`) Managing {range} + (`vim.treesitter.LanguageTree`) tree Managing {range} *LanguageTree:named_node_for_range()* LanguageTree:named_node_for_range({range}, {opts}) @@ -1327,12 +1327,12 @@ LanguageTree:named_node_for_range({range}, {opts}) Parameters: ~ • {range} (`Range4`) `{ start_line, start_col, end_line, end_col }` - • {opts} (`table?`) Optional keyword arguments: - • ignore_injections boolean Ignore injected languages - (default true) + • {opts} (`table?`) A table with the following fields: + • {ignore_injections}? (`boolean`, default: `true`) Ignore + injected languages Return: ~ - (`TSNode?`) Found node + (`TSNode?`) LanguageTree:parse({range}) *LanguageTree:parse()* Recursively parse all regions in the language tree using @@ -1359,8 +1359,9 @@ LanguageTree:register_cbs({cbs}, {recursive}) Registers callbacks for the |LanguageTree|. Parameters: ~ - • {cbs} (`table`) An |nvim_buf_attach()|-like table argument with - the following handlers: + • {cbs} (`table`) An + |nvim_buf_attach()|-like table argument with the + following handlers: • `on_bytes` : see |nvim_buf_attach()|, but this will be called after the parsers callback. • `on_changedtree` : a callback that will be called every @@ -1387,9 +1388,9 @@ LanguageTree:tree_for_range({range}, {opts}) Parameters: ~ • {range} (`Range4`) `{ start_line, start_col, end_line, end_col }` - • {opts} (`table?`) Optional keyword arguments: - • ignore_injections boolean Ignore injected languages - (default true) + • {opts} (`table?`) A table with the following fields: + • {ignore_injections}? (`boolean`, default: `true`) Ignore + injected languages Return: ~ (`TSTree?`) -- cgit From 3b29b39e6deb212456eba691bc79b17edaa8717b Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Sun, 17 Mar 2024 18:02:40 +0000 Subject: fix(treesitter): revert to using iter_captures in highlighter Fixes #27895 --- runtime/doc/treesitter.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 74dcc5a120..f7d0d7c243 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -1132,10 +1132,10 @@ Query:iter_captures({node}, {source}, {start}, {stop}) i.e., to get syntax highlight matches in the current viewport). When omitted, the {start} and {stop} row values are used from the given node. - The iterator returns three values: a numeric id identifying the capture, - the captured node, and metadata from any directives processing the match. - The following example shows how to get captures by name: >lua - for id, node, metadata in query:iter_captures(tree:root(), bufnr, first, last) do + The iterator returns four values: a numeric id identifying the capture, + the captured node, metadata from any directives processing the match, and + the match itself. The following example shows how to get captures by name: >lua + for id, node, metadata, match in query:iter_captures(tree:root(), bufnr, first, last) do local name = query.captures[id] -- name of the capture in the query -- typically useful info about the node: local type = node:type() -- type of the captured node @@ -1154,8 +1154,8 @@ Query:iter_captures({node}, {source}, {start}, {stop}) Defaults to `node:end_()`. Return: ~ - (`fun(end_line: integer?): integer, TSNode, vim.treesitter.query.TSMetadata`) - capture id, capture node, metadata + (`fun(end_line: integer?): integer, TSNode, vim.treesitter.query.TSMetadata, table`) + capture id, capture node, metadata, match *Query:iter_matches()* Query:iter_matches({node}, {source}, {start}, {stop}, {opts}) -- cgit From 79af4e7e734ed460eddbd57b7bf70d3e1624d772 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 19 Mar 2024 06:55:30 +0800 Subject: vim-patch:78c189837ae6 (#27920) runtime(doc): Recover some missed commas and periods in starting.txt Also: - Insert some missing words; - Strive for consistency with capitalisation of words; - Improve shell alias examples. The gvim words were left alone for now, but they deserve to be treated like proper names, GVim or GUI Vim, unless these refer to executable filenames (on *nix systems). closes: vim/vim#14194 https://github.com/vim/vim/commit/78c189837ae6a03fa5fbb62eabde66e3da9253a3 Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com> --- runtime/doc/starting.txt | 77 ++++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 38 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index a6619bc381..b2b5568ee6 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -139,7 +139,7 @@ argument. --cmd {command} *--cmd* {command} will be executed before processing any vimrc file. - Otherwise it acts like -c {command}. You can use up to 10 of + Otherwise, it acts like -c {command}. You can use up to 10 of these commands, independently from "-c" commands. *-S* @@ -306,7 +306,7 @@ argument. few windows will be editing an empty file. *-O* --O[N] Open N windows, split vertically. Otherwise it's like -o. +-O[N] Open N windows, split vertically. Otherwise, it's like -o. If both the -o and the -O option are given, the last one on the command line determines how the windows will be split. @@ -325,8 +325,10 @@ argument. This can be used to start Vim in a special mode, with special mappings and settings. A shell alias can be used to make - this easy to use. For example: > - alias vimc vim -u ~/.config/nvim/c_init.vim !* + this easy to use. For example, in a C shell descendant: > + alias vimc 'nvim -u ~/.config/nvim/c_init.vim \!*' +< And in a Bash shell: > + alias vimc='nvim -u ~/.config/nvim/c_init.vim' < Also consider using autocommands; see |autocommand|. When {vimrc} is "NONE" (all uppercase), all initializations @@ -544,7 +546,7 @@ accordingly, proceeding as follows: This means that Nvim will figure out the values of 'shellpipe' and 'shellredir' for you, unless you have set them yourself. -12. Set 'updatecount' to zero, if "-n" command argument used +12. Set 'updatecount' to zero, if "-n" command argument used. 13. Set binary options if the |-b| flag was given. @@ -581,11 +583,11 @@ Avoiding trojan horses ~ *trojan-horse* While reading the "vimrc" or the "exrc" file in the current directory, some commands can be disabled for security reasons by setting the 'secure' option. -This is always done when executing the command from a tags file. Otherwise it -would be possible that you accidentally use a vimrc or tags file that somebody -else created and contains nasty commands. The disabled commands are the ones -that start a shell, the ones that write to a file, and ":autocmd". The ":map" -commands are echoed, so you can see which keys are being mapped. +This is always done when executing the command from a tags file. Otherwise, +it would be possible that you accidentally use a vimrc or tags file that +somebody else created and contains nasty commands. The disabled commands are +the ones that start a shell, the ones that write to a file, and ":autocmd". +The ":map" commands are echoed, so you can see which keys are being mapped. If you want Vim to execute all commands in a local vimrc file, you can reset the 'secure' option in the EXINIT or VIMINIT environment variable or in the global exrc or vimrc file. This is not possible in vimrc or @@ -743,7 +745,7 @@ these are terminal or file dependent. Note that the options 'binary', 'paste' and 'readonly' are included, this might not always be what you want. -When special keys are used in mappings, The 'cpoptions' option will be +When special keys are used in mappings, the 'cpoptions' option will be temporarily set to its Vim default, to avoid the mappings to be misinterpreted. This makes the file incompatible with Vi, but makes sure it can be used with different terminals. @@ -797,8 +799,8 @@ You can quickly start editing with a previously saved View or Session with the *:mks* *:mksession* :mks[ession][!] [file] Write a Vim script that restores the current editing session. - When [!] is included an existing file is overwritten. - When [file] is omitted "Session.vim" is used. + When [!] is included, an existing file is overwritten. + When [file] is omitted, "Session.vim" is used. The output of ":mksession" is like ":mkvimrc", but additional commands are added to the file. Which ones depends on the 'sessionoptions' option. The @@ -810,16 +812,16 @@ resulting file, when executed with a ":source" command: 3. Closes all windows in the current tab page, except the current one; closes all tab pages except the current one (this results in currently loaded buffers to be unloaded, some may become hidden if 'hidden' is set or - otherwise specified); wipes out the current buffer, if it is empty - and unnamed. -4. Restores the current directory if 'sessionoptions' contains "curdir", or - sets the current directory to where the Session file is if 'sessionoptions' - contains "sesdir". + otherwise specified); wipes out the current buffer, if it is empty and + unnamed. +4. Restores the current directory, if 'sessionoptions' contains "curdir", or + sets the current directory to where the Session file is, if + 'sessionoptions' contains "sesdir". 5. Restores GUI Vim window position, if 'sessionoptions' contains "winpos". 6. Restores screen size, if 'sessionoptions' contains "resize". 7. Reloads the buffer list, with the last cursor positions. If 'sessionoptions' contains "buffers" then all buffers are restored, - including hidden and unloaded buffers. Otherwise only buffers in windows + including hidden and unloaded buffers. Otherwise, only buffers in windows are restored. 8. Restores all windows with the same layout. If 'sessionoptions' contains "help", help windows are restored. If 'sessionoptions' contains "blank", @@ -846,14 +848,14 @@ A session includes all tab pages, unless "tabpages" was removed from The |SessionLoadPost| autocmd event is triggered after a session file is loaded/sourced. *SessionLoad-variable* -While the session file is loading the SessionLoad global variable is set to 1. -Plugins can use this to postpone some work until the SessionLoadPost event is -triggered. +While the session file is loading, the SessionLoad global variable is set to +1. Plugins can use this to postpone some work until the SessionLoadPost event +is triggered. *:mkvie* *:mkview* :mkvie[w][!] [file] Write a Vim script that restores the contents of the current window. - When [!] is included an existing file is overwritten. + When [!] is included, an existing file is overwritten. When [file] is omitted or is a number from 1 to 9, a name is generated and 'viewdir' prepended. When the last path part of 'viewdir' does not exist, this @@ -868,14 +870,13 @@ triggered. The output of ":mkview" contains these items: 1. The argument list used in the window. When the global argument list is - used it is reset to the global list. + used, it is reset to the global list. The index in the argument list is also restored. 2. The file being edited in the window. If there is no file, the window is made empty. -3. Restore mappings, abbreviations and options local to the window if - 'viewoptions' contains "options" or "localoptions". For the options it - restores only values that are local to the current buffer and values local - to the window. +3. Restore mappings, abbreviations and options local to the window, if + 'viewoptions' contains "options" or "localoptions". Only option values + that are local to the current buffer and the current window are restored. When storing the view as part of a session and "options" is in 'sessionoptions', global values for local options will be stored too. 4. Restore folds when using manual folding and 'viewoptions' contains @@ -909,7 +910,7 @@ Note that Views and Sessions are not perfect: The combination of ":mkview" and ":loadview" can be used to store up to ten different views of a file. These are remembered in the directory specified with the 'viewdir' option. The views are stored using the file name. If a -file is renamed or accessed through a (symbolic) link the view will not be +file is renamed or accessed through a (symbolic) link, the view will not be found. You might want to clean up your 'viewdir' directory now and then. @@ -969,7 +970,7 @@ Notes for Unix: allow just anybody to read and write your ShaDa file! - Vim will not overwrite a ShaDa file that is not writable by the current "real" user. This helps for when you did "su" to become root, but your - $HOME is still set to a normal user's home directory. Otherwise Vim would + $HOME is still set to a normal user's home directory. Otherwise, Vim would create a ShaDa file owned by root that nobody else can read. - The ShaDa file cannot be a symbolic link. This is to avoid security issues. @@ -1001,11 +1002,11 @@ using this command: > vim -c "normal '0" -In a csh compatible shell you could make an alias for it: > +In a C shell descendant, you could make an alias for it: > alias lvim vim -c '"'normal "'"0'"' -For a bash-like shell: > +For a Bash-like shell: > alias lvim='vim -c "normal '\''0"' @@ -1099,15 +1100,15 @@ MANUALLY READING AND WRITING *shada-read-write* Two commands can be used to read and write the ShaDa file manually. This can be used to exchange registers between two running Vim programs: First type ":wsh" in one and then ":rsh" in the other. Note that if the register -already contained something, then ":rsh!" would be required. Also note -however that this means everything will be overwritten with information from +already contained something, then ":rsh!" would be required. Also note, +however, that this means everything will be overwritten with information from the first Vim, including the command line history, etc. The ShaDa file itself can be edited by hand too, although we suggest you start with an existing one to get the format right. You need to understand MessagePack (or, more likely, find software that is able to use it) format to do this. This can be useful in order to create a second file, say -"~/.my.shada" which could contain certain settings that you always want when +"~/.my.shada", which could contain certain settings that you always want when you first start Nvim. For example, you can preload registers with particular data, or put certain commands in the command line history. A line in your |config| file like > @@ -1171,8 +1172,8 @@ running) you have additional options: described in |shada-error-handling|). If 'shada' is empty, marks for up to 100 files will be written. When you get error "E929: All .tmp.X files exist, - cannot write ShaDa file!" check that no old temp files - were left behind (e.g. + cannot write ShaDa file!", check that no old temp + files were left behind (e.g. ~/.local/state/nvim/shada/main.shada.tmp*). Note: Executing :wshada will reset all |'quote| marks. @@ -1192,7 +1193,7 @@ running) you have additional options: the list is edited. If you get the |press-enter| prompt you can press "q" and still get the prompt to enter a file number. - Use ! to abandon a modified buffer. |abandon| + Use [!] to abandon a modified buffer. |abandon| SHADA FILE FORMAT *shada-format* -- cgit From c30ebb17f6b98625e3db8f032c2223876bb60f99 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 3 Mar 2024 11:18:34 +0100 Subject: fix(treesitter): document more standard highlight groups Problem: Not all standard treesitter groups are documented. Solution: Document them all (without relying on fallback); add default link for new `*.builtin` groups to `Special` and `@keyword.type` to `Structure`. Remove `@markup.environment.*` which only made sense for LaTeX. --- runtime/doc/treesitter.txt | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index f7d0d7c243..e036df5130 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -469,10 +469,11 @@ The following is a list of standard captures used in queries for Nvim, highlighted according to the current colorscheme (use |:Inspect| on one to see the exact definition): -@variable various variable names -@variable.builtin built-in variable names (e.g. `this` / `self`) -@variable.parameter parameters of a function -@variable.member object and struct fields +@variable various variable names +@variable.builtin built-in variable names (e.g. `this`, `self`) +@variable.parameter parameters of a function +@variable.parameter.builtin special parameters (e.g. `_`, `it`) +@variable.member object and struct fields @constant constant identifiers @constant.builtin built-in constant values @@ -480,7 +481,7 @@ the exact definition): @module modules or namespaces @module.builtin built-in modules or namespaces -@label GOTO and other labels (e.g. `label:` in C), including heredoc labels +@label `GOTO` and other labels (e.g. `label:` in C), including heredoc labels @string string literals @string.documentation string documenting code (e.g. Python docstrings) @@ -501,9 +502,9 @@ the exact definition): @type type or class definitions and annotations @type.builtin built-in types @type.definition identifiers in type definitions (e.g. `typedef ` in C) -@type.qualifier type qualifiers (e.g. `const`) -@attribute attribute annotations (e.g. Python decorators) +@attribute attribute annotations (e.g. Python decorators, Rust lifetimes) +@attribute.builtin builtin annotations (e.g. `@property` in Python) @property the key in key/value pairs @function function definitions @@ -515,27 +516,28 @@ the exact definition): @function.method.call method calls @constructor constructor calls and definitions -@operator symbolic operators (e.g. `+` / `*`) +@operator symbolic operators (e.g. `+`, `*`) @keyword keywords not fitting into specific categories @keyword.coroutine keywords related to coroutines (e.g. `go` in Go, `async/await` in Python) @keyword.function keywords that define a function (e.g. `func` in Go, `def` in Python) -@keyword.operator operators that are English words (e.g. `and` / `or`) -@keyword.import keywords for including modules (e.g. `import` / `from` in Python) -@keyword.storage modifiers that affect storage in memory or life-time -@keyword.repeat keywords related to loops (e.g. `for` / `while`) +@keyword.operator operators that are English words (e.g. `and`, `or`) +@keyword.import keywords for including modules (e.g. `import`, `from` in Python) +@keyword.type keywords defining composite types (e.g. `struct`, `enum`) +@keyword.modifier keywords definining type modifiers (e.g. `const`, `static`, `public`) +@keyword.repeat keywords related to loops (e.g. `for`, `while`) @keyword.return keywords like `return` and `yield` @keyword.debug keywords related to debugging -@keyword.exception keywords related to exceptions (e.g. `throw` / `catch`) +@keyword.exception keywords related to exceptions (e.g. `throw`, `catch`) -@keyword.conditional keywords related to conditionals (e.g. `if` / `else`) -@keyword.conditional.ternary ternary operator (e.g. `?` / `:`) +@keyword.conditional keywords related to conditionals (e.g. `if`, `else`) +@keyword.conditional.ternary ternary operator (e.g. `?`, `:`) @keyword.directive various preprocessor directives and shebangs @keyword.directive.define preprocessor definition directives -@punctuation.delimiter delimiters (e.g. `;` / `.` / `,`) -@punctuation.bracket brackets (e.g. `()` / `{}` / `[]`) +@punctuation.delimiter delimiters (e.g. `;`, `.`, `,`) +@punctuation.bracket brackets (e.g. `()`, `{}`, `[]`) @punctuation.special special symbols (e.g. `{}` in string interpolation) @comment line and block comments @@ -543,7 +545,7 @@ the exact definition): @comment.error error-type comments (e.g. `ERROR`, `FIXME`, `DEPRECATED`) @comment.warning warning-type comments (e.g. `WARNING`, `FIX`, `HACK`) -@comment.todo todo-type comments (e.g. `TODO`, `WIP`, `FIXME`) +@comment.todo todo-type comments (e.g. `TODO`, `WIP`) @comment.note note-type comments (e.g. `NOTE`, `INFO`, `XXX`) @markup.strong bold text @@ -552,10 +554,15 @@ the exact definition): @markup.underline underlined text (only for literal underline markup!) @markup.heading headings, titles (including markers) +@markup.heading.1 top-level heading +@markup.heading.2 section heading +@markup.heading.3 subsection heading +@markup.heading.4 and so on +@markup.heading.5 and so forth +@markup.heading.6 six levels ought to be enough for anybody @markup.quote block quotes @markup.math math environments (e.g. `$ ... $` in LaTeX) -@markup.environment environments (e.g. in LaTeX) @markup.link text references, footnotes, citations, etc. @markup.link.label link, reference descriptions @@ -573,6 +580,7 @@ the exact definition): @diff.delta changed text (for diff files) @tag XML-style tag names (e.g. in XML, HTML, etc.) +@tag.builtin XML-style tag names (e.g. HTML5 tags) @tag.attribute XML-style tag attributes @tag.delimiter XML-style tag delimiters -- cgit From aca2048bcd57937ea1c7b7f0325f25d5b82588db Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 18 Mar 2024 23:19:01 +0000 Subject: refactor(treesitter): redesign query iterating Problem: `TSNode:_rawquery()` is complicated, has known issues and the Lua and C code is awkwardly coupled (see logic with `active`). Solution: - Add `TSQueryCursor` and `TSQueryMatch` bindings. - Replace `TSNode:_rawquery()` with `TSQueryCursor:next_capture()` and `TSQueryCursor:next_match()` - Do more stuff in Lua - API for `Query:iter_captures()` and `Query:iter_matches()` remains the same. - `treesitter.c` no longer contains any logic related to predicates. - Add `match_limit` option to `iter_matches()`. Default is still 256. --- runtime/doc/treesitter.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index e036df5130..a76fa3c123 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -1152,6 +1152,10 @@ Query:iter_captures({node}, {source}, {start}, {stop}) end < + Note: ~ + • Captures are only returned if the query pattern of a specific capture + contained predicates. + Parameters: ~ • {node} (`TSNode`) under which the search will occur • {source} (`integer|string`) Source buffer or string to extract text @@ -1162,7 +1166,7 @@ Query:iter_captures({node}, {source}, {start}, {stop}) Defaults to `node:end_()`. Return: ~ - (`fun(end_line: integer?): integer, TSNode, vim.treesitter.query.TSMetadata, table`) + (`fun(end_line: integer?): integer, TSNode, vim.treesitter.query.TSMetadata, table?`) capture id, capture node, metadata, match *Query:iter_matches()* @@ -1206,6 +1210,8 @@ Query:iter_matches({node}, {source}, {start}, {stop}, {opts}) • max_start_depth (integer) if non-zero, sets the maximum start depth for each match. This is used to prevent traversing too deep into a tree. + • match_limit (integer) Set the maximum number of + in-progress matches (Default: 256). • all (boolean) When set, the returned match table maps capture IDs to a list of nodes. Older versions of iter_matches incorrectly mapped capture IDs to a single -- cgit From 45032a941d5b53b27558bfad18fa5e9e598d64db Mon Sep 17 00:00:00 2001 From: Evgeni Chasnovski Date: Tue, 19 Mar 2024 12:11:10 +0200 Subject: docs(lsp): describe semantic tokens highlight groups with more details Problem: Description of highlight groups for LSP semantic tokens can be more up to date and useful. Right now it misses several actually defined highlight groups and presents information about Vim highlight groups they are linked to. This is both outdated (they link to tree-sitter `@` groups now) and redundant (users can see this information with `:Inspect` over the group name itself). Solution: Synchronize the list of groups with specification and provide actionable descriptions. --- runtime/doc/lsp.txt | 62 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 24 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 5488226f78..ed5e3b63f9 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -454,30 +454,44 @@ You probably want these inside a |ColorScheme| autocommand. Use |LspTokenUpdate| and |vim.lsp.semantic_tokens.highlight_token()| for more complex highlighting. -The following groups are linked by default to standard |group-name|s: - -@lsp.type.class Structure -@lsp.type.decorator Function -@lsp.type.enum Structure -@lsp.type.enumMember Constant -@lsp.type.event Type -@lsp.type.function Function -@lsp.type.interface Structure -@lsp.type.keyword Keyword -@lsp.type.macro Macro -@lsp.type.method Function -@lsp.type.modifier Type -@lsp.type.namespace Structure -@lsp.type.number Number -@lsp.type.operator Operator -@lsp.type.parameter Identifier -@lsp.type.property Identifier -@lsp.type.regexp SpecialChar -@lsp.type.string String -@lsp.type.struct Structure -@lsp.type.type Type -@lsp.type.typeParameter TypeDef -@lsp.type.variable Identifier +The following is a list of standard captures used in queries for Nvim, +highlighted according to the current colorscheme (use |:Inspect| on one to see +the exact definition): + +@lsp.type.class Identifiers that declare or reference a class type +@lsp.type.comment Tokens that represent a comment +@lsp.type.decorator Identifiers that declare or reference decorators and annotations +@lsp.type.enum Identifiers that declare or reference an enumeration type +@lsp.type.enumMember Identifiers that declare or reference an enumeration property, constant, or member +@lsp.type.event Identifiers that declare an event property +@lsp.type.function Identifiers that declare a function +@lsp.type.interface Identifiers that declare or reference an interface type +@lsp.type.keyword Tokens that represent a language keyword +@lsp.type.macro Identifiers that declare a macro +@lsp.type.method Identifiers that declare a member function or method +@lsp.type.modifier Tokens that represent a modifier +@lsp.type.namespace Identifiers that declare or reference a namespace, module, or package +@lsp.type.number Tokens that represent a number literal +@lsp.type.operator Tokens that represent an operator +@lsp.type.parameter Identifiers that declare or reference a function or method parameters +@lsp.type.property Identifiers that declare or reference a member property, member field, or member variable +@lsp.type.regexp Tokens that represent a regular expression literal +@lsp.type.string Tokens that represent a string literal +@lsp.type.struct Identifiers that declare or reference a struct type +@lsp.type.type Identifiers that declare or reference a type that is not covered above +@lsp.type.typeParameter Identifiers that declare or reference a type parameter +@lsp.type.variable Identifiers that declare or reference a local or global variable + +@lsp.mod.abstract Types and member functions that are abstract +@lsp.mod.async Functions that are marked async +@lsp.mod.declaration Declarations of symbols +@lsp.mod.defaultLibrary Symbols that are part of the standard library +@lsp.mod.definition Definitions of symbols, for example, in header files +@lsp.mod.deprecated Symbols that should no longer be used +@lsp.mod.documentation Occurrences of symbols in documentation +@lsp.mod.modification Variable references where the variable is assigned to +@lsp.mod.readonly Readonly variables and member fields (constants) +@lsp.mod.static Class members (static members) ============================================================================== EVENTS *lsp-events* -- cgit From 881f5e59173a4f1b9a4cb16e425709e40d79d0e9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 23 Mar 2024 16:33:53 +0800 Subject: vim-patch:9.1.0199: Not enough tests for the slice() function (#27991) Problem: Not enough tests for the slice() function. Solution: Test with multibyte chars, and in both Legacy and Vim9 script. Update docs to be clearer about how it treats composing chars. (zeertzjq) closes: vim/vim#14275 https://github.com/vim/vim/commit/ad38769030b5fa86aa0e8f1f0b4266690dfad4c9 --- runtime/doc/builtin.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index be81451d08..c88513ad75 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -7411,7 +7411,8 @@ slice({expr}, {start} [, {end}]) *slice()* Similar to using a |slice| "expr[start : end]", but "end" is used exclusive. And for a string the indexes are used as character indexes instead of byte indexes. - Also, composing characters are not counted. + Also, composing characters are treated as a part of the + preceding base character. When {end} is omitted the slice continues to the last item. When {end} is -1 the last item is omitted. Returns an empty value if {start} or {end} are invalid. @@ -7758,8 +7759,8 @@ strcharpart({src}, {start} [, {len} [, {skipcc}]]) *strcharpart()* of byte index and length. When {skipcc} is omitted or zero, composing characters are counted separately. - When {skipcc} set to 1, Composing characters are ignored, - similar to |slice()|. + When {skipcc} set to 1, composing characters are treated as a + part of the preceding base character, similar to |slice()|. When a character index is used where a character does not exist it is omitted and counted as one character. For example: >vim @@ -7773,7 +7774,7 @@ strchars({string} [, {skipcc}]) *strchars()* in String {string}. When {skipcc} is omitted or zero, composing characters are counted separately. - When {skipcc} set to 1, Composing characters are ignored. + When {skipcc} set to 1, composing characters are ignored. |strcharlen()| always does this. Returns zero on error. -- cgit From 3f238b39cfdf27657b2d9452c6ffd28f8209c95f Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Thu, 21 Mar 2024 15:15:20 +0000 Subject: refactor(lsp): simplify client tracking - Remove: - uninitialized_clients - active_clients - all_buffer_active_clients - Add: - all_clients - Use `lsp.get_clients()` to get buffer clients. --- runtime/doc/lsp.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index ed5e3b63f9..451183b508 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -907,8 +907,8 @@ stop_client({client_id}, {force}) *vim.lsp.stop_client()* for this client, then force-shutdown is attempted. Parameters: ~ - • {client_id} (`integer|vim.lsp.Client`) id or |vim.lsp.Client| object, - or list thereof + • {client_id} (`integer|integer[]|vim.lsp.Client[]`) id, list of id's, + or list of |vim.lsp.Client| objects • {force} (`boolean?`) shutdown forcefully tagfunc({pattern}, {flags}) *vim.lsp.tagfunc()* -- cgit From 934f38682afd5925df675485b96ac9a2d3b8dd57 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 25 Mar 2024 20:16:42 +0000 Subject: Revert "refactor(lsp): simplify client tracking" This reverts commit 3f238b39cfdf27657b2d9452c6ffd28f8209c95f. --- runtime/doc/lsp.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 451183b508..ed5e3b63f9 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -907,8 +907,8 @@ stop_client({client_id}, {force}) *vim.lsp.stop_client()* for this client, then force-shutdown is attempted. Parameters: ~ - • {client_id} (`integer|integer[]|vim.lsp.Client[]`) id, list of id's, - or list of |vim.lsp.Client| objects + • {client_id} (`integer|vim.lsp.Client`) id or |vim.lsp.Client| object, + or list thereof • {force} (`boolean?`) shutdown forcefully tagfunc({pattern}, {flags}) *vim.lsp.tagfunc()* -- cgit From fb4e2dbbebb25aae3cc303c030d21bfee850d274 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 26 Mar 2024 05:04:57 +0800 Subject: vim-patch:9.1.0205: Cannot use modifiers before :-Ntabmove (#28031) Problem: Cannot use modifiers before :-Ntabmove. Solution: Check backwards from the command instead of checking from the start of the command line. Slightly adjust docs to make them more consistent (zeertzjq). closes: vim/vim#14289 https://github.com/vim/vim/commit/076faac5378cf517baa8c331c57488d39efadec0 --- runtime/doc/tabpage.txt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index 49b2773253..649af628d6 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -187,7 +187,7 @@ gt *i_CTRL-* *i_* :1tabnext " go to the first tab page :$tabnext " go to the last tab page :tabnext $ " as above - :tabnext # " go to the last accessed tab page + :tabnext # " go to the last accessed tab page :tabnext - " go to the previous tab page :tabnext -1 " as above :tabnext + " go to the next tab page @@ -239,18 +239,17 @@ REORDERING TAB PAGES: Move the current tab page to after tab page N. Use zero to make the current tab page the first one. N is counted before the move, thus if the second tab is the current one, - `:tabmove 1` and `:tabmove 2` have no effect. + `:tabmove 1` and `:tabmove 2` have no effect. Without N the tab page is made the last one. > - :.tabmove " do nothing - :-tabmove " move the tab page to the left - :+tabmove " move the tab page to the right - :0tabmove " move the tab page to the beginning of the tab - " list + :.tabmove " do nothing + :-tabmove " move the tab page to the left + :+tabmove " move the tab page to the right + :0tabmove " move the tab page to the first :tabmove 0 " as above :tabmove " move the tab page to the last :$tabmove " as above :tabmove $ " as above - :tabmove # " move the tab page after the last accessed + :tabmove # " move the tab page after the last accessed " tab page :tabm[ove] +[N] -- cgit From 3fd8292aaf215a17c3803ed84bc3b9dfd4931294 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 25 Mar 2024 19:04:23 +0100 Subject: vim-patch:ab01adf7c65b runtime(doc): Update options.txt closes: vim/vim#14295 https://github.com/vim/vim/commit/ab01adf7c65b4ee350b402ab3ef1e7dfa5e074f1 Co-authored-by: Song-Tianxiang <149415622+Song-Tianxiang@users.noreply.github.com> --- runtime/doc/options.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index dd3b60b7b8..e7b4300211 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -6349,7 +6349,7 @@ A jump table for the options with a short description can be found at |Q_op|. appear wrong in many places. The value must be more than 0 and less than 10000. - There are four main ways to use tabs in Vim: + There are five main ways to use tabs in Vim: 1. Always keep 'tabstop' at 8, set 'softtabstop' and 'shiftwidth' to 4 (or 3 or whatever you prefer) and use 'noexpandtab'. Then Vim will use a mix of tabs and spaces, but typing and will -- cgit From a7bbda121d035d050b449b4dc63bd6ae027e248d Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 25 Mar 2024 19:06:28 +0000 Subject: fix(test): typing --- runtime/doc/lsp.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index ed5e3b63f9..08fdf50f5b 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1016,7 +1016,7 @@ Lua module: vim.lsp.client *lsp-client* • {capabilities} (`lsp.ClientCapabilities`) The capabilities provided by the client (editor or tool) • {dynamic_capabilities} (`lsp.DynamicCapabilities`) - • {request} (`fun(method: string, params: table?, handler: lsp.Handler?, bufnr: integer): boolean, integer?`) + • {request} (`fun(method: string, params: table?, handler: lsp.Handler?, bufnr: integer?): boolean, integer?`) Sends a request to the server. This is a thin wrapper around {client.rpc.request} with some additional checking. If {handler} is not -- cgit From 00e71d3da3464df2b4c4f33bfd5fac6d88e7c867 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Thu, 21 Mar 2024 15:15:20 +0000 Subject: refactor(lsp): simplify client tracking - Remove: - uninitialized_clients - active_clients - all_buffer_active_clients - Add: - all_clients - Use `lsp.get_clients()` to get buffer clients. --- runtime/doc/lsp.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 08fdf50f5b..70b8878837 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -907,8 +907,8 @@ stop_client({client_id}, {force}) *vim.lsp.stop_client()* for this client, then force-shutdown is attempted. Parameters: ~ - • {client_id} (`integer|vim.lsp.Client`) id or |vim.lsp.Client| object, - or list thereof + • {client_id} (`integer|integer[]|vim.lsp.Client[]`) id, list of id's, + or list of |vim.lsp.Client| objects • {force} (`boolean?`) shutdown forcefully tagfunc({pattern}, {flags}) *vim.lsp.tagfunc()* -- cgit From 3f3c7299a14ff0025487a416462d8c32d922e04a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 26 Mar 2024 18:30:17 +0800 Subject: docs: remove remaining mentions of hkmap (#28038) --- runtime/doc/cmdline.txt | 8 -------- runtime/doc/hebrew.txt | 41 ++++++++++------------------------------- runtime/doc/index.txt | 5 +---- runtime/doc/insert.txt | 6 +----- runtime/doc/options.txt | 7 +++---- runtime/doc/quickref.txt | 7 ++----- runtime/doc/starting.txt | 3 ++- 7 files changed, 19 insertions(+), 58 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index 57a4223c53..f306067a9c 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -274,14 +274,6 @@ CTRL-P command-line completion (see |cmdline-completion|) CTRL-A command-line completion (see |cmdline-completion|) CTRL-L command-line completion (see |cmdline-completion|) - *c_CTRL-_* -CTRL-_ Switch between Hebrew and English keyboard mode, which is - private to the command-line and not related to hkmap. - This is useful when Hebrew text entry is required in the - command-line, searches, abbreviations, etc. Applies only if - the 'allowrevins' option is set. - See |rileft.txt|. - *c_CTRL-^* CTRL-^ Toggle the use of language |:lmap| mappings and/or Input Method. diff --git a/runtime/doc/hebrew.txt b/runtime/doc/hebrew.txt index e38385e13a..c19b4b9835 100644 --- a/runtime/doc/hebrew.txt +++ b/runtime/doc/hebrew.txt @@ -14,7 +14,7 @@ currently helping support these features. ------------------------------------------------------------------------------ Introduction -Hebrew-specific options are 'hkmap', 'hkmapp' 'keymap'=hebrew and 'aleph'. +Hebrew-specific 'keymap' values are "hebrew" and "hebrewp". Hebrew-useful options are 'delcombine', 'allowrevins', 'revins', 'rightleft' and 'rightleftcmd'. @@ -30,7 +30,7 @@ Details + 'rightleft' ('rl') sets window orientation to right-to-left. This means that the logical text 'ABC' will be displayed as 'CBA', and will start drawing at the right edge of the window, not the left edge. - + 'keymap' ('kmp') sets keyboard mapping. use values "hebrew" or "heprewp" + + 'keymap' ('kmp') sets keyboard mapping. use values "hebrew" or "hebrewp" (the latter option enables phonetic mapping) + 'delcombine' ('deco'), boolean, allows one to remove the niqud or te`amim by pressing 'x' on a character (with associated niqud). @@ -41,35 +41,23 @@ Details + Encoding: + Under Unix, ISO 8859-8 encoding (Hebrew letters codes: 224-250). + Under MS DOS, PC encoding (Hebrew letters codes: 128-154). - These are defaults, that can be overridden using the 'aleph' option. + You should prefer using UTF8, as it supports the combining-characters ('deco' does nothing if UTF8 encoding is not active). + Vim arguments: - + `vim -H file` starts editing a Hebrew file, i.e. 'rightleft' and 'hkmap' - are set. + + `vim -H file` starts editing a Hebrew file, i.e. 'rightleft' is set and + 'keymap' is set to "hebrew". + Keyboard: - + The 'allowrevins' option enables the CTRL-_ command in Insert mode and - in Command-line mode. + + The 'allowrevins' option enables the CTRL-_ command in Insert mode. - + CTRL-_ in insert/replace modes toggles 'revins' and 'hkmap' as follows: - - When in rightleft window, 'revins' is toggled, since - English will likely be inserted in this case. - - When in norightleft window, 'revins' is toggled, since Hebrew - will likely be inserted in this case. + + CTRL-_ in Insert mode toggles 'revins'. CTRL-_ moves the cursor to the end of the typed text. - + CTRL-_ in command mode only toggles keyboard mapping (see Bugs below). - This setting is independent of 'hkmap' option, which only applies to - insert/replace mode. - Note: On some keyboards, CTRL-_ is mapped to CTRL-?. - + Keyboard mapping while 'hkmap' is set (standard Israeli keyboard): + + Keyboard mapping while 'keymap' is "hebrew" (standard Israeli keyboard): q w e r t y u i o p / ' ק ר א ט ו ן ם פ @@ -80,11 +68,8 @@ Details z x c v b n m , . / ז ס ב ה נ מ צ ת ץ . - This is also the keymap when 'keymap=hebrew' is set. The advantage of - 'keymap' is that it works properly when using UTF8, e.g. it inserts the - correct characters; 'hkmap' does not. The 'keymap' keyboard can also - insert niqud and te`amim. To see what those mappings are, look at the - keymap file 'hebrew.vim' etc. + The 'keymap' keyboard can also insert niqud and te`amim. To see what + those mappings are, look at the keymap file hebrew.vim etc. Typing backwards @@ -102,13 +87,7 @@ If the 'showmode' option is set, "-- REVERSE INSERT --" will be shown in the status line when reverse Insert mode is active. When the 'allowrevins' option is set, reverse Insert mode can be also entered -via CTRL-_, which has some extra functionality: First, keyboard mapping is -changed according to the window orientation -- if in a left-to-right window, -'revins' is used to enter Hebrew text, so the keyboard changes to Hebrew -('hkmap' is set); if in a right-to-left window, 'revins' is used to enter -English text, so the keyboard changes to English ('hkmap' is reset). Second, -when exiting 'revins' via CTRL-_, the cursor moves to the end of the typed -text (if possible). +and exited via CTRL-_. ------------------------------------------------------------------------------ diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 969346c4c7..79f10b33f1 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -92,8 +92,7 @@ tag char action in Insert mode ~ CTRL-\ others not used |i_CTRL-]| CTRL-] trigger abbreviation |i_CTRL-^| CTRL-^ toggle use of |:lmap| mappings -|i_CTRL-_| CTRL-_ When 'allowrevins' set: change language - (Hebrew) +|i_CTRL-_| CTRL-_ When 'allowrevins' set: toggle 'revins' to '~' not used, except '0' and '^' followed by CTRL-D @@ -1072,8 +1071,6 @@ tag command action in Command-line editing mode ~ CTRL-\ others not used |c_CTRL-]| CTRL-] trigger abbreviation |c_CTRL-^| CTRL-^ toggle use of |:lmap| mappings -|c_CTRL-_| CTRL-_ when 'allowrevins' set: change language - (Hebrew) |c_| delete the character under the cursor |c_| cursor left diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index 34affb22e9..91b0d41f1c 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -225,11 +225,7 @@ CTRL-Y Insert the character which is above the cursor. able to copy characters from a long line. *i_CTRL-_* -CTRL-_ Switch between insert direction, by toggling 'revins', as follows: - - When in a rightleft window, 'revins' is toggled, - since English will likely be inserted in this case. - - When in a norightleft window, 'revins' is toggled, - since a rightleft language will likely be inserted in this case. +CTRL-_ Switch between insert direction, by toggling 'revins'. CTRL-_ moves the cursor to the end of the typed text. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index e7b4300211..3cc5b6af64 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -639,10 +639,9 @@ A jump table for the options with a short description can be found at |Q_op|. *'allowrevins'* *'ari'* *'noallowrevins'* *'noari'* 'allowrevins' 'ari' boolean (default off) global - Allow CTRL-_ in Insert and Command-line mode. This is default off, to - avoid that users that accidentally type CTRL-_ instead of SHIFT-_ get - into reverse Insert mode, and don't know how to get out. See - 'revins'. + Allow CTRL-_ in Insert mode. This is default off, to avoid that users + that accidentally type CTRL-_ instead of SHIFT-_ get into reverse + Insert mode, and don't know how to get out. See 'revins'. *'ambiwidth'* *'ambw'* 'ambiwidth' 'ambw' string (default "single") diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 4ef4392f92..c0d00d16cb 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -620,8 +620,7 @@ In Insert or Command-line mode: the help Short explanation of each option: *option-list* -'aleph' 'al' ASCII code of the letter Aleph (Hebrew) -'allowrevins' 'ari' allow CTRL-_ in Insert and Command-line mode +'allowrevins' 'ari' allow CTRL-_ in Insert mode 'ambiwidth' 'ambw' what to do with Unicode chars of ambiguous width 'arabic' 'arab' for Arabic as a default second language 'arabicshape' 'arshape' do shaping for Arabic characters @@ -739,8 +738,6 @@ Short explanation of each option: *option-list* 'helplang' 'hlg' preferred help languages 'hidden' 'hid' don't unload buffer when it is |abandon|ed 'history' 'hi' number of command-lines that are remembered -'hkmap' 'hk' Hebrew keyboard mapping -'hkmapp' 'hkp' phonetic Hebrew keyboard mapping 'hlsearch' 'hls' highlight matches with last search pattern 'icon' let Vim set the text of the window icon 'iconstring' string to use for the Vim icon text @@ -1141,7 +1138,7 @@ Context-sensitive completion on the command-line: |-b| -b binary mode |-l| -l lisp mode |-A| -A Arabic mode ('arabic' is set) -|-H| -H Hebrew mode ('hkmap' and 'rightleft' are set) +|-H| -H Hebrew mode (Hebrew keymap & 'rightleft' are set) |-V| -V Verbose, give informative messages |-r| -r give list of swap files |-r| -r {file} .. recover aborted edit session diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index b2b5568ee6..fb8ed0344b 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -260,7 +260,8 @@ argument. -A Arabic mode. Sets the 'arabic' option on. *-H* --H Hebrew mode. Sets the 'rightleft' option on and 'keymap' to "hebrew" +-H Hebrew mode. Sets the 'rightleft' option on and the 'keymap' + option to "hebrew". *-V* *verbose* -V[N] Verbose. Sets the 'verbose' option to [N] (default: 10). -- cgit From 77458e613b67b9e7607ae781bcfbdc2ff6b1b2ef Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 27 Mar 2024 05:41:41 +0800 Subject: vim-patch:9.1.0207: No autocommand when writing session file (#28048) Problem: No autocommand when writing session file Solution: Add SessionWritePost autocommand (Colin Kennedy) fixes: vim/vim#14242 closes: vim/vim#14288 https://github.com/vim/vim/commit/e5f2280381250801a28dcff9823e6f94e7b163fc Co-authored-by: Colin Kennedy --- runtime/doc/autocmd.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 8890872e1a..b3974e3246 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -883,6 +883,9 @@ SafeState When nothing is pending, going to wait for the *SessionLoadPost* SessionLoadPost After loading the session file created using + the |:mksession| command. + *SessionWritePost* +SessionWritePost After writing a session file by calling the |:mksession| command. *ShellCmdPost* ShellCmdPost After executing a shell command with |:!cmd|, -- cgit From fc6d713dd8066f3132f7234a94ac059ae6d596a7 Mon Sep 17 00:00:00 2001 From: Mayrom <32033791+nhruo123@users.noreply.github.com> Date: Wed, 27 Mar 2024 02:08:54 +0200 Subject: feat(diagnostic): add support for many namespaces filtering in GetOpts (#28045) --- runtime/doc/diagnostic.txt | 3 ++- runtime/doc/news.txt | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index c9e783ca62..a9172119d0 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -371,7 +371,8 @@ Lua module: vim.diagnostic *diagnostic-api* A table with the following keys: Fields: ~ - • {namespace}? (`integer`) Limit diagnostics to the given namespace. + • {namespace}? (`integer[]|integer`) Limit diagnostics to one or more + namespaces. • {lnum}? (`integer`) Limit diagnostics to the given line number. • {severity}? (`vim.diagnostic.SeverityFilter`) See |diagnostic-severity|. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 0222d547b0..1aee5c656b 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -408,6 +408,9 @@ The following changes to existing APIs or features add new behavior. "virtual_text" table, which gives users more control over how diagnostic virtual text is displayed. +• |vim.diagnostic.get()| and |vim.diagnostic.count()| accept multiple + namespaces rather than just a single namespace. + • 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()| API function already allowed you to define such ranges, but highlight regions -- cgit From 7d971500847089ec8ade926a7f84d6bb3a51c8b0 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 25 Mar 2024 22:06:31 +0000 Subject: fix(treesitter): return correct match table in iter_captures() --- runtime/doc/treesitter.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index a76fa3c123..2dbff332af 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -1166,7 +1166,7 @@ Query:iter_captures({node}, {source}, {start}, {stop}) Defaults to `node:end_()`. Return: ~ - (`fun(end_line: integer?): integer, TSNode, vim.treesitter.query.TSMetadata, table?`) + (`fun(end_line: integer?): integer, TSNode, vim.treesitter.query.TSMetadata, TSQueryMatch`) capture id, capture node, metadata, match *Query:iter_matches()* -- cgit From a89ce89742db600665b69e58d5e1bc3dbee9d57b Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Thu, 28 Mar 2024 02:32:32 +0100 Subject: docs: fix typos (#27868) Co-authored-by: ite-usagi <77563904+ite-usagi@users.noreply.github.com> Co-authored-by: v-sim <56476039+v-sim@users.noreply.github.com> Co-authored-by: Evgeni Chasnovski Co-authored-by: zeertzjq Co-authored-by: Quico Augustijn Co-authored-by: nhld Co-authored-by: francisco souza <108725+fsouza@users.noreply.github.com> --- runtime/doc/api.txt | 2 +- runtime/doc/lua.txt | 2 +- runtime/doc/treesitter.txt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 0512814887..bf56a09ac7 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -2447,7 +2447,7 @@ nvim_buf_set_mark({buffer}, {name}, {line}, {col}, {opts}) • |nvim_buf_get_mark()| nvim_buf_set_name({buffer}, {name}) *nvim_buf_set_name()* - Sets the full file name for a buffer + Sets the full file name for a buffer, like |:file_f| Parameters: ~ • {buffer} Buffer handle, or 0 for current buffer diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 85f3d3288e..b9bc73e0b8 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -968,7 +968,7 @@ vim.str_byteindex({str}, {index}, {use_utf16}) *vim.str_byteindex()* Convert UTF-32 or UTF-16 {index} to byte index. If {use_utf16} is not supplied, it defaults to false (use UTF-32). Returns the byte index. - Invalid UTF-8 and NUL is treated like by |vim.str_byteindex()|. An {index} + Invalid UTF-8 and NUL is treated like in |vim.str_utfindex()|. An {index} in the middle of a UTF-16 sequence is rounded upwards to the end of that sequence. diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 2dbff332af..0d5511ac40 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -149,7 +149,7 @@ TSNode:sexpr() *TSNode:sexpr()* Get an S-expression representing the node as a string. TSNode:id() *TSNode:id()* - Get an unique identifier for the node inside its own tree. + Get a unique identifier for the node inside its own tree. No guarantees are made about this identifier's internal representation, except for being a primitive Lua type with value equality (so not a @@ -524,7 +524,7 @@ the exact definition): @keyword.operator operators that are English words (e.g. `and`, `or`) @keyword.import keywords for including modules (e.g. `import`, `from` in Python) @keyword.type keywords defining composite types (e.g. `struct`, `enum`) -@keyword.modifier keywords definining type modifiers (e.g. `const`, `static`, `public`) +@keyword.modifier keywords defining type modifiers (e.g. `const`, `static`, `public`) @keyword.repeat keywords related to loops (e.g. `for`, `while`) @keyword.return keywords like `return` and `yield` @keyword.debug keywords related to debugging -- cgit From 4147302f4be3fe8a5dae3f20a336477cb5f507a4 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Tue, 26 Mar 2024 19:06:39 +0100 Subject: vim-patch:9.1.0211: page-wise scrolling does not support smooth-scrolling Problem: Page-wise scrolling with Ctrl-F/Ctrl-B implements it's own logic to change the topline and cursor. In doing so, skipcol is not handled properly for 'smoothscroll', and virtual lines. Solution: Re-use the logic from Ctrl-E/Ctrl-Y while staying backward compatible as much as possible. https://github.com/vim/vim/commit/b9f5b95b7bec2414a5a96010514702d99afea18e --- runtime/doc/options.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 3cc5b6af64..043524e976 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -5693,8 +5693,8 @@ A jump table for the options with a short description can be found at |Q_op|. highlighted with |hl-NonText|. You may also want to add "lastline" to the 'display' option to show as much of the last line as possible. - NOTE: only partly implemented, currently works with CTRL-E, CTRL-Y - and scrolling with the mouse. + NOTE: only partly implemented, currently works with CTRL-E, CTRL-Y, + CTRL-B, CTRL-F and scrolling with the mouse. *'softtabstop'* *'sts'* 'softtabstop' 'sts' number (default 0) -- cgit From 2f638c0ac6275bebacd12671481642fa43d7ba10 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Thu, 28 Mar 2024 10:20:45 +0100 Subject: vim-patch:9.1.0215: Half-page scrolling does not support smooth-scrolling Problem: Page-wise scrolling with Ctrl-D/Ctrl-U implements it's own logic to change the topline and cursor. More logic than necessary for scrolling with Ctrl-F/Ctrl-B was removed in patch 9.1.0211. Solution: Re-use the logic from Ctrl-E/Ctrl-Y/Ctrl-F/Ctrl-B while staying backward compatible as much as possible. Restore some of the logic that determined how many lines will be scrolled (Luuk van Baal) https://github.com/vim/vim/commit/5a2e3ec9ac72b6e644fea4ebba7e632498296e2f --- runtime/doc/options.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 043524e976..b0583d306d 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -5694,7 +5694,7 @@ A jump table for the options with a short description can be found at |Q_op|. You may also want to add "lastline" to the 'display' option to show as much of the last line as possible. NOTE: only partly implemented, currently works with CTRL-E, CTRL-Y, - CTRL-B, CTRL-F and scrolling with the mouse. + CTRL-D, CTRL-U, CTRL-F, CTRL-B and scrolling with the mouse. *'softtabstop'* *'sts'* 'softtabstop' 'sts' number (default 0) @@ -7164,8 +7164,8 @@ A jump table for the options with a short description can be found at |Q_op|. will scroll 'window' minus two lines, with a minimum of one. When 'window' is equal to 'lines' minus one CTRL-F and CTRL-B scroll in a much smarter way, taking care of wrapping lines. - When resizing the Vim window, the value is smaller than 1 or more than - or equal to 'lines' it will be set to 'lines' minus 1. + When resizing the Vim window, and the value is smaller than 1 or more + than or equal to 'lines' it will be set to 'lines' minus 1. Note: Do not confuse this with the height of the Vim window, use 'lines' for that. -- cgit From 2e4e12756a697d4767ec294e1f268384395e7a7f Mon Sep 17 00:00:00 2001 From: bfredl Date: Thu, 28 Mar 2024 15:27:32 +0100 Subject: feat(ui): indicate margins for the area used by win_viewport Problem: using win_viewport for implementing smooth scrolling in an external UI might run into problems when winbar or borders is used, as there is no indication that the entire grid is not used for scrolled buffer text. Solution: add `win_viewport_margins` event. --- runtime/doc/ui.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt index b8d47923ca..5f217c5537 100644 --- a/runtime/doc/ui.txt +++ b/runtime/doc/ui.txt @@ -656,6 +656,11 @@ tabs. the screen and copy it to the viewport destination once `win_viewport` is received. +["win_viewport_margins", grid, win, top, bottom, left, right] ~ + Indicates the margins of a window grid which are _not_ part of the + viewport as indicated by the `win_viewport` event. This happens + e.g. in the presence of 'winbar' and floating window borders. + ["win_extmark", grid, win, ns_id, mark_id, row, col] ~ Updates the position of an extmark which is currently visible in a window. Only emitted if the mark has the `ui_watched` attribute. -- cgit From d223a7cbd2a204fffeb220fb18dfede8f4ef3e1f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 29 Mar 2024 17:49:25 +0800 Subject: vim-patch:9.1.0228: Two unrelated things are tested by a single test (#28093) Problem: Two unrelated things are tested by a single test. Solution: Split it into two, restoring the old Test_brace_single_line(). Add missing cleanup to some tests. (zeertzjq) closes: vim/vim#14323 https://github.com/vim/vim/commit/ad493ef3ea9ef7f2b0badcd2298883b5ab6e4ef4 --- runtime/doc/options.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index b0583d306d..54333ee85d 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -5693,8 +5693,7 @@ A jump table for the options with a short description can be found at |Q_op|. highlighted with |hl-NonText|. You may also want to add "lastline" to the 'display' option to show as much of the last line as possible. - NOTE: only partly implemented, currently works with CTRL-E, CTRL-Y, - CTRL-D, CTRL-U, CTRL-F, CTRL-B and scrolling with the mouse. + NOTE: partly implemented, doesn't work yet for |gj| and |gk|. *'softtabstop'* *'sts'* 'softtabstop' 'sts' number (default 0) -- cgit From 8424c64498460c55adb05d50524c42b06dff8103 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Fri, 29 Mar 2024 15:43:26 +0100 Subject: docs: document setting g:clipboard to v:false (#28085) --- runtime/doc/provider.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/provider.txt b/runtime/doc/provider.txt index b8182347f8..a39f4bc5d7 100644 --- a/runtime/doc/provider.txt +++ b/runtime/doc/provider.txt @@ -185,7 +185,7 @@ See 'clipboard' for details and options. The presence of a working clipboard tool implicitly enables the '+' and "*" registers. Nvim looks for these clipboard tools, in order of priority: - - |g:clipboard| + - |g:clipboard| (unless unset or `false`) - pbcopy, pbpaste (macOS) - wl-copy, wl-paste (if $WAYLAND_DISPLAY is set) - waycopy, waypaste (if $WAYLAND_DISPLAY is set) -- cgit From 38e38d1b401e38459842f0e4da431e3dd6c2e527 Mon Sep 17 00:00:00 2001 From: James Trew <66286082+jamestrew@users.noreply.github.com> Date: Fri, 29 Mar 2024 12:23:01 -0400 Subject: fix(fs): allow backslash characters in unix paths Backslashes are valid characters in unix style paths. Fix the conversion of backslashes to forward slashes in several `vim.fs` functions when not on Windows. On Windows, backslashes will still be converted to forward slashes. --- runtime/doc/lua.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index b9bc73e0b8..e02ed20644 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2954,13 +2954,14 @@ vim.fs.joinpath({...}) *vim.fs.joinpath()* vim.fs.normalize({path}, {opts}) *vim.fs.normalize()* Normalize a path to a standard format. A tilde (~) character at the - beginning of the path is expanded to the user's home directory and any - backslash (\) characters are converted to forward slashes (/). Environment - variables are also expanded. + beginning of the path is expanded to the user's home directory and + environment variables are also expanded. + + On Windows, backslash (\) characters are converted to forward slashes (/). Examples: >lua vim.fs.normalize('C:\\\\Users\\\\jdoe') - -- 'C:/Users/jdoe' + -- On Windows: 'C:/Users/jdoe' vim.fs.normalize('~/src/neovim') -- '/home/jdoe/src/neovim' -- cgit From 837f268093732ae123f037e6176d0037efd5e40e Mon Sep 17 00:00:00 2001 From: Evgeni Chasnovski Date: Sat, 30 Mar 2024 11:27:42 +0200 Subject: fix(highlight): add `Nvim{Light,Dark}Gray{1,2,3,4}` colors --- runtime/doc/syntax.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 4b99fbface..5e95e00e45 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -4776,11 +4776,11 @@ guisp={color-name} *guisp* Colors which define Nvim's default color scheme: NvimDarkBlue NvimLightBlue NvimDarkCyan NvimLightCyan + NvimDarkGray1 NvimLightGray1 + NvimDarkGray2 NvimLightGray2 + NvimDarkGray3 NvimLightGray3 + NvimDarkGray4 NvimLightGray4 NvimDarkGreen NvimLightGreen - NvimDarkGrey1 NvimLightGrey1 - NvimDarkGrey2 NvimLightGrey2 - NvimDarkGrey3 NvimLightGrey3 - NvimDarkGrey4 NvimLightGrey4 NvimDarkMagenta NvimLightMagenta NvimDarkRed NvimLightRed NvimDarkYellow NvimLightYellow -- cgit From e1ff2c51cad755d0ddc04a23df23e317d77023ed Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 31 Mar 2024 11:20:05 +0800 Subject: feat(lua): pass keys before mapping to vim.on_key() callback (#28098) Keys before mapping (i.e. typed keys) are passed as the second argument. --- runtime/doc/lua.txt | 10 ++++++---- runtime/doc/news.txt | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index e02ed20644..d967e2b313 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -1640,12 +1640,14 @@ vim.on_key({fn}, {ns_id}) *vim.on_key()* Note: ~ • {fn} will be removed on error. • {fn} will not be cleared by |nvim_buf_clear_namespace()| - • {fn} will receive the keys after mappings have been evaluated Parameters: ~ - • {fn} (`fun(key: string)?`) Function invoked on every key press. - |i_CTRL-V| Passing in nil when {ns_id} is specified removes - the callback associated with namespace {ns_id}. + • {fn} (`fun(key: string, typed: string)?`) Function invoked on + every key press. |i_CTRL-V| {key} is the key after mappings + have been applied, and {typed} is the key(s) before mappings + are applied, which may be empty if {key} is produced by + non-typed keys. When {fn} is nil and {ns_id} is specified, + the callback associated with namespace {ns_id} is removed. • {ns_id} (`integer?`) Namespace ID. If nil or 0, generates and returns a new |nvim_create_namespace()| id. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 1aee5c656b..e39cf95da9 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -354,6 +354,9 @@ The following changes to existing APIs or features add new behavior. • |vim.region()| can use a string accepted by |getpos()| as position. +• |vim.on_key()| callbacks receive a second argument for keys typed before + mappings are applied. + • |vim.diagnostic.config()| now accepts a function for the virtual_text.prefix option, which allows for rendering e.g., diagnostic severities differently. -- cgit From 6cfca21bac6bb39b50cba1c23ffb2b69e2d94df8 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 2 Apr 2024 10:54:40 +0200 Subject: feat(treesitter): add `@injection.filename` Problem: Injecting languages for file redirects (e.g., in bash) is not possible. Solution: Add `@injection.filename` capture that is piped through `vim.filetype.match({ filename = node_text })`; the resulting filetype (if not `nil`) is then resolved as a language (either directly or through the list maintained via `vim.treesitter.language.register()`). Note: `@injection.filename` is a non-standard capture introduced by Helix; having two editors implement it makes it likely to be upstreamed. --- runtime/doc/news.txt | 3 +++ runtime/doc/treesitter.txt | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index e39cf95da9..5aa274637b 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -240,6 +240,9 @@ The following new APIs and features were added. language aliases (e.g., filetype or custom shorthands) registered via |vim.treesitter.language.register()| and/or attempt lower case variants of the text. + • `@injection.filename` will try to match the node text via + |vim.filetype.match()| and treat the result as a language name in the same + way as `@injection.language`. • The `#set!` directive now supports `injection.self` and `injection.parent` for injecting either the current node's language or the parent |LanguageTree|'s language, respectively. diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 0d5511ac40..2356a0c235 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -654,6 +654,10 @@ parent tree. The language injection query allows you to specify these • `@injection.language` - indicates that the captured node’s text may contain the name of a language that should be used to re-parse the `@injection.content`. + • `@injection.filename` - indicates that the captured node’s text may + contain a filename; the corresponding filetype is then looked-up up via + |vim.filetype.match()| and treated as the name of a language that should + be used to re-parse the `@injection.content`. The language injection behavior can also be configured by some properties associated with patterns: -- cgit From 15a2dd9e963784123273ec830e82e24ecea4ad0b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 4 Apr 2024 06:19:13 +0800 Subject: vim-patch:89cc03af71d9 (#28168) runtime(doc): sort filetype.txt in the alphabetical order (vim/vim#14395) https://github.com/vim/vim/commit/89cc03af71d9beb839d296b78a87869e7a0a8996 Co-authored-by: K.Takata --- runtime/doc/filetype.txt | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 7b576be929..dc0dda0e85 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -400,6 +400,19 @@ So to enable this only for ruby, set the following variable: > If both, the global `plugin_exec` and the `_exec` specific variable are set, the filetype specific variable should have precedent. + +ASCIIDOC *ft-asciidoc-plugin* + +To enable |folding| use this: > + let g:asciidoc_folding = 1 + +To disable nesting of folded headers use this: > + let g:asciidoc_foldnested = 0 + +To disable folding everything under the title use this: > + let asciidoc_fold_under_title = 0 + + AWK *ft-awk-plugin* Support for features specific to GNU Awk, like @include, can be enabled by @@ -527,18 +540,6 @@ under it. If not found, a new entry and item is prepended to the beginning of the Changelog. -ASCIIDOC *ft-asciidoc-plugin* - -To enable |folding| use this: > - let g:asciidoc_folding = 1 - -To disable nesting of folded headers use this: > - let g:asciidoc_foldnested = 0 - -To disable folding everything under the title use this: > - let asciidoc_fold_under_title = 0 - - FORTRAN *ft-fortran-plugin* Options: -- cgit From a500c5f808ccf0b678c935f00e0af4503a5bd724 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 5 Apr 2024 18:04:45 +0800 Subject: vim-patch:8.1.0815: dialog for file changed outside of Vim not tested (#28184) Problem: Dialog for file changed outside of Vim not tested. Solution: Add a test. Move FileChangedShell test. Add 'L' flag to feedkeys(). https://github.com/vim/vim/commit/5e66b42aae7c67a3ef67617d4bd43052ac2b73ce Co-authored-by: Bram Moolenaar --- runtime/doc/builtin.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index c88513ad75..20cdb396e1 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -1588,6 +1588,7 @@ feedkeys({string} [, {mode}]) *feedkeys()* 't' Handle keys as if typed; otherwise they are handled as if coming from a mapping. This matters for undo, opening folds, etc. + 'L' Lowlevel input. Other flags are not used. 'i' Insert the string instead of appending (see above). 'x' Execute commands until typeahead is empty. This is similar to using ":normal!". You can call feedkeys() -- cgit From 9711370c26453f3a966b9306111939b144248b41 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 5 Apr 2024 18:08:54 +0800 Subject: feat(defaults): add :Inspect to right-click menu (#28181) Ref #21393 - Move default user commands to _defaults.lua as that now contains all kinds of defaults rather than just default mappings and menus. - Remove the :aunmenu as there are no menus when _defaults.lua is run. --- runtime/doc/gui.txt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index bf62dba539..a64d722177 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -443,18 +443,18 @@ You can define the special menu "PopUp". This is the menu that is displayed when the right mouse button is pressed, if 'mousemodel' is set to popup or popup_setpos. -The default "PopUp" menu is: > - aunmenu PopUp - vnoremenu PopUp.Cut "+x - vnoremenu PopUp.Copy "+y - anoremenu PopUp.Paste "+gP - vnoremenu PopUp.Paste "+P - vnoremenu PopUp.Delete "_x - nnoremenu PopUp.Select\ All ggVG - vnoremenu PopUp.Select\ All gg0oG$ - inoremenu PopUp.Select\ All VG - anoremenu PopUp.-1- - anoremenu PopUp.How-to\ disable\ mouse help disable-mouse +The default "PopUp" menu is: >vim + vnoremenu PopUp.Cut "+x + vnoremenu PopUp.Copy "+y + anoremenu PopUp.Paste "+gP + vnoremenu PopUp.Paste "+P + vnoremenu PopUp.Delete "_x + nnoremenu PopUp.Select\ All ggVG + vnoremenu PopUp.Select\ All gg0oG$ + inoremenu PopUp.Select\ All VG + anoremenu PopUp.Inspect Inspect + anoremenu PopUp.-1- + anoremenu PopUp.How-to\ disable\ mouse help disable-mouse < Showing What Menus Are Mapped To *showing-menus* -- cgit From 2b9d8dc87e84ea9c03eb8852af8fd9fe00a6033a Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Thu, 4 Apr 2024 23:49:21 +0200 Subject: vim-patch:408281e16a36 runtime: Remove fallback :CompilerSet definition from compiler plugins The :CompilerSet command was added in version Vim 6.4 which was released twenty years ago. Other runtime files do not support versions of that vintage so it is reasonable to remove this fallback command definition now. closes: vim/vim#14399 https://github.com/vim/vim/commit/408281e16a36c15eed10fbf0406fa8ab159fc4bf Co-authored-by: Doug Kearns --- runtime/doc/usr_41.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 56750420e9..1c03a61d55 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -2500,13 +2500,9 @@ When you write a compiler file and put it in your personal runtime directory variable to make the default file skip the settings. *:CompilerSet* The second mechanism is to use ":set" for ":compiler!" and ":setlocal" for -":compiler". Vim defines the ":CompilerSet" user command for this. However, -older Vim versions don't, thus your plugin should define it then. This is an -example: > +":compiler". Vim defines the ":CompilerSet" user command for this. This is +an example: > - if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal - endif CompilerSet errorformat& " use the default 'errorformat' CompilerSet makeprg=nmake -- cgit From 73de98256cf3932dca156fbfd0c82c1cc10d487e Mon Sep 17 00:00:00 2001 From: Evgeni Chasnovski Date: Thu, 4 Apr 2024 18:10:12 +0300 Subject: feat(comment): add built-in commenting Design - Enable commenting support only through `gc` mappings for simplicity. No ability to configure, no Lua module, no user commands. Yet. - Overall implementation is a simplified version of 'mini.comment' module of 'echasnovski/mini.nvim' adapted to be a better suit for core. It basically means reducing code paths which use only specific fixed set of plugin config. All used options are default except `pad_comment_parts = false`. This means that 'commentstring' option is used as is without forcing single space inner padding. As 'tpope/vim-commentary' was considered for inclusion earlier, here is a quick summary of how this commit differs from it: - **User-facing features**. Both implement similar user-facing mappings. This commit does not include `gcu` which is essentially a `gcgc`. There are no commands, events, or configuration in this commit. - **Size**. Both have reasonably comparable number of lines of code, while this commit has more comments in tricky areas. - **Maintainability**. This commit has (purely subjectively) better readability, tests, and Lua types. - **Configurability**. This commit has no user configuration, while 'vim-commentary' has some (partially as a counter-measure to possibly modifying 'commentstring' option). - **Extra features**: - This commit supports tree-sitter by computing `'commentstring'` option under cursor, which can matter in presence of tree-sitter injected languages. - This commit comments blank lines while 'tpope/vim-commentary' does not. At the same time, blank lines are not taken into account when deciding the toggle action. - This commit has much better speed on larger chunks of lines (like above 1000). This is thanks to using `nvim_buf_set_lines()` to set all new lines at once, and not with `vim.fn.setline()`. --- runtime/doc/news.txt | 2 ++ runtime/doc/various.txt | 38 ++++++++++++++++++++++++++++++++++++++ runtime/doc/vim_diff.txt | 2 ++ 3 files changed, 42 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 5aa274637b..c219762c3f 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -346,6 +346,8 @@ The following new APIs and features were added. • |extmarks| option `scoped`: only show the extmarks in its namespace's scope. +• Added built-in |commenting| support. + ============================================================================== CHANGED FEATURES *news-changed* diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 33f57580c7..803ca95cdf 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -557,5 +557,43 @@ LessInitFunc in your vimrc, for example: > set nocursorcolumn nocursorline endfunc < +============================================================================== +3. Commenting *commenting* + +Nvim supports commenting and uncommenting of lines based on 'commentstring'. + +Acting on a single line behaves as follows: +- If the line matches 'commentstring', the comment markers are removed (e.g. + `/*foo*/` is transformed to `foo`). +- Otherwise the comment markers are added to the current line (e.g. `foo` is + transformed to `/*foo*/`). Blank lines are ignored. + +Acting on multiple lines behaves as follows: +- If each affected non-blank line matches 'commentstring', then all comment + markers are removed. +- Otherwise all affected lines are converted to comments; blank lines are + transformed to empty comments (e.g. `/**/`). Comment markers are aligned to + the least indented line. + +If the filetype of the buffer is associated with a language for which a +|treesitter| parser is installed, then |vim.filetype.get_option()| is called +to look up the value of 'commentstring' corresponding to the cursor position. +(This can be different from the buffer's 'commentstring' in case of +|treesitter-language-injections|.) + + *gc-default* +gc{motion} Comment or uncomment lines covered by {motion}. + + *gcc-default* +gcc Comment or uncomment [count] lines starting at cursor. + + *v_gc-default* +{Visual}gc Comment or uncomment the selected line(s). + + *o_gc-default* +gc Text object for the largest contiguous block of + non-blank commented lines around the cursor (e.g. + `gcgc` uncomments a comment block; `dgc` deletes it). + Works only in Operator-pending mode. vim:noet:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index a76166abf7..82f3fe9b1b 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -134,6 +134,8 @@ of these in your config by simply removing the mapping, e.g. ":unmap Y". - @ |v_@-default| - # |v_#-default| - * |v_star-default| +- gc |gc-default| |v_gc-default| |o_gc-default| +- gcc |gcc-default| - Nvim LSP client defaults |lsp-defaults| - K |K-lsp-default| -- cgit From 703f97568d5c5093e309c35e3fa9efc1f0d2f41d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 6 Apr 2024 18:40:38 +0800 Subject: docs: tags for commenting mappings without "-default" suffix (#28205) This actually won't cause "duplicate tag" errors if plugins have tags of the same name, because E154 is only given for duplicate tags in the same directory. Without those tags, trying to use :h for these mappings jumps to other places, because there are matches with higher score. --- runtime/doc/various.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 803ca95cdf..aa05d2bbb2 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -581,16 +581,16 @@ to look up the value of 'commentstring' corresponding to the cursor position. (This can be different from the buffer's 'commentstring' in case of |treesitter-language-injections|.) - *gc-default* + *gc* *gc-default* gc{motion} Comment or uncomment lines covered by {motion}. - *gcc-default* + *gcc* *gcc-default* gcc Comment or uncomment [count] lines starting at cursor. - *v_gc-default* + *v_gc* *v_gc-default* {Visual}gc Comment or uncomment the selected line(s). - *o_gc-default* + *o_gc* *o_gc-default* gc Text object for the largest contiguous block of non-blank commented lines around the cursor (e.g. `gcgc` uncomments a comment block; `dgc` deletes it). -- cgit From 0443f06b71c7a1563657765b35f7f3869300edc7 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 5 Apr 2024 18:07:36 +0200 Subject: docs: don't mention executable() can return -1 This cannot happen for neovim. --- runtime/doc/builtin.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 20cdb396e1..cafb5636df 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -1268,7 +1268,6 @@ executable({expr}) *executable()* The result is a Number: 1 exists 0 does not exist - -1 not implemented on this system |exepath()| can be used to get the full path of an executable. execute({command} [, {silent}]) *execute()* -- cgit From d32cbef59551a1808caea2ddaeac323fdc18d6b6 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 8 Apr 2024 06:11:31 +0800 Subject: vim-patch:9cd9e759ab1e (#28224) runtime(doc): Normalise builtin-function optional parameter formatting These should generally be formatted as func([{arg}]) and referenced as {arg} in the description. closes: vim/vim#14438 https://github.com/vim/vim/commit/9cd9e759ab1e6e6adb24a23648eed41e4d94d522 Co-authored-by: Doug Kearns --- runtime/doc/builtin.txt | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index cafb5636df..36e433d1ec 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -2196,16 +2196,16 @@ getchangelist([{buf}]) *getchangelist()* position refers to the position in the list. For other buffers, it is set to the length of the list. -getchar([expr]) *getchar()* +getchar([{expr}]) *getchar()* Get a single character from the user or input stream. - If [expr] is omitted, wait until a character is available. - If [expr] is 0, only get a character when one is available. + If {expr} is omitted, wait until a character is available. + If {expr} is 0, only get a character when one is available. Return zero otherwise. - If [expr] is 1, only check if a character is available, it is + If {expr} is 1, only check if a character is available, it is not consumed. Return zero if no character available. If you prefer always getting a string use |getcharstr()|. - Without [expr] and when [expr] is 0 a whole character or + Without {expr} and when {expr} is 0 a whole character or special key is returned. If it is a single character, the result is a Number. Use |nr2char()| to convert it to a String. Otherwise a String is returned with the encoded character. @@ -2215,11 +2215,11 @@ getchar([expr]) *getchar()* also a String when a modifier (shift, control, alt) was used that is not included in the character. - When [expr] is 0 and Esc is typed, there will be a short delay + When {expr} is 0 and Esc is typed, there will be a short delay while Vim waits to see if this is the start of an escape sequence. - When [expr] is 1 only the first byte is returned. For a + When {expr} is 1 only the first byte is returned. For a one-byte character it is the character itself as a number. Use nr2char() to convert it to a String. @@ -2311,13 +2311,13 @@ getcharsearch() *getcharsearch()* nnoremap , getcharsearch().forward ? ',' : ';' < Also see |setcharsearch()|. -getcharstr([expr]) *getcharstr()* +getcharstr([{expr}]) *getcharstr()* Get a single character from the user or input stream as a string. - If [expr] is omitted, wait until a character is available. - If [expr] is 0 or false, only get a character when one is + If {expr} is omitted, wait until a character is available. + If {expr} is 0 or false, only get a character when one is available. Return an empty string otherwise. - If [expr] is 1 or true, only check if a character is + If {expr} is 1 or true, only check if a character is available, it is not consumed. Return an empty string if no character is available. Otherwise this works like |getchar()|, except that a number @@ -4981,9 +4981,9 @@ mkdir({name} [, {flags} [, {prot}]]) *mkdir()* *E73 successful or FALSE if the directory creation failed or partly failed. -mode([expr]) *mode()* +mode([{expr}]) *mode()* Return a string that indicates the current mode. - If [expr] is supplied and it evaluates to a non-zero Number or + If {expr} is supplied and it evaluates to a non-zero Number or a non-empty String (|non-zero-arg|), then the full mode is returned, otherwise only the first letter is returned. Also see |state()|. -- cgit From 7035125b2b26aa68fcfb7cda39377ac79926a0f9 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 8 Apr 2024 11:03:20 +0200 Subject: test: improve test conventions Work on https://github.com/neovim/neovim/issues/27004. --- runtime/doc/dev_tools.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/dev_tools.txt b/runtime/doc/dev_tools.txt index 3ee48bec90..a89c1b35b6 100644 --- a/runtime/doc/dev_tools.txt +++ b/runtime/doc/dev_tools.txt @@ -88,7 +88,7 @@ Then, in another terminal: gdb build/bin/nvim target remote localhost:7777 < -- See also test/functional/helpers.lua https://github.com/neovim/neovim/blob/3098b18a2b63a841351f6d5e3697cb69db3035ef/test/functional/helpers.lua#L38-L44. +- See also test/functional/testutil.lua https://github.com/neovim/neovim/blob/3098b18a2b63a841351f6d5e3697cb69db3035ef/test/functional/testutil.lua#L38-L44. USING LLDB TO STEP THROUGH UNIT TESTS ~ -- cgit From 2528093bbea8862ede0feb6eb29bdc5451a6313b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 9 Apr 2024 07:20:49 +0800 Subject: vim-patch:9.1.0277: Cannot highlight the Command-line (#28244) Problem: Cannot highlight the Command-line Solution: Add the MsgArea highlighting group (Shougo Matsushita) closes: vim/vim#14327 https://github.com/vim/vim/commit/be2b03c6eecea3eae5d460e3c19ee43b73b29928 Cherry-pick Test_highlight_User() from patch 8.2.1077. Co-authored-by: Shougo Matsushita --- runtime/doc/syntax.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 5e95e00e45..4a81c9cee0 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -4877,7 +4877,7 @@ MatchParen Character under the cursor or just before it, if it *hl-ModeMsg* ModeMsg 'showmode' message (e.g., "-- INSERT --"). *hl-MsgArea* -MsgArea Area for messages and cmdline. +MsgArea Area for messages and command-line, see also 'cmdheight'. *hl-MsgSeparator* MsgSeparator Separator for scrolled messages |msgsep|. *hl-MoreMsg* -- cgit From 41521658b1dca302a4c7125753694b59a317c0f9 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 8 Apr 2024 22:42:54 +0200 Subject: vim-patch:9.1.0276: No pandoc syntax support Problem: No pandoc syntax support Solution: Add pandoc syntax and compiler plugins (Wu, Zhenyu, Konfekt) closes: vim/vim#14389 https://github.com/vim/vim/commit/7005b7ee7f282b24378c2a844366cb8616cad5d7 Co-authored-by: Wu, Zhenyu Co-authored-by: Konfekt --- runtime/doc/filetype.txt | 2 ++ runtime/doc/syntax.txt | 89 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index dc0dda0e85..6041354c92 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -155,6 +155,8 @@ variables can be used to overrule the filetype used for certain extensions: `*.inc` g:filetype_inc `*.lsl` g:filetype_lsl `*.m` g:filetype_m |ft-mathematica-syntax| + `*.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md` + g:filetype_md |ft-pandoc-syntax| `*.mod` g:filetype_mod `*.p` g:filetype_p |ft-pascal-syntax| `*.pl` g:filetype_pl diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 4a81c9cee0..fa34bee975 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1994,6 +1994,95 @@ by the camlp4 preprocessor. Setting the variable > prevents highlighting of "end" as error, which is useful when sources contain very long structures that Vim does not synchronize anymore. +PANDOC *ft-pandoc-syntax* + +By default, markdown files will be detected as filetype "markdown". +Alternatively, you may want them to be detected as filetype "pandoc" instead. +To do so, set the following: > + + :let g:markdown_md = 'pandoc' + +The pandoc syntax plugin uses |conceal| for pretty highlighting. Default is 1 > + + :let g:pandoc#syntax#conceal#use = 1 + +To specify elements that should not be concealed, set the following variable: > + + :let g:pandoc#syntax#conceal#blacklist = [] + +This is a list of the rules wich can be used here: + + - titleblock + - image + - block + - subscript + - superscript + - strikeout + - atx + - codeblock_start + - codeblock_delim + - footnote + - definition + - list + - newline + - dashes + - ellipses + - quotes + - inlinecode + - inlinemath + +You can customize the way concealing works. For example, if you prefer to mark +footnotes with the `*` symbol: > + + :let g:pandoc#syntax#conceal#cchar_overrides = {"footnote" : "*"} + +To conceal the urls in links, use: > + + :let g:pandoc#syntax#conceal#urls = 1 + +Prevent highlighting specific codeblock types so that they remain Normal. +Codeblock types include "definition" for codeblocks inside definition blocks +and "delimited" for delimited codeblocks. Default = [] > + + :let g:pandoc#syntax#codeblocks#ignore = ['definition'] + +Use embedded highlighting for delimited codeblocks where a language is +specified. Default = 1 > + + :let g:pandoc#syntax#codeblocks#embeds#use = 1 + +For specify what languages and using what syntax files to highlight embeds. This is a +list of language names. When the language pandoc and vim use don't match, you +can use the "PANDOC=VIM" syntax. For example: > + + :let g:pandoc#syntax#codeblocks#embeds#langs = ["ruby", "bash=sh"] + +To use italics and strong in emphases. Default = 1 > + + :let *g:pandoc#syntax#style#emphases = 1 + +"0" will add "block" to g:pandoc#syntax#conceal#blacklist, because otherwise +you couldn't tell where the styles are applied. + +To add underline subscript, superscript and strikeout text styles. Default = 1 > + + :let g:pandoc#syntax#style#underline_special = 1 + +Detect and highlight definition lists. Disabling this can improve performance. +Default = 1 (i.e., enabled by default) > + + :let g:pandoc#syntax#style#use_definition_lists = 1 + +The pandoc syntax script also comes with the following commands: > + + :PandocHighlight LANG + +Enables embedded highlighting for language LANG in codeblocks. Uses the +syntax for items in g:pandoc#syntax#codeblocks#embeds#langs. > + + :PandocUnhighlight LANG + +Disables embedded highlighting for language LANG in codeblocks. PAPP *papp.vim* *ft-papp-syntax* -- cgit From 4946489e2e3eeca5c831faf9fe86cbf1229701e2 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 9 Apr 2024 16:42:39 +0800 Subject: vim-patch:9.1.0283: Several small issues in doc and tests (#28249) Problem: Wrong doc style for pandoc syntax description, Test_diff_eob_halfpage() may fail depending on screen size, using braces in highlight.c when not necessary Solution: Fix pandoc documentation, make sure the window for the test has 7 lines, remove the braces. https://github.com/vim/vim/commit/a040019be68859f0667ae475de8d67bb755596ed Co-authored-by: Christian Brabandt --- runtime/doc/syntax.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index fa34bee975..2d7e21cd2f 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -2059,7 +2059,7 @@ can use the "PANDOC=VIM" syntax. For example: > To use italics and strong in emphases. Default = 1 > - :let *g:pandoc#syntax#style#emphases = 1 + :let g:pandoc#syntax#style#emphases = 1 "0" will add "block" to g:pandoc#syntax#conceal#blacklist, because otherwise you couldn't tell where the styles are applied. -- cgit From f49408454ddb48016d51b48bcd9d5dab538f5cc7 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 10 Apr 2024 07:08:49 +0800 Subject: vim-patch:9.1.0296: regexp: engines do not handle case-folding well (#28259) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Regex engines do not handle case-folding well Solution: Correctly calculate byte length of characters to skip When the regexp engine compares two utf-8 codepoints case insensitively it may match an adjacent character, because it assumes it can step over as many bytes as the pattern contains. This however is not necessarily true because of case-folding, a multi-byte UTF-8 character can be considered equal to some single-byte value. Let's consider the pattern 'ſ' and the string 's'. When comparing and ignoring case, the single character 's' matches, and since it matches Vim will try to step over the match (by the amount of bytes of the pattern), assuming that since it matches, the length of both strings is the same. However in that case, it should only step over the single byte value 's' so by 1 byte and try to start matching after it again. So for the backtracking engine we need to ensure: - we try to match the correct length for the pattern and the text - in case of a match, we step over it correctly The same thing can happen for the NFA engine, when skipping to the next character to test for a match. We are skipping over the regstart pointer, however we do not consider the case that because of case-folding we may need to adjust the number of bytes to skip over. So this needs to be adjusted in find_match_text() as well. A related issue turned out, when prog->match_text is actually empty. In that case we should try to find the next match and skip this condition. fixes: vim/vim#14294 closes: vim/vim#14433 https://github.com/vim/vim/commit/7a27c108e0509f3255ebdcb6558e896c223e4d23 Co-authored-by: Christian Brabandt --- runtime/doc/dev_vimpatch.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/doc') diff --git a/runtime/doc/dev_vimpatch.txt b/runtime/doc/dev_vimpatch.txt index 1f48324d46..5cc7a70ba2 100644 --- a/runtime/doc/dev_vimpatch.txt +++ b/runtime/doc/dev_vimpatch.txt @@ -204,6 +204,7 @@ information. mb_ptr2char utf_ptr2char mb_head_off utf_head_off mb_tail_off utf_cp_bounds + mb_strnicmp2 utf_strnicmp mb_lefthalve grid_lefthalve mb_fix_col grid_fix_col utf_off2cells grid_off2cells -- cgit From adb70a351d64129c4e12febf7cbe528ef66c8eb6 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 11 Apr 2024 07:39:29 +0800 Subject: vim-patch:c9ec20d94ea5 (#28267) runtime(doc): Update documentation - Add security e-mail for private bugreports - Remove mentioning of the voting feature closes: vim/vim#14483 https://github.com/vim/vim/commit/c9ec20d94ea5c1ea263e70503e82abcdd27d3463 Co-authored-by: RestorerZ Co-authored-by: Christian Brabandt --- runtime/doc/helphelp.txt | 2 +- runtime/doc/intro.txt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt index efcc6afae9..46b3ab507d 100644 --- a/runtime/doc/helphelp.txt +++ b/runtime/doc/helphelp.txt @@ -305,7 +305,7 @@ Hints for translators: using the "tag@en" notation. - Make a package with all the files and the tags file available for download. Users can drop it in one of the "doc" directories and start use it. - Report this to Bram, so that he can add a link on www.vim.org. + Report to the development team, so they can add a link on www.vim.org. - Use the |:helptags| command to generate the tags files. It will find all languages in the specified directory. diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index c9211291d0..4c757cc1f6 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -69,11 +69,11 @@ If Nvim crashes, try to get a backtrace. See |debug.txt|. Sponsor Vim/Nvim development *sponsor* *register* Fixing bugs and adding new features takes a lot of time and effort. To show -your appreciation for the work and motivate Bram and others to continue -working on Vim please send a donation. +your appreciation for the work and motivate developers to continue working on +Vim please send a donation. -Since Bram is back to a paid job the money will now be used to help children -in Uganda. See |uganda|. But at the same time donations increase Bram's +The money you donated will be mainly used to help children in Uganda. See +|uganda|. But at the same time donations increase the development team motivation to keep working on Vim! For the most recent information about sponsoring look on the Vim web site: -- cgit From d0afb2dc4eb8e70942441b3c9a551dcccd6806cd Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 11 Apr 2024 07:40:16 +0800 Subject: vim-patch:9.1.0297: Patch 9.1.0296 causes too many issues (#28263) Problem: Patch 9.1.0296 causes too many issues (Tony Mechelynck, chdiza, CI) Solution: Back out the change for now Revert "patch 9.1.0296: regexp: engines do not handle case-folding well" This reverts commit 7a27c108e0509f3255ebdcb6558e896c223e4d23 it causes issues with syntax highlighting and breaks the FreeBSD and MacOS CI. It needs more work. fixes: vim/vim#14487 https://github.com/vim/vim/commit/c97f4d61cde24030f2f7d2318e1b409a0ccc3e43 Co-authored-by: Christian Brabandt --- runtime/doc/dev_vimpatch.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/dev_vimpatch.txt b/runtime/doc/dev_vimpatch.txt index 5cc7a70ba2..1f48324d46 100644 --- a/runtime/doc/dev_vimpatch.txt +++ b/runtime/doc/dev_vimpatch.txt @@ -204,7 +204,6 @@ information. mb_ptr2char utf_ptr2char mb_head_off utf_head_off mb_tail_off utf_cp_bounds - mb_strnicmp2 utf_strnicmp mb_lefthalve grid_lefthalve mb_fix_col grid_fix_col utf_off2cells grid_off2cells -- cgit From 3b9a152396c3a4ef7778c5c127373f89beecc853 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 12 Apr 2024 05:39:30 +0800 Subject: vim-patch:3cb2b3776700 (#28283) runtime(doc): clarify behaviour or :argadd and :argedit related: vim/vim#14464 https://github.com/vim/vim/commit/3cb2b3776700988e0c9d4ea37d0b05e371e2bbfd Co-authored-by: Christian Brabandt --- runtime/doc/editing.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 1a4572e94a..2285fe4570 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -634,7 +634,10 @@ list of the current window. Add {name}s to the argument list and edit it. When {name} already exists in the argument list, this entry is edited. - This is like using |:argadd| and then |:edit|. + This is like using |:argadd| and then |:edit| (with + the small exception that |:edit| does not change the + argument list, so the argument list pointer isn't + changed). Spaces in filenames have to be escaped with "\". [count] is used like with |:argadd|. If the current file cannot be |abandon|ed {name}s will @@ -653,12 +656,12 @@ list of the current window. If the argument list is "a b c", and "b" is the current argument, then these commands result in: command new argument list ~ - :argadd x a b x c - :0argadd x x a b c - :1argadd x a x b c - :$argadd x a b c x + :argadd x a [b] x c + :0argadd x x a [b] c + :1argadd x a x [b] c + :$argadd x a [b] c x And after the last one: - :+2argadd y a b c x y + :+2argadd y a [b] c x y There is no check for duplicates, it is possible to add a file to the argument list twice. You can use |:argdedupe| to fix it afterwards: > -- cgit From fe42574230ab399b5de22cc2b92368a0bfe4e21a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 12 Apr 2024 16:56:22 +0800 Subject: vim-patch:83424105cb42 (#28298) runtime(doc): mention :argded for :argedit related: vim/vim#14464 https://github.com/vim/vim/commit/83424105cb4219fe4280aa86df5173096186bba2 Co-authored-by: Christian Brabandt --- runtime/doc/editing.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 2285fe4570..662d89895d 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -632,8 +632,8 @@ list of the current window. :[count]arge[dit][!] [++opt] [+cmd] {name} .. *:arge* *:argedit* Add {name}s to the argument list and edit it. - When {name} already exists in the argument list, this - entry is edited. + There is no check for duplicates, it is possible to + add a file to the argument list twice |:argded|. This is like using |:argadd| and then |:edit| (with the small exception that |:edit| does not change the argument list, so the argument list pointer isn't -- cgit From 66220d164a40791a5131d4660e6ffbee431070d5 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 8 Apr 2024 10:57:37 +0200 Subject: revert: "feat(health): fold successful healthchecks #22866" This reverts commit 4382d2ed564b80944345785d780cf1b19fb23ba8. The story for this feature was left in an incomplete state. It was never the intention to unilaterally fold all information, only the ones that did not contain relevant information. This feature does more harm than good in its incomplete state. --- runtime/doc/news.txt | 3 --- 1 file changed, 3 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index c219762c3f..066a076377 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -393,9 +393,6 @@ The following changes to existing APIs or features add new behavior. • |:lua| with a |[range]| executes that range in the current buffer as Lua code regardless of its extension. -• |:checkhealth| buffer now implements |folding|. The initial folding status is - defined by the 'foldenable' option. - • |:Man| now respects 'wrapmargin' • |gx| now uses |vim.ui.open()| and not netrw. To customize, you can redefine -- cgit From a92822835521574710a830a7de0e692bf7517fb8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 14 Apr 2024 07:35:08 +0800 Subject: vim-patch:ce06493aeb3d (#28321) runtime(vim): Update base-syntax, add legacy header folding Allow for syntax-based folding of Vim9 script legacy header regions. This is enabled with the "H" flag of the g:vimsyn_folding config variable. closes: vim/vim#14530 https://github.com/vim/vim/commit/ce06493aeb3d198d13de289ac39d1ed0f1604429 Co-authored-by: Doug Kearns --- runtime/doc/syntax.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 2d7e21cd2f..2589133cf4 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -3271,7 +3271,7 @@ The g:vimsyn_embed option allows users to select what, if any, types of embedded script highlighting they wish to have. > g:vimsyn_embed == 0 : disable (don't embed any scripts) - g:vimsyn_embed == 'lPr' : support embedded lua, python and ruby + g:vimsyn_embed == 'lpPr' : support embedded lua, perl, python and ruby < This option is disabled by default. *g:vimsyn_folding* @@ -3281,7 +3281,11 @@ Some folding is now supported with syntax/vim.vim: > g:vimsyn_folding == 0 or doesn't exist: no syntax-based folding g:vimsyn_folding =~ 'a' : augroups g:vimsyn_folding =~ 'f' : fold functions + g:vimsyn_folding =~ 'h' : fold heredocs + g:vimsyn_folding =~ 'l' : fold lua script + g:vimsyn_folding =~ 'p' : fold perl script g:vimsyn_folding =~ 'P' : fold python script + g:vimsyn_folding =~ 'r' : fold ruby script < *g:vimsyn_noerror* Not all error highlighting that syntax/vim.vim does may be correct; Vim script -- cgit From aa1d0ac095dcc08b6069d716222739e83cbe051f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 15 Apr 2024 03:43:33 +0800 Subject: fix(defaults): only repeat macro for each selected line if linewise (#28289) As mentioned in #28287, repeating a macro for each selected line doesn't really make sense in non-linewise Visual mode. Fix #28287 --- runtime/doc/news.txt | 4 ++-- runtime/doc/repeat.txt | 8 ++++---- runtime/doc/visual.txt | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 066a076377..15bdfb52f6 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -317,8 +317,8 @@ The following new APIs and features were added. • |nvim_input_mouse()| supports mouse buttons "x1" and "x2". -• |v_Q-default| and |v_@-default| repeat a register for each line of a visual - selection. +• |v_Q-default| and |v_@-default| repeat a register for each line of a linewise + visual selection. • |vim.diagnostic.count()| returns the number of diagnostics for a given buffer and/or namespace, by severity. This is a faster alternative to diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index ae827fa06f..2263b20d1a 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -149,8 +149,8 @@ q Stops recording. @@ Repeat the previous @{0-9a-z":*} [count] times. *v_@-default* -{Visual}@{0-9a-z".=*+} In Visual mode, execute the contents of the register -{Visual}@@ but for each selected line. +{Visual}@{0-9a-z".=*+} In linewise Visual mode, execute the contents of the +{Visual}@@ register for each selected line. See |visual-repeat|, |default-mappings|. *Q* @@ -158,8 +158,8 @@ Q Repeat the last recorded register [count] times. See |reg_recorded()|. *v_Q-default* -{Visual}Q In Visual mode, repeat the last recorded register for - each selected line. +{Visual}Q In linewise Visual mode, repeat the last recorded + register for each selected line. See |visual-repeat|, |default-mappings|. *:@* diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt index a20fb6d31e..6d3aaa62dd 100644 --- a/runtime/doc/visual.txt +++ b/runtime/doc/visual.txt @@ -366,15 +366,15 @@ one of the last commands to extend the highlighted text, the repeating will be applied up to the rightmost column of the longest line. Any count passed to the `.` command is not used. -Visual mode |default-mappings| "@" and "Q" can repeat commands in a register -for all selected lines. See |v_@-default| and |v_Q-default| for details. For -example, given the text: +Visual mode |default-mappings| "@" and "Q" repeat a register for all selected +lines if the selection is linewise. See |v_@-default| and |v_Q-default| for +details. For example, given the text: 123(hello)321 456(world)654 456(NOT THIS)654 -With register "x" containing the commands `yi(VP`, Visually selecting the +With register "x" containing the commands `yi(VP`, visually selecting the first two lines and typing `@x` produces: hello -- cgit From 7180ef690180cf92d1d49811820c46dd60e4d1c6 Mon Sep 17 00:00:00 2001 From: Sean Dewar <6256228+seandewar@users.noreply.github.com> Date: Mon, 15 Apr 2024 00:10:16 +0100 Subject: feat(api)!: nvim_open_win: noautocmd blocks all autocmds #28192 Problem: noautocmd is confusing; despite its name, it doesn't block all autocommands (instead it blocks only those related to setting the buffer), and is commonly used by plugins to open windows while producing minimal side-effects. Solution: be consistent and block all autocommands when noautocmd is set. This includes WinNew (again), plus autocommands from entering the window (if enter is set) like WinEnter, WinLeave, TabEnter, .etc. See the discussion at https://github.com/neovim/neovim/pull/14659#issuecomment-2040029517 for more information. Remove win_set_buf's noautocmd argument, as it's no longer needed. NOTE: pum_create_float_preview sets noautocmd for win_set_buf, but all its callers already use block_autocmds. Despite that, pum_create_float_preview doesn't actually properly handle autocommands (it has no checks for whether those from win_enter or nvim_create_buf free the window). For now, ensure autocommands are blocked within it for correctness (in case it's ever called outside of a block_autocmds context; the function seems to have been refactored in #26739 anyway). --- runtime/doc/api.txt | 5 ++--- runtime/doc/news.txt | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index bf56a09ac7..91b80601da 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -3271,9 +3271,8 @@ nvim_open_win({buffer}, {enter}, {config}) *nvim_open_win()* • footer_pos: Footer position. Must be set with `footer` option. Value can be one of "left", "center", or "right". Default is `"left"`. - • noautocmd: If true then autocommands triggered from - setting the `buffer` to display are blocked (e.g: - |BufEnter|, |BufLeave|, |BufWinEnter|). + • noautocmd: If true then all autocommands are blocked for + the duration of the call. • fixed: If true when anchor is NW or SW, the float window would be kept fixed even if the window would be truncated. • hide: If true the floating window will be hidden. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 15bdfb52f6..ae5f808a9c 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -137,6 +137,9 @@ The following changes may require adaptations in user config or plugins. • |: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* -- cgit From 43f8d7e3ef2db733f01f2d4c03214cd90c5a09be Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 15 Apr 2024 07:11:39 +0800 Subject: vim-patch:9.1.0329: String interpolation fails for Dict type (#28335) Problem: String interpolation fails for Dict type Solution: Support Dict data type properly, also support :put =Dict (without having to convert it to string() first) (Yegappan Lakshmanan) fixes: vim/vim#14529 closes: vim/vim#14541 https://github.com/vim/vim/commit/f01493c55062c01b1cdf9b1e946577f4d1bdddf3 Co-authored-by: Yegappan Lakshmanan --- runtime/doc/builtin.txt | 8 ++++---- runtime/doc/change.txt | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 36e433d1ec..94721f5024 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -7876,10 +7876,10 @@ string({expr}) *string()* for infinite and NaN floating-point values representations which use |str2float()|. Strings are also dumped literally, only single quote is escaped, which does not allow using YAML - for parsing back binary strings. |eval()| should always work for - strings and floats though and this is the only official - method, use |msgpackdump()| or |json_encode()| if you need to - share data with other application. + for parsing back binary strings. |eval()| should always work + for strings and floats though, and this is the only official + method. Use |msgpackdump()| or |json_encode()| if you need to + share data with other applications. strlen({string}) *strlen()* The result is a Number, which is the length of the String diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 703addf51a..6d3efb4167 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1291,8 +1291,8 @@ expression (like with the "/" command). The expression must evaluate to a String. A Number is always automatically converted to a String. For the "p" and ":put" command, if the result is a Float it's converted into a String. If the result is a List each element is -turned into a String and used as a line. A Dictionary or FuncRef results in -an error message (use string() to convert). +turned into a String and used as a line. A Dictionary is converted into a +String. A FuncRef results in an error message (use string() to convert). If the "= register is used for the "p" command, the String is split up at characters. If the String ends in a , it is regarded as a linewise -- cgit From 57adf8c6e01d9395eb52fe03571c535571efdc4b Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 15 Apr 2024 04:33:09 -0700 Subject: fix(vim.ui): open() may wait indefinitely #28325 Problem: vim.ui.open "locks up" Nvim if the spawned process does not terminate. #27986 Solution: - Change `vim.ui.open()`: - Do not call `wait()`. - Return a `SystemObj`. The caller can decide if it wants to `wait()`. - Change `gx` to `wait()` only a short time. - Allows `gx` to show a message if the command fails, without the risk of waiting forever. --- runtime/doc/lua.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index d967e2b313..c760e762ee 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -1812,6 +1812,7 @@ vim.system({cmd}, {opts}, {on_exit}) *vim.system()* Return: ~ (`vim.SystemObj`) Object with the fields: + • cmd (string[]) Command name and args • pid (integer) Process ID • wait (fun(timeout: integer|nil): SystemCompleted) Wait for the process to complete. Upon timeout the process is sent the KILL @@ -2568,16 +2569,21 @@ vim.ui.open({path}) *vim.ui.open()* Expands "~/" and environment variables in filesystem paths. Examples: >lua + -- Asynchronous. vim.ui.open("https://neovim.io/") vim.ui.open("~/path/to/file") - vim.ui.open("$VIMRUNTIME") + -- Synchronous (wait until the process exits). + local cmd, err = vim.ui.open("$VIMRUNTIME") + if cmd then + cmd:wait() + end < Parameters: ~ • {path} (`string`) Path or URL to open Return (multiple): ~ - (`vim.SystemCompleted?`) Command result, or nil if not found. + (`vim.SystemObj?`) Command object, or nil if not found. (`string?`) Error message on failure See also: ~ -- cgit From 26765e8461c1ba1e9a351632212cf89900221781 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 8 Apr 2024 00:41:41 +0200 Subject: feat(diagnostic): is_enabled, enable(…, enable:boolean) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: `vim.diagnostic.is_disabled` and `vim.diagnostic.disable` are unnecessary and inconsistent with the "toggle" pattern (established starting with `vim.lsp.inlay_hint`, see https://github.com/neovim/neovim/pull/25512#pullrequestreview-1676750276 As a reminder, the rationale is: - we always need `enable()` - we always end up needing `is_enabled()` - "toggle" can be achieved via `enable(not is_enabled())` - therefore, - `toggle()` and `disable()` are redundant - `is_disabled()` is a needless inconsistency Solution: - Introduce `vim.diagnostic.is_enabled`, and `vim.diagnostic.enable(…, enable:boolean)` - Note: Future improvement would be to add an `enable()` overload `enable(enable:boolean, opts: table)`. - Deprecate `vim.diagnostic.is_disabled`, `vim.diagnostic.disable` --- runtime/doc/deprecated.txt | 5 ++++- runtime/doc/develop.txt | 5 ++++- runtime/doc/diagnostic.txt | 38 ++++++++++++++++++-------------------- runtime/doc/news-0.9.txt | 2 +- runtime/doc/news.txt | 8 ++++++++ 5 files changed, 35 insertions(+), 23 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index 5ac4ad4ce2..1b57f34896 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -80,12 +80,15 @@ HIGHLIGHTS - *hl-VertSplit* Use |hl-WinSeparator| instead. LSP DIAGNOSTICS +- *vim.diagnostic.disable()* Use |vim.diagnostic.enable()| +- *vim.diagnostic.is_disabled()* Use |vim.diagnostic.is_enabled()| + For each of the functions below, use the corresponding function in |vim.diagnostic| instead (unless otherwise noted). For example, use |vim.diagnostic.get()| instead of |vim.lsp.diagnostic.get()|. - *vim.lsp.diagnostic.clear()* Use |vim.diagnostic.hide()| instead. -- *vim.lsp.diagnostic.disable()* +- *vim.lsp.diagnostic.disable()* Use |vim.diagnostic.enable()| instead. - *vim.lsp.diagnostic.display()* Use |vim.diagnostic.show()| instead. - *vim.lsp.diagnostic.enable()* - *vim.lsp.diagnostic.get()* diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 767f46ad1e..a7373c84b3 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -383,9 +383,12 @@ Use existing common {verb} names (actions) if possible: - try_{verb}: Best-effort operation, failure returns null or error obj Do NOT use these deprecated verbs: + - disable: Prefer `enable(enable: boolean)`. + - is_disabled: Prefer `is_enabled()`. - list: Redundant with "get" - - show: Redundant with "print", "echo" - notify: Redundant with "print", "echo" + - show: Redundant with "print", "echo" + - toggle: Prefer `enable(not is_enabled())`. Use consistent names for {noun} (nouns) in API functions: buffer is called "buf" everywhere, not "buffer" in some places and "buf" in others. diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index a9172119d0..1f3f1c80fe 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -616,23 +616,19 @@ count({bufnr}, {opts}) *vim.diagnostic.count()* (`table`) Table with actually present severity values as keys (see |diagnostic-severity|) and integer counts as values. -disable({bufnr}, {namespace}) *vim.diagnostic.disable()* - Disable diagnostics in the given buffer. +enable({bufnr}, {namespace}, {enable}) *vim.diagnostic.enable()* + Enables or disables diagnostics. - Parameters: ~ - • {bufnr} (`integer?`) Buffer number, or 0 for current buffer. When - omitted, disable diagnostics in all buffers. - • {namespace} (`integer?`) Only disable diagnostics for the given - namespace. - -enable({bufnr}, {namespace}) *vim.diagnostic.enable()* - Enable diagnostics in the given buffer. + To "toggle", pass the inverse of `is_enabled()`: >lua + vim.diagnostic.enable(0, not vim.diagnostic.is_enabled()) +< Parameters: ~ - • {bufnr} (`integer?`) Buffer number, or 0 for current buffer. When - omitted, enable diagnostics in all buffers. - • {namespace} (`integer?`) Only enable diagnostics for the given - namespace. + • {bufnr} (`integer?`) Buffer number, or 0 for current buffer, or + `nil` for all buffers. + • {namespace} (`integer?`) Only for the given namespace, or `nil` for + all. + • {enable} (`boolean?`) true/nil to enable, false to disable fromqflist({list}) *vim.diagnostic.fromqflist()* Convert a list of quickfix items to a list of diagnostics. @@ -733,7 +729,7 @@ hide({namespace}, {bufnr}) *vim.diagnostic.hide()* diagnostics, use |vim.diagnostic.reset()|. To hide diagnostics and prevent them from re-displaying, use - |vim.diagnostic.disable()|. + |vim.diagnostic.enable()|. Parameters: ~ • {namespace} (`integer?`) Diagnostic namespace. When omitted, hide @@ -741,14 +737,16 @@ hide({namespace}, {bufnr}) *vim.diagnostic.hide()* • {bufnr} (`integer?`) Buffer number, or 0 for current buffer. When omitted, hide diagnostics in all buffers. -is_disabled({bufnr}, {namespace}) *vim.diagnostic.is_disabled()* - Check whether diagnostics are disabled in a given buffer. +is_enabled({bufnr}, {namespace}) *vim.diagnostic.is_enabled()* + Check whether diagnostics are enabled. + + Note: ~ + • This API is pre-release (unstable). Parameters: ~ • {bufnr} (`integer?`) Buffer number, or 0 for current buffer. - • {namespace} (`integer?`) Diagnostic namespace. When omitted, checks - if all diagnostics are disabled in {bufnr}. Otherwise, - only checks if diagnostics from {namespace} are disabled. + • {namespace} (`integer?`) Diagnostic namespace, or `nil` for all + diagnostics in {bufnr}. Return: ~ (`boolean`) diff --git a/runtime/doc/news-0.9.txt b/runtime/doc/news-0.9.txt index 789bc9e0bc..f1f3ac6954 100644 --- a/runtime/doc/news-0.9.txt +++ b/runtime/doc/news-0.9.txt @@ -162,7 +162,7 @@ The following new APIs or features were added. • |vim.diagnostic| now supports LSP DiagnosticsTag. See: https://microsoft.github.io/language-server-protocol/specification/#diagnosticTag -• |vim.diagnostic.is_disabled()| checks if diagnostics are disabled in a given +• vim.diagnostic.is_disabled() checks if diagnostics are disabled in a given buffer or namespace. • Treesitter captures can now be transformed by directives. This will allow diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index ae5f808a9c..8609d84506 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -328,6 +328,8 @@ The following new APIs and features were added. |vim.diagnostic.get()| when only the number of diagnostics is needed, but not the diagnostics themselves. +• Introduced |vim.diagnostic.is_enabled()| + • |vim.deepcopy()| has a `noref` argument to avoid hashing table values. • Terminal buffers emit a |TermRequest| autocommand event when the child @@ -419,6 +421,8 @@ The following changes to existing APIs or features add new behavior. • |vim.diagnostic.get()| and |vim.diagnostic.count()| accept multiple namespaces rather than just a single namespace. +• |vim.diagnostic.enable()| accepts an `enabled` boolean parameter. + • 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()| API function already allowed you to define such ranges, but highlight regions @@ -520,6 +524,10 @@ release. - |nvim_win_get_option()| Use |nvim_get_option_value()| instead. - |nvim_win_set_option()| Use |nvim_set_option_value()| instead. +• vim.diagnostic functions: + - |vim.diagnostic.disable()| + - |vim.diagnostic.is_disabled()| + • vim.lsp functions: - |vim.lsp.util.get_progress_messages()| Use |vim.lsp.status()| instead. - |vim.lsp.get_active_clients()| Use |vim.lsp.get_clients()| instead. -- cgit From 5ed9916a28b9a09d2e5629f3e4e5b0e81403ded7 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 15 Apr 2024 18:35:59 +0200 Subject: feat(diagnostic): enable(…, opts) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: vim.diagnostic.enable() does not match the signature of vim.lsp.inlay_hint.enable() Solution: - Change the signature so that the first 2 args are (bufnr, enable). - Introduce a 3rd `opts` arg. - Currently it only supports `opts.ns_id`. --- runtime/doc/develop.txt | 2 ++ runtime/doc/diagnostic.txt | 20 ++++++++++++++------ runtime/doc/news.txt | 3 ++- 3 files changed, 18 insertions(+), 7 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index a7373c84b3..6c27e4775f 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -372,11 +372,13 @@ Use existing common {verb} names (actions) if possible: - create: Creates a new (non-trivial) thing (TODO: rename to "def"?) - del: Deletes a thing (or group of things) - detach: Dispose attached listener (TODO: rename to "un"?) + - enable: Enables/disables functionality. - eval: Evaluates an expression - exec: Executes code - fmt: Formats - get: Gets things (often by a query) - inspect: Presents a high-level, often interactive, view + - is_enabled: Checks if functionality is enabled. - open: Opens something (a buffer, window, …) - parse: Parses something into a structured form - set: Sets a thing (or group of things) diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index 1f3f1c80fe..1826cc4c08 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -367,6 +367,13 @@ Lua module: vim.diagnostic *diagnostic-api* • {user_data}? (`any`) arbitrary data plugins can add • {namespace}? (`integer`) +*vim.diagnostic.Filter* + Extends: |vim.diagnostic.Opts| + + + Fields: ~ + • {ns_id}? (`integer`) Namespace + *vim.diagnostic.GetOpts* A table with the following keys: @@ -616,7 +623,7 @@ count({bufnr}, {opts}) *vim.diagnostic.count()* (`table`) Table with actually present severity values as keys (see |diagnostic-severity|) and integer counts as values. -enable({bufnr}, {namespace}, {enable}) *vim.diagnostic.enable()* +enable({bufnr}, {enable}, {opts}) *vim.diagnostic.enable()* Enables or disables diagnostics. To "toggle", pass the inverse of `is_enabled()`: >lua @@ -624,11 +631,12 @@ enable({bufnr}, {namespace}, {enable}) *vim.diagnostic.enable()* < Parameters: ~ - • {bufnr} (`integer?`) Buffer number, or 0 for current buffer, or - `nil` for all buffers. - • {namespace} (`integer?`) Only for the given namespace, or `nil` for - all. - • {enable} (`boolean?`) true/nil to enable, false to disable + • {bufnr} (`integer?`) Buffer number, or 0 for current buffer, or + `nil` for all buffers. + • {enable} (`boolean?`) true/nil to enable, false to disable + • {opts} (`vim.diagnostic.Filter?`) Filter by these opts, or `nil` + for all. Only `ns_id` is supported, currently. See + |vim.diagnostic.Filter|. fromqflist({list}) *vim.diagnostic.fromqflist()* Convert a list of quickfix items to a list of diagnostics. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 8609d84506..d320db4e51 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -421,7 +421,8 @@ The following changes to existing APIs or features add new behavior. • |vim.diagnostic.get()| and |vim.diagnostic.count()| accept multiple namespaces rather than just a single namespace. -• |vim.diagnostic.enable()| accepts an `enabled` boolean parameter. +• |vim.diagnostic.enable()| gained new parameters, and the old signature is + deprecated. • 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()| -- cgit From b4ddee111679012194a1e3ba78299ac540c51c77 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 16 Apr 2024 08:13:21 +0800 Subject: vim-patch:fb8f31ea7d7f (#28356) runtime(doc): document pandoc compiler and enable configuring arguments closes: vim/vim#14550 https://github.com/vim/vim/commit/fb8f31ea7d7f3f42e9bdce7b4434fd93fba8876f Co-authored-by: Konfekt --- runtime/doc/quickfix.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 9037ecc0f9..b4c2b7c192 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1282,6 +1282,15 @@ g:compiler_gcc_ignore_unmatched_lines commands run from make are generating false positives. +PANDOC *quickfix-pandoc* *compiler-pandoc* + +The Pandoc compiler plugin expects that an output file type extension is +passed to make, say :make html or :make pdf. + +Additional arguments can be passed to pandoc: + +- either by appending them to make, say `:make html --self-contained` . +- or setting them in `b:pandoc_compiler_args` or `g:pandoc_compiler_args` PERL *quickfix-perl* *compiler-perl* -- cgit From fe4583127f0aaf631b05ad3dff7ebb0126314cf2 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 16 Apr 2024 07:31:43 -0700 Subject: fix: vim.validate() order is not deterministic #28377 Problem: The order of the validation performed by vim.validate() is unpredictable. - harder to write reliable tests. - confusing UX because validation result might return different errors randomly. Solution: Iterate the input using `vim.spairs()`. Future: Ideally, the caller could provide an "ordered dict". --- runtime/doc/lua.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index c760e762ee..2c0307a409 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2376,7 +2376,8 @@ vim.trim({s}) *vim.trim()* • https://www.lua.org/pil/20.2.html vim.validate({opt}) *vim.validate()* - Validates a parameter specification (types and values). + Validates a parameter specification (types and values). Specs are + evaluated in alphanumeric order, until the first failure. Usage example: >lua function user.new(name, age, hobbies) -- cgit From 20b38677c22b0ff19ea54396c7718b5a8f410ed4 Mon Sep 17 00:00:00 2001 From: Luna Saphie Mittelbach Date: Sun, 14 Apr 2024 12:54:10 +0200 Subject: feat(defaults): use ripgrep (rg) for 'grepprg' if available --- runtime/doc/news.txt | 1 + runtime/doc/options.txt | 15 +++++++++++++-- runtime/doc/vim_diff.txt | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index d320db4e51..966d50c382 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -375,6 +375,7 @@ The following changes to existing APIs or features add new behavior. correctly without it. (Use |gF| for filepaths suffixed with ":line:col"). • 'comments' includes "fb:•". • 'shortmess' includes the "C" flag. + • 'grepprg' defaults to using ripgrep if available. • Automatic linting of treesitter query files (see |ft-query-plugin|). Can be disabled via: >lua vim.g.query_lint_on = {} diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 54333ee85d..7b5e3a1c49 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -2851,9 +2851,10 @@ A jump table for the options with a short description can be found at |Q_op|. This is a scanf-like string that uses the same format as the 'errorformat' option: see |errorformat|. + If ripgrep ('grepprg') is available, this option defaults to `%f:%l:%c:%m`. + *'grepprg'* *'gp'* -'grepprg' 'gp' string (default "grep -n ", - Unix: "grep -n $* /dev/null") +'grepprg' 'gp' string (default see below) global or local to buffer |global-local| Program to use for the |:grep| command. This option may contain '%' and '#' characters, which are expanded like when used in a command- @@ -2870,6 +2871,16 @@ A jump table for the options with a short description can be found at |Q_op|. apply equally to 'grepprg'. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. + This option defaults to: + - `rg --vimgrep -uuu $* ...` if ripgrep is available (|:checkhealth|), + - `grep -n $* /dev/null` on Unix, + - `findstr /n $* nul` on Windows. + Ripgrep can perform additional filtering such as using .gitignore rules + and skipping hidden or binary files. This is disabled by default (see the -u option) + to more closely match the behaviour of standard grep. + You can make ripgrep match Vim's case handling using the + -i/--ignore-case and -S/--smart-case options. + An |OptionSet| autocmd can be used to set it up to match automatically. *'guicursor'* *'gcr'* *E545* *E546* *E548* *E549* 'guicursor' 'gcr' string (default "n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20") diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 82f3fe9b1b..d426f8151f 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -52,6 +52,7 @@ Defaults *nvim-defaults* - 'encoding' is UTF-8 (cf. 'fileencoding' for file-content encoding) - 'fillchars' defaults (in effect) to "vert:│,fold:·,foldsep:│" - 'formatoptions' defaults to "tcqj" +- 'grepprg' defaults to using ripgrep if available - 'hidden' is enabled - 'history' defaults to 10000 (the maximum) - 'hlsearch' is enabled -- cgit From 8e5c48b08dad54706500e353c58ffb91f2684dd3 Mon Sep 17 00:00:00 2001 From: Famiu Haque Date: Wed, 17 Apr 2024 01:13:44 +0600 Subject: feat(lua): vim.fs.normalize() resolves ".", ".." #28203 Problem: `vim.fs.normalize` does not resolve `.` and `..` components. This makes no sense as the entire point of normalization is to remove redundancy from the path. The path normalization functions in several other languages (Java, Python, C++, etc.) also resolve `.` and `..` components. Reference: - Python: https://docs.python.org/3/library/os.path.html#os.path.normpath - Java: https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html#normalize-- - C++: https://en.cppreference.com/w/cpp/filesystem/path/lexically_normal Solution: Resolve "." and ".." in `vim.fs.normalize`. Before: "~/foo/bar/../baz/./" => "~/foo/bar/../baz/." After: "~/foo/bar/../baz/./" => "~/foo/baz" --- runtime/doc/lua.txt | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 2c0307a409..fdc50082d3 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2964,26 +2964,40 @@ vim.fs.joinpath({...}) *vim.fs.joinpath()* vim.fs.normalize({path}, {opts}) *vim.fs.normalize()* Normalize a path to a standard format. A tilde (~) character at the beginning of the path is expanded to the user's home directory and - environment variables are also expanded. + environment variables are also expanded. "." and ".." components are also + resolved, except when the path is relative and trying to resolve it would + result in an absolute path. + • "." as the only part in a relative path: + • "." => "." + • "././" => "." + • ".." when it leads outside the current directory + • "foo/../../bar" => "../bar" + • "../../foo" => "../../foo" + • ".." in the root directory returns the root directory. + • "/../../" => "/" On Windows, backslash (\) characters are converted to forward slashes (/). Examples: >lua - vim.fs.normalize('C:\\\\Users\\\\jdoe') - -- On Windows: 'C:/Users/jdoe' - - vim.fs.normalize('~/src/neovim') - -- '/home/jdoe/src/neovim' - - vim.fs.normalize('$XDG_CONFIG_HOME/nvim/init.vim') - -- '/Users/jdoe/.config/nvim/init.vim' + [[C:\Users\jdoe]] => "C:/Users/jdoe" + "~/src/neovim" => "/home/jdoe/src/neovim" + "$XDG_CONFIG_HOME/nvim/init.vim" => "/Users/jdoe/.config/nvim/init.vim" + "~/src/nvim/api/../tui/./tui.c" => "/home/jdoe/src/nvim/tui/tui.c" + "./foo/bar" => "foo/bar" + "foo/../../../bar" => "../../bar" + "/home/jdoe/../../../bar" => "/bar" + "C:foo/../../baz" => "C:../baz" + "C:/foo/../../baz" => "C:/baz" + [[\\?\UNC\server\share\foo\..\..\..\bar]] => "//?/UNC/server/share/bar" < Parameters: ~ • {path} (`string`) Path to normalize • {opts} (`table?`) A table with the following fields: - • {expand_env} (`boolean`, default: `true`) Expand environment - variables. + • {expand_env}? (`boolean`, default: `true`) Expand + environment variables. + • {win}? (`boolean`, default: `true` in Windows, `false` + otherwise) Path is a Windows path. Return: ~ (`string`) Normalized path -- cgit From 97323d821be97deeb1a5797b4ca534156b9e9b0c Mon Sep 17 00:00:00 2001 From: Mathias Fußenegger Date: Thu, 18 Apr 2024 15:34:10 +0200 Subject: refactor(lsp): merge rpc.domain_socket_connect into rpc.connect (#28398) See discussion in https://github.com/neovim/neovim/pull/26850 --- runtime/doc/lsp.txt | 30 +++++++++--------------------- runtime/doc/news.txt | 2 +- 2 files changed, 10 insertions(+), 22 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 70b8878837..0ca5240da0 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -2229,32 +2229,20 @@ Lua module: vim.lsp.rpc *lsp-rpc* • {terminate} (`fun()`) -connect({host}, {port}) *vim.lsp.rpc.connect()* - Create a LSP RPC client factory that connects via TCP to the given host - and port. +connect({host_or_path}, {port}) *vim.lsp.rpc.connect()* + Create a LSP RPC client factory that connects to either: + • a named pipe (windows) + • a domain socket (unix) + • a host and port via TCP Return a function that can be passed to the `cmd` field for |vim.lsp.start_client()| or |vim.lsp.start()|. Parameters: ~ - • {host} (`string`) host to connect to - • {port} (`integer`) port to connect to - - Return: ~ - (`fun(dispatchers: vim.lsp.rpc.Dispatchers): vim.lsp.rpc.PublicClient`) - - *vim.lsp.rpc.domain_socket_connect()* -domain_socket_connect({pipe_path}) - Create a LSP RPC client factory that connects via named pipes (Windows) or - unix domain sockets (Unix) to the given pipe_path (file path on Unix and - name on Windows). - - Return a function that can be passed to the `cmd` field for - |vim.lsp.start_client()| or |vim.lsp.start()|. - - Parameters: ~ - • {pipe_path} (`string`) file path of the domain socket (Unix) or name - of the named pipe (Windows) to connect to + • {host_or_path} (`string`) host to connect to or path to a pipe/domain + socket + • {port} (`integer?`) TCP port to connect to. If absent the + first argument must be a pipe Return: ~ (`fun(dispatchers: vim.lsp.rpc.Dispatchers): vim.lsp.rpc.PublicClient`) diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 966d50c382..8d51d9d849 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -225,7 +225,7 @@ The following new APIs and features were added. • |vim.lsp.util.locations_to_items()| sets the `user_data` of each item to the original LSP `Location` or `LocationLink`. • Added support for connecting to servers using named pipes (Windows) or - unix domain sockets (Unix) via |vim.lsp.rpc.domain_socket_connect()|. + unix domain sockets (Unix) via |vim.lsp.rpc.connect()|. • Added support for `completionList.itemDefaults`, reducing overhead when computing completion items where properties often share the same value (e.g. `commitCharacters`). Note that this might affect plugins and -- cgit From f1dfe32bf5552197e0068298b0527526a4f918b1 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 18 Apr 2024 07:57:58 -0700 Subject: feat(lua): enable(enable:boolean, filter:table) #28374 Problem: We need to establish a pattern for `enable()`. Solution: - First `enable()` parameter is always `enable:boolean`. - Update `vim.diagnostic.enable()` - Update `vim.lsp.inlay_hint.enable()`. - It was not released yet, so no deprecation is needed. But to help HEAD users, it will show an informative error. - vim.deprecate(): - Improve message when the "removal version" is a *current or older* version. --- runtime/doc/develop.txt | 3 ++- runtime/doc/diagnostic.txt | 31 +++++++++++++------------------ runtime/doc/lsp.txt | 10 ++++++---- runtime/doc/news.txt | 5 +++++ 4 files changed, 26 insertions(+), 23 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 6c27e4775f..ba16943979 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -372,7 +372,8 @@ Use existing common {verb} names (actions) if possible: - create: Creates a new (non-trivial) thing (TODO: rename to "def"?) - del: Deletes a thing (or group of things) - detach: Dispose attached listener (TODO: rename to "un"?) - - enable: Enables/disables functionality. + - enable: Enables/disables functionality. Signature should be + `enable(enable?:boolean, filter?:table)`. - eval: Evaluates an expression - exec: Executes code - fmt: Formats diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index 1826cc4c08..437778574d 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -367,13 +367,6 @@ Lua module: vim.diagnostic *diagnostic-api* • {user_data}? (`any`) arbitrary data plugins can add • {namespace}? (`integer`) -*vim.diagnostic.Filter* - Extends: |vim.diagnostic.Opts| - - - Fields: ~ - • {ns_id}? (`integer`) Namespace - *vim.diagnostic.GetOpts* A table with the following keys: @@ -623,20 +616,20 @@ count({bufnr}, {opts}) *vim.diagnostic.count()* (`table`) Table with actually present severity values as keys (see |diagnostic-severity|) and integer counts as values. -enable({bufnr}, {enable}, {opts}) *vim.diagnostic.enable()* +enable({enable}, {filter}) *vim.diagnostic.enable()* Enables or disables diagnostics. To "toggle", pass the inverse of `is_enabled()`: >lua - vim.diagnostic.enable(0, not vim.diagnostic.is_enabled()) + vim.diagnostic.enable(not vim.diagnostic.is_enabled()) < Parameters: ~ - • {bufnr} (`integer?`) Buffer number, or 0 for current buffer, or - `nil` for all buffers. • {enable} (`boolean?`) true/nil to enable, false to disable - • {opts} (`vim.diagnostic.Filter?`) Filter by these opts, or `nil` - for all. Only `ns_id` is supported, currently. See - |vim.diagnostic.Filter|. + • {filter} (`table?`) Optional filters |kwargs|, or `nil` for all. + • {ns_id}? (`integer`) Diagnostic namespace, or `nil` for + all. + • {bufnr}? (`integer`) Buffer number, or 0 for current + buffer, or `nil` for all buffers. fromqflist({list}) *vim.diagnostic.fromqflist()* Convert a list of quickfix items to a list of diagnostics. @@ -745,16 +738,18 @@ hide({namespace}, {bufnr}) *vim.diagnostic.hide()* • {bufnr} (`integer?`) Buffer number, or 0 for current buffer. When omitted, hide diagnostics in all buffers. -is_enabled({bufnr}, {namespace}) *vim.diagnostic.is_enabled()* +is_enabled({filter}) *vim.diagnostic.is_enabled()* Check whether diagnostics are enabled. Note: ~ • This API is pre-release (unstable). Parameters: ~ - • {bufnr} (`integer?`) Buffer number, or 0 for current buffer. - • {namespace} (`integer?`) Diagnostic namespace, or `nil` for all - diagnostics in {bufnr}. + • {filter} (`table?`) Optional filters |kwargs|, or `nil` for all. + • {ns_id}? (`integer`) Diagnostic namespace, or `nil` for + all. + • {bufnr}? (`integer`) Buffer number, or 0 for current + buffer, or `nil` for all buffers. Return: ~ (`boolean`) diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 0ca5240da0..df85b7a2a9 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1588,19 +1588,21 @@ save({lenses}, {bufnr}, {client_id}) *vim.lsp.codelens.save()* ============================================================================== Lua module: vim.lsp.inlay_hint *lsp-inlay_hint* -enable({bufnr}, {enable}) *vim.lsp.inlay_hint.enable()* +enable({enable}, {filter}) *vim.lsp.inlay_hint.enable()* Enables or disables inlay hints for a buffer. To "toggle", pass the inverse of `is_enabled()`: >lua - vim.lsp.inlay_hint.enable(0, not vim.lsp.inlay_hint.is_enabled()) + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) < Note: ~ • This API is pre-release (unstable). Parameters: ~ - • {bufnr} (`integer?`) Buffer handle, or 0 or nil for current • {enable} (`boolean?`) true/nil to enable, false to disable + • {filter} (`table?`) Optional filters |kwargs|, or `nil` for all. + • {bufnr} (`integer?`) Buffer number, or 0/nil for current + buffer. get({filter}) *vim.lsp.inlay_hint.get()* Get the list of inlay hints, (optionally) restricted by buffer or range. @@ -1639,7 +1641,7 @@ is_enabled({bufnr}) *vim.lsp.inlay_hint.is_enabled()* • This API is pre-release (unstable). Parameters: ~ - • {bufnr} (`integer?`) Buffer handle, or 0 or nil for current + • {bufnr} (`integer?`) Buffer handle, or 0 for current Return: ~ (`boolean`) diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 8d51d9d849..e580d5a2b7 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -149,6 +149,10 @@ unreleased features on Nvim HEAD. • 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()`. + ============================================================================== NEW FEATURES *news-features* @@ -529,6 +533,7 @@ release. • vim.diagnostic functions: - |vim.diagnostic.disable()| - |vim.diagnostic.is_disabled()| + - Legacy signature: `vim.diagnostic.enable(buf:number, namespace:number)` • vim.lsp functions: - |vim.lsp.util.get_progress_messages()| Use |vim.lsp.status()| instead. -- cgit From c791aa8aaeb11e5cd24f8579ca6fbe0d59d0fc90 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Thu, 18 Apr 2024 15:06:24 +0200 Subject: docs: update supported platforms --- runtime/doc/support.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/support.txt b/runtime/doc/support.txt index 80a035068a..5b8b32fa16 100644 --- a/runtime/doc/support.txt +++ b/runtime/doc/support.txt @@ -13,12 +13,13 @@ Supported platforms *supported-platforms* `System` `Tier` `Versions` `Tested versions` Linux 1 >= 2.6.32, glibc >= 2.12 Ubuntu 22.04 -macOS (Intel) 1 >= 10.15 macOS 12 -Windows 64-bit 1 >= 8 (see note below) Windows Server 2022 +macOS (Intel) 1 >= 11 macOS 12 +macOS (M1) 2 >= 11 macOS 14 +Windows 64-bit 1 >= Windows 10 Version 1809 Windows Server 2022 FreeBSD 1 >= 10 FreeBSD 13 -macOS (M1) 2 >= 10.15 OpenBSD 2 >= 7 MinGW 2 MinGW-w64 +Windows 64-bit 3 < Windows 10 Version 1809 Note: Windows 10 "Version 1809" or later is required for |:terminal|. To check your Windows version, run the "winver" command and look for "Version xxxx" @@ -33,7 +34,7 @@ Support types ~ systems are maintained to the best of our ability, without being a top priority. -* Tier 3: Not tested and no guarantees, but may work. +* Tier 3: Not tested and no guarantees, and not all features may work. Adding support for a new platform ~ -- cgit From 3e6a9fb599f0a774a62cb1090d89202af68aba63 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 19 Apr 2024 14:49:33 +0800 Subject: vim-patch:36e667ab837c (#28407) runtime(java): Support "g:ftplugin_java_source_path" with archived files Also, document for "g:ftplugin_java_source_path" its current modification of the local value of the 'path' option. closes: vim/vim#14570 https://github.com/vim/vim/commit/36e667ab837cd27b8c0c9df5c2db8008b2e1b76c Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com> --- runtime/doc/filetype.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 6041354c92..b1eb841e90 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -590,6 +590,37 @@ The mapping can be disabled with: > let g:no_gprof_maps = 1 +JAVA *ft-java-plugin* + +Whenever the variable "g:ftplugin_java_source_path" is defined and its value +is a filename whose extension is either ".jar" or ".zip", e.g.: > + let g:ftplugin_java_source_path = '/path/to/src.jar' + let g:ftplugin_java_source_path = '/path/to/src.zip' +< +and the |zip| plugin has already been sourced, the |gf| command can be used to +open the archive and the |n| command can be used to look for the selected type +and the key can be used to load a listed file. + +Note that the effect of using the "gf" command WITHIN a buffer loaded with the +Zip plugin depends on the version of the Zip plugin. For the Zip plugin +versions that do not support Jar type archives, consider creating symbolic +links with the ".zip" extension for each Jar archive of interest and assigning +any such file to the variable from now on. + +Otherwise, for the defined variable "g:ftplugin_java_source_path", the local +value of the 'path' option will be further modified by prefixing the value of +the variable, e.g.: > + let g:ftplugin_java_source_path = $JDK_SRC_PATH + let &l:path = g:ftplugin_java_source_path . ',' . &l:path +< +and the "gf" command can be used on a fully-qualified type to look for a file +in the "path" and to try to load it. + +Remember to manually trigger the |FileType| event from a buffer with a Java +file loaded in it each time after assigning a new value to the variable: > + doautocmd FileType +< + MAIL *ft-mail-plugin* Options: -- cgit From 18da6964cc610795ba1b7010e75d4f12ce73322a Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 19 Apr 2024 06:22:41 -0700 Subject: refactor(vim.iter)!: remove vim.iter.map/filter/totable #26138 Problem: The use-case for the convenience functions vim.iter.map(), vim.iter.filter(), vim.iter.totable() is not clear. Solution: Drop them for now. We can revisit after 0.10 release. --- runtime/doc/lua.txt | 51 --------------------------------------------------- runtime/doc/news.txt | 2 ++ 2 files changed, 2 insertions(+), 51 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index fdc50082d3..dc1a4bb35d 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -3871,27 +3871,6 @@ Examples: >lua -- { "a", "b" } < -In addition to the |vim.iter()| function, the |vim.iter| module provides -convenience functions like |vim.iter.filter()| and |vim.iter.totable()|. - - -filter({f}, {src}) *vim.iter.filter()* - Filters a table or other |iterable|. >lua - -- Equivalent to: - vim.iter(src):filter(f):totable() -< - - Parameters: ~ - • {f} (`fun(...):boolean`) Filter function. Accepts the current - iterator or table values as arguments and returns true if those - values should be kept in the final table - • {src} (`table|function`) Table or iterator function to filter - - Return: ~ - (`table`) - - See also: ~ - • |Iter:filter()| Iter:all({pred}) *Iter:all()* Returns true if all items in the iterator match the given predicate. @@ -4319,36 +4298,6 @@ Iter:totable() *Iter:totable()* Return: ~ (`table`) -map({f}, {src}) *vim.iter.map()* - Maps a table or other |iterable|. >lua - -- Equivalent to: - vim.iter(src):map(f):totable() -< - - Parameters: ~ - • {f} (`fun(...): any?`) Map function. Accepts the current iterator - or table values as arguments and returns one or more new - values. Nil values are removed from the final table. - • {src} (`table|function`) Table or iterator function to filter - - Return: ~ - (`table`) - - See also: ~ - • |Iter:map()| - -totable({f}) *vim.iter.totable()* - Collects an |iterable| into a table. >lua - -- Equivalent to: - vim.iter(f):totable() -< - - Parameters: ~ - • {f} (`function`) Iterator function - - Return: ~ - (`table`) - ============================================================================== Lua module: vim.snippet *vim.snippet* diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index e580d5a2b7..29b728b013 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -153,6 +153,8 @@ unreleased features on Nvim HEAD. • Changed the signature of `vim.diagnostic.enable()`. +• Removed vim.iter.map(), vim.iter.filter(), vim.iter.totable(). + ============================================================================== NEW FEATURES *news-features* -- cgit From 0ea38c9a53dfcff17703ea22f701ed1cc5bbd7d3 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 20 Apr 2024 19:31:00 +0800 Subject: refactor: add xmemcpyz() and use it in place of some xstrlcpy() (#28422) Problem: Using xstrlcpy() when the exact length of the string to be copied is known is not ideal because it requires adding 1 to the length and an unnecessary strlen(). Solution: Add xmemcpyz() and use it in place of such xstrlcpy() calls. --- runtime/doc/dev_vimpatch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/dev_vimpatch.txt b/runtime/doc/dev_vimpatch.txt index 1f48324d46..d6e4ced054 100644 --- a/runtime/doc/dev_vimpatch.txt +++ b/runtime/doc/dev_vimpatch.txt @@ -185,7 +185,7 @@ information. mch_memmove memmove vim_memset copy_chars copy_spaces memset vim_strbyte strchr - vim_strncpy strncpy xstrlcpy + vim_strncpy strncpy xstrlcpy/xmemcpyz vim_strcat strncat xstrlcat VIM_ISWHITE ascii_iswhite IS_WHITE_OR_NUL ascii_iswhite_or_nul -- cgit From f190f758ac58d9cc955368e047b070e0a2261033 Mon Sep 17 00:00:00 2001 From: Yinzuo Jiang Date: Sat, 20 Apr 2024 21:40:01 +0800 Subject: feat(lsp): add vim.lsp.buf.subtypes(), vim.lsp.buf.supertypes() (#28388) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mathias Fußenegger Co-authored-by: Maria José Solano --- runtime/doc/lsp.txt | 13 +++++++++++++ runtime/doc/news.txt | 2 ++ 2 files changed, 15 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index df85b7a2a9..42ed31a186 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -182,6 +182,7 @@ won't run if your server doesn't support them. - textDocument/hover - textDocument/implementation* - textDocument/inlayHint +- textDocument/prepareTypeHierarchy - textDocument/publishDiagnostics - textDocument/rangeFormatting - textDocument/references @@ -190,6 +191,8 @@ won't run if your server doesn't support them. - textDocument/semanticTokens/full/delta - textDocument/signatureHelp - textDocument/typeDefinition* +- typeHierarchy/subtypes +- typeHierarchy/supertypes - window/logMessage - window/showMessage - window/showDocument @@ -1428,6 +1431,16 @@ signature_help() *vim.lsp.buf.signature_help()* Displays signature information about the symbol under the cursor in a floating window. +subtypes() *vim.lsp.buf.subtypes()* + Lists all the subtypes of the symbol under the cursor in the |quickfix| + window. If the symbol can resolve to multiple items, the user can pick one + using |vim.ui.select()|. + +supertypes() *vim.lsp.buf.supertypes()* + Lists all the supertypes of the symbol under the cursor in the |quickfix| + window. If the symbol can resolve to multiple items, the user can pick one + using |vim.ui.select()|. + type_definition({options}) *vim.lsp.buf.type_definition()* Jumps to the definition of the type of the symbol under the cursor. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 29b728b013..2c940887c0 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -215,6 +215,8 @@ The following new APIs and features were added. https://microsoft.github.io/language-server-protocol/specification/#textDocument_inlayHint • Implemented pull diagnostic textDocument/diagnostic: |vim.lsp.diagnostic.on_diagnostic()| https://microsoft.github.io/language-server-protocol/specification/#textDocument_diagnostic + • Implemented LSP type hierarchy: |vim.lsp.buf.supertypes()| and |vim.lsp.buf.subtypes()| + https://microsoft.github.io/language-server-protocol/specification/#textDocument_prepareTypeHierarchy • |vim.lsp.status()| consumes the last progress messages as a string. • LSP client now always saves and restores named buffer marks when applying text edits. -- cgit From b5a38530ba18b324c739e1d087bd78e4a0a6d4b3 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Fri, 15 Mar 2024 12:54:39 +0100 Subject: fix(ui): don't force 'cmdheight' to zero with ext_messages Remove remaining code that prevents non-zero 'cmdheight' with ext_messages. --- runtime/doc/ui.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt index 5f217c5537..969851f027 100644 --- a/runtime/doc/ui.txt +++ b/runtime/doc/ui.txt @@ -777,9 +777,10 @@ This UI extension delegates presentation of messages and dialogs. Messages that would otherwise render in the message/cmdline screen space, are emitted as UI events. -Nvim will not allocate screen space for the cmdline or messages, and -'cmdheight' will be forced zero. Cmdline state is emitted as |ui-cmdline| -events, which the UI must handle. +Nvim will not allocate screen space for the cmdline or messages. 'cmdheight' +will be set to zero, but can be changed and used for the replacing cmdline or +message window. Cmdline state is emitted as |ui-cmdline| events, which the UI +must handle. ["msg_show", kind, content, replace_last] ~ Display a message to the user. -- cgit From 5e6240ffc24e55ecf7721fd9dc3f33c6f178be8c Mon Sep 17 00:00:00 2001 From: Riley Bruins Date: Sat, 20 Apr 2024 10:36:17 -0700 Subject: feat(treesitter): handle quantified fold captures --- runtime/doc/news.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 2c940887c0..7da6fb4ff8 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -267,6 +267,8 @@ The following new APIs and features were added. • The `#set!` directive can set the "url" property of a node to have the node emit a hyperlink. Hyperlinks are UI specific: in the TUI, the OSC 8 control sequence is used. + • |vim.treesitter.foldexpr()| now recognizes folds captured using a + quantified query pattern. • |:Man| now supports `:hide` modifier to open page in the current window. -- cgit From d9d890562e43493c999f8a6ff2b848959686f5b6 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 21 Apr 2024 15:19:43 +0200 Subject: refactor(lua): rename tbl_islist => islist ref #24572 --- runtime/doc/deprecated.txt | 1 + runtime/doc/lua.txt | 36 ++++++++++++++++++------------------ runtime/doc/news.txt | 5 ++++- 3 files changed, 23 insertions(+), 19 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index 1b57f34896..976bc05a64 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -172,6 +172,7 @@ LUA - vim.register_keystroke_callback() Use |vim.on_key()| instead. - *vim.pretty_print()* Use |vim.print()| instead. - *vim.loop* Use |vim.uv| instead. +- *vim.tbl_islist()* Use |vim.islist()| instead. - *vim.tbl_add_reverse_lookup()* NORMAL COMMANDS diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index dc1a4bb35d..3561c77dd5 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2029,6 +2029,23 @@ vim.is_callable({f}) *vim.is_callable()* Return: ~ (`boolean`) `true` if `f` is callable, else `false` +vim.islist({t}) *vim.islist()* + Tests if `t` is a "list": a table indexed only by contiguous integers + starting from 1 (what |lua-length| calls a "regular array"). + + Empty table `{}` is a list, unless it was created by |vim.empty_dict()| or + returned as a dict-like |API| or Vimscript result, for example from + |rpcrequest()| or |vim.fn|. + + Parameters: ~ + • {t} (`table?`) + + Return: ~ + (`boolean`) `true` if list-like table, else `false`. + + See also: ~ + • |vim.tbl_isarray()| + vim.list_contains({t}, {value}) *vim.list_contains()* Checks if a list-like table (integer keys without gaps) contains `value`. @@ -2284,7 +2301,7 @@ vim.tbl_isarray({t}) *vim.tbl_isarray()* non-contiguous). If the indexes start from 1 and are contiguous then the array is also a - list. |vim.tbl_islist()| + list. |vim.islist()| Empty table `{}` is an array, unless it was created by |vim.empty_dict()| or returned as a dict-like |API| or Vimscript result, for example from @@ -2311,23 +2328,6 @@ vim.tbl_isempty({t}) *vim.tbl_isempty()* See also: ~ • https://github.com/premake/premake-core/blob/master/src/base/table.lua -vim.tbl_islist({t}) *vim.tbl_islist()* - Tests if `t` is a "list": a table indexed only by contiguous integers - starting from 1 (what |lua-length| calls a "regular array"). - - Empty table `{}` is a list, unless it was created by |vim.empty_dict()| or - returned as a dict-like |API| or Vimscript result, for example from - |rpcrequest()| or |vim.fn|. - - Parameters: ~ - • {t} (`table`) - - Return: ~ - (`boolean`) `true` if list-like table, else `false`. - - See also: ~ - • |vim.tbl_isarray()| - vim.tbl_keys({t}) *vim.tbl_keys()* Return a list of all keys used in a table. However, the order of the return table of keys is not guaranteed. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 7da6fb4ff8..ed7da4f9de 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -22,7 +22,7 @@ The following changes may require adaptations in user config or plugins. set guicursor+=n-v-c:blinkon500-blinkoff500 < -• |vim.tbl_islist()| now checks whether a table is actually list-like (i.e., +• |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.tbl_isarray()|. @@ -155,6 +155,8 @@ unreleased features on Nvim HEAD. • Removed vim.iter.map(), vim.iter.filter(), vim.iter.totable(). +• Renamed vim.tbl_islist() to vim.islist(). + ============================================================================== NEW FEATURES *news-features* @@ -563,5 +565,6 @@ release. • vim.shared functions: - |vim.tbl_add_reverse_lookup()| + - |vim.tbl_islist()| vim:tw=78:ts=8:sw=2:et:ft=help:norl: -- cgit From 5c8dfb0e379cd4ae8de418e7aa554dbc5ab7f236 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 21 Apr 2024 17:29:10 +0200 Subject: refactor(lua): rename tbl_isarray => isarray tbl_isarray was not released yet, so it will not go through a deprecation cycle. ref #24572 --- runtime/doc/deprecated.txt | 2 +- runtime/doc/lua.txt | 42 +++++++++++++++++++++--------------------- runtime/doc/news.txt | 6 +++--- 3 files changed, 25 insertions(+), 25 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index 976bc05a64..ac512ddd35 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -172,8 +172,8 @@ LUA - vim.register_keystroke_callback() Use |vim.on_key()| instead. - *vim.pretty_print()* Use |vim.print()| instead. - *vim.loop* Use |vim.uv| instead. -- *vim.tbl_islist()* Use |vim.islist()| instead. - *vim.tbl_add_reverse_lookup()* +- *vim.tbl_islist()* Use |vim.islist()| instead. NORMAL COMMANDS - *]f* *[f* Same as "gf". diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 3561c77dd5..de1e432790 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2029,6 +2029,26 @@ vim.is_callable({f}) *vim.is_callable()* Return: ~ (`boolean`) `true` if `f` is callable, else `false` +vim.isarray({t}) *vim.isarray()* + Tests if `t` is an "array": a table indexed only by integers (potentially + non-contiguous). + + If the indexes start from 1 and are contiguous then the array is also a + list. |vim.islist()| + + Empty table `{}` is an array, unless it was created by |vim.empty_dict()| + or returned as a dict-like |API| or Vimscript result, for example from + |rpcrequest()| or |vim.fn|. + + Parameters: ~ + • {t} (`table?`) + + Return: ~ + (`boolean`) `true` if array-like table, else `false`. + + See also: ~ + • https://github.com/openresty/luajit2#tableisarray + vim.islist({t}) *vim.islist()* Tests if `t` is a "list": a table indexed only by contiguous integers starting from 1 (what |lua-length| calls a "regular array"). @@ -2044,7 +2064,7 @@ vim.islist({t}) *vim.islist()* (`boolean`) `true` if list-like table, else `false`. See also: ~ - • |vim.tbl_isarray()| + • |vim.isarray()| vim.list_contains({t}, {value}) *vim.list_contains()* Checks if a list-like table (integer keys without gaps) contains `value`. @@ -2296,26 +2316,6 @@ vim.tbl_get({o}, {...}) *vim.tbl_get()* Return: ~ (`any`) Nested value indexed by key (if it exists), else nil -vim.tbl_isarray({t}) *vim.tbl_isarray()* - Tests if `t` is an "array": a table indexed only by integers (potentially - non-contiguous). - - If the indexes start from 1 and are contiguous then the array is also a - list. |vim.islist()| - - Empty table `{}` is an array, unless it was created by |vim.empty_dict()| - or returned as a dict-like |API| or Vimscript result, for example from - |rpcrequest()| or |vim.fn|. - - Parameters: ~ - • {t} (`table`) - - Return: ~ - (`boolean`) `true` if array-like table, else `false`. - - See also: ~ - • https://github.com/openresty/luajit2#tableisarray - vim.tbl_isempty({t}) *vim.tbl_isempty()* Checks if a table is empty. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index ed7da4f9de..025af14954 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -25,7 +25,7 @@ The following changes may require adaptations in user config or plugins. • |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.tbl_isarray()|. + use |vim.isarray()|. • "#" followed by a digit no longer stands for a function key at the start of the lhs of a mapping. @@ -155,7 +155,7 @@ unreleased features on Nvim HEAD. • Removed vim.iter.map(), vim.iter.filter(), vim.iter.totable(). -• Renamed vim.tbl_islist() to vim.islist(). +• Renamed vim.tbl_isarray() to vim.isarray(). ============================================================================== NEW FEATURES *news-features* @@ -563,7 +563,7 @@ release. populated. Background color detection is now performed in Lua by the Nvim core, not the TUI. -• vim.shared functions: +• Lua stdlib: - |vim.tbl_add_reverse_lookup()| - |vim.tbl_islist()| -- cgit From 7b8e582f1ce3ba604eb03418ee8366f74496ad3e Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 21 Apr 2024 16:06:29 +0200 Subject: vim-patch:d3ff129ce8c6 runtime(astro): Add filetype, syntax and indent plugin related: vim/vim#14558 closes: vim/vim#14561 ported from: https://github.com/wuelnerdotexe/vim-astro https://github.com/vim/vim/commit/d3ff129ce8c68770c47d72ab3f30a21c19530eee Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com> --- runtime/doc/syntax.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 2589133cf4..15251192bb 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -461,6 +461,21 @@ nasm_loose_syntax unofficial parser allowed syntax not as Error nasm_ctx_outside_macro contexts outside macro not as Error nasm_no_warn potentially risky syntax not as ToDo +ASTRO *astro.vim* *ft-astro-syntax* + +Configuration + +The following variables control certain syntax highlighting features. +You can add them to your .vimrc: > + let g:astro_typescript = "enable" +< +Enables TypeScript and TSX for ".astro" files. Default Value: "disable" > + let g:astro_stylus = "enable" +< +Enables Stylus for ".astro" files. Default Value: "disable" + +NOTE: You need to install an external plugin to support stylus in astro files. + ASPPERL and ASPVBS *ft-aspperl-syntax* *ft-aspvbs-syntax* @@ -5307,5 +5322,4 @@ literal text specify the size of that text (in bytes): many places. "<\@1<=span" Matches the same, but only tries one byte before "span". - vim:tw=78:sw=4:ts=8:noet:ft=help:norl: -- cgit From 9912a4c81b0856200f44a38e99d38eae44cef5c9 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 22 Apr 2024 00:58:48 +0200 Subject: refactor(lua): deprecate tbl_flatten Problem: Besides being redundant with vim.iter():flatten(), `tbl_flatten` has these problems: - Has `tbl_` prefix but only accepts lists. - Discards some results! Compare the following: - iter.flatten(): ``` vim.iter({1, { { a = 2 } }, { 3 } }):flatten():totable() ``` - tbl_flatten: ``` vim.tbl_flatten({1, { { a = 2 } }, { 3 } }) ``` Solution: Deprecate tbl_flatten. Note: iter:flatten() currently fails ("flatten() requires a list-like table") on this code from gen_lsp.lua: local anonym = vim.iter({ -- remove nil anonymous_num > 1 and '' or nil, '---@class ' .. anonymous_classname, }):flatten():totable() Should we enhance :flatten() to work for arrays? --- runtime/doc/lua.txt | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index de1e432790..eaf61ff3fe 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2285,20 +2285,6 @@ vim.tbl_filter({func}, {t}) *vim.tbl_filter()* Return: ~ (`any[]`) Table of filtered values -vim.tbl_flatten({t}) *vim.tbl_flatten()* - Creates a copy of a list-like table such that any nested tables are - "unrolled" and appended to the result. - - Parameters: ~ - • {t} (`table`) List-like table - - Return: ~ - (`table`) Flattened copy of the given list-like table - - See also: ~ - • From - https://github.com/premake/premake-core/blob/master/src/base/table.lua - vim.tbl_get({o}, {...}) *vim.tbl_get()* Index into a table (first argument) via string keys passed as subsequent arguments. Return `nil` if the key does not exist. -- cgit From 013afc6863b0bed401e1d9e70cb861ee347b158f Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 22 Apr 2024 04:27:57 -0700 Subject: refactor(lua): deprecate tbl_flatten #28457 forgot some changes in 9912a4c81b0856200f44a38e99d38eae44cef5c9 --- runtime/doc/deprecated.txt | 1 + runtime/doc/news.txt | 1 + 2 files changed, 2 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index ac512ddd35..834366f8ec 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -173,6 +173,7 @@ LUA - *vim.pretty_print()* Use |vim.print()| instead. - *vim.loop* Use |vim.uv| instead. - *vim.tbl_add_reverse_lookup()* +- *vim.tbl_flatten()* Use |Iter:flatten()| instead. - *vim.tbl_islist()* Use |vim.islist()| instead. NORMAL COMMANDS diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 025af14954..1247e56fb5 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -565,6 +565,7 @@ release. • Lua stdlib: - |vim.tbl_add_reverse_lookup()| + - |vim.tbl_flatten()| - |vim.tbl_islist()| vim:tw=78:ts=8:sw=2:et:ft=help:norl: -- cgit From fb5e2db4c72251ac8f59a7b80fc6d6b40dbec1d8 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 22 Apr 2024 04:28:16 -0700 Subject: refactor(api): deprecate nvim_call_atomic #28433 TODO: FUNC_API_REMOTE_ONLY APIs such as `nvim_ui_*` cannot (yet) be used in `nvim_exec_lua`. We can change FUNC_API_REMOTE_ONLY to allow Vimscript/Lua to pass an explicit `channel_id`. #28437 --- runtime/doc/api.txt | 27 --------------------------- runtime/doc/deprecated.txt | 1 + runtime/doc/news.txt | 1 + 3 files changed, 2 insertions(+), 27 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 91b80601da..cc5f228920 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -655,33 +655,6 @@ nvim__stats() *nvim__stats()* Return: ~ Map of various internal stats. -nvim_call_atomic({calls}) *nvim_call_atomic()* - Calls many API methods atomically. - - This has two main usages: - 1. To perform several requests from an async context atomically, i.e. - without interleaving redraws, RPC requests from other clients, or user - interactions (however API methods may trigger autocommands or event - processing which have such side effects, e.g. |:sleep| may wake - timers). - 2. To minimize RPC overhead (roundtrips) of a sequence of many requests. - - Attributes: ~ - |RPC| only - - Parameters: ~ - • {calls} an array of calls, where each call is described by an array - with two elements: the request name, and an array of - arguments. - - Return: ~ - Array of two elements. The first is an array of return values. The - second is NIL if all calls succeeded. If a call resulted in an error, - it is a three-element array with the zero-based index of the call - which resulted in an error, the error type and the error message. If - an error occurred, the values from all preceding calls will still be - returned. - nvim_chan_send({chan}, {data}) *nvim_chan_send()* Send data to channel `id`. For a job, it writes it to the stdin of the process. For the stdio channel |channel-stdio|, it writes to Nvim's diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index 834366f8ec..602b033ecc 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -16,6 +16,7 @@ API - *nvim_buf_clear_highlight()* Use |nvim_buf_clear_namespace()| instead. - *nvim_buf_set_virtual_text()* Use |nvim_buf_set_extmark()| instead. - *nvim_command_output()* Use |nvim_exec2()| instead. +- *nvim_call_atomic()* Use |nvim_exec_lua()| instead. - *nvim_execute_lua()* Use |nvim_exec_lua()| instead. - *nvim_get_hl_by_name()* Use |nvim_get_hl()| instead. - *nvim_get_hl_by_id()* Use |nvim_get_hl()| instead. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 1247e56fb5..39a99a61d1 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -533,6 +533,7 @@ release. • |API| functions: - |nvim_buf_get_option()| Use |nvim_get_option_value()| instead. - |nvim_buf_set_option()| Use |nvim_set_option_value()| instead. + - nvim_call_atomic() Use |nvim_exec_lua()| instead. - |nvim_get_option()| Use |nvim_get_option_value()| instead. - |nvim_set_option()| Use |nvim_set_option_value()| instead. - |nvim_win_get_option()| Use |nvim_get_option_value()| instead. -- cgit From 7508f1e607712cacc282faa6f742f9475741d90d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 23 Apr 2024 08:20:36 +0800 Subject: vim-patch:f7a38650eaf6 (#28465) runtime(doc): update documentation closes: vim/vim#14616 https://github.com/vim/vim/commit/f7a38650eaf6dd4612fc31f85b6f0d4c6e06567f Co-authored-by: RestorerZ --- runtime/doc/syntax.txt | 5 +++-- runtime/doc/uganda.txt | 7 +++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 15251192bb..73d1629d6e 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -2212,8 +2212,8 @@ perl_string_as_statement, it will be highlighted as in the second line. The syncing has 3 options. The first two switch off some triggering of synchronization and should only be needed in case it fails to work properly. If while scrolling all of a sudden the whole screen changes color completely -then you should try and switch off one of those. Let me know if you can -figure out the line that causes the mistake. +then you should try and switch off one of those. Let the developer know if +you can figure out the line that causes the mistake. One triggers on "^\s*sub\s*" and the other on "^[$@%]" more or less. > @@ -5322,4 +5322,5 @@ literal text specify the size of that text (in bytes): many places. "<\@1<=span" Matches the same, but only tries one byte before "span". + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/uganda.txt b/runtime/doc/uganda.txt index 42e275c230..0b281dc3a0 100644 --- a/runtime/doc/uganda.txt +++ b/runtime/doc/uganda.txt @@ -199,7 +199,7 @@ visited about once a year to check the progress (at our own cost). I have visited the centre myself many times, starting in 1993. The visit reports are on the ICCF web site. -If you have any further questions, send me e-mail: . +If you have any further questions, send e-mail: . The address of the centre is: Kibaale Children's Centre @@ -219,9 +219,8 @@ Canada: Contact Kuwasha in Surrey, Canada. They take care of the Canadian sponsors for the children in Kibaale. Kuwasha forwards 100% of the money to the project in Uganda. You can send them a one time donation directly. - Please send me a note so that I know what has been donated - because of Vim. Look on their site for information about - sponsorship: https://www.kuwasha.net/ + Look on their site for information about sponsorship: + https://www.kuwasha.net/ If you make a donation to Kuwasha you will receive a tax receipt which can be submitted with your tax return. -- cgit From a4fc3bb0e68c8b078377fd9826e4cca3b4b3fdbf Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 23 Apr 2024 19:13:58 +0800 Subject: fix(diagnostic): vim.diagnostic.get(…,{lnum=…}) on multi-line diagnostic #28273 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: vim.diagnostic.get(…,{lnum=…}) does not match multi-line diagnostics. Solution: add end_lnum support. --- runtime/doc/diagnostic.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index 437778574d..b7d5cb0b2c 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -373,7 +373,8 @@ Lua module: vim.diagnostic *diagnostic-api* Fields: ~ • {namespace}? (`integer[]|integer`) Limit diagnostics to one or more namespaces. - • {lnum}? (`integer`) Limit diagnostics to the given line number. + • {lnum}? (`integer`) Limit diagnostics to those spanning the + specified line number. • {severity}? (`vim.diagnostic.SeverityFilter`) See |diagnostic-severity|. -- cgit From 052498ed42780a76daea589d063cd8947a894673 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sat, 20 Apr 2024 17:44:13 +0200 Subject: test: improve test conventions Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004. --- runtime/doc/dev_tools.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/dev_tools.txt b/runtime/doc/dev_tools.txt index a89c1b35b6..b9e1e68dbb 100644 --- a/runtime/doc/dev_tools.txt +++ b/runtime/doc/dev_tools.txt @@ -87,9 +87,8 @@ Then, in another terminal: >bash gdb build/bin/nvim target remote localhost:7777 -< -- See also test/functional/testutil.lua https://github.com/neovim/neovim/blob/3098b18a2b63a841351f6d5e3697cb69db3035ef/test/functional/testutil.lua#L38-L44. +-- See `nvim_argv` in https://github.com/neovim/neovim/blob/master/test/functional/testnvim.lua. USING LLDB TO STEP THROUGH UNIT TESTS ~ -- cgit From c81b7849a0f677164c01cf84ecfb25c1f47acf21 Mon Sep 17 00:00:00 2001 From: Mathias Fußenegger Date: Tue, 23 Apr 2024 19:05:01 +0200 Subject: refactor(lsp): merge subtypes and supertypes into typehierarchy (#28467) Both methods had pretty much the same documentation and shared the implementation. --- runtime/doc/lsp.txt | 18 ++++++++---------- runtime/doc/news.txt | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 42ed31a186..9385d92416 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1431,22 +1431,20 @@ signature_help() *vim.lsp.buf.signature_help()* Displays signature information about the symbol under the cursor in a floating window. -subtypes() *vim.lsp.buf.subtypes()* - Lists all the subtypes of the symbol under the cursor in the |quickfix| - window. If the symbol can resolve to multiple items, the user can pick one - using |vim.ui.select()|. - -supertypes() *vim.lsp.buf.supertypes()* - Lists all the supertypes of the symbol under the cursor in the |quickfix| - window. If the symbol can resolve to multiple items, the user can pick one - using |vim.ui.select()|. - type_definition({options}) *vim.lsp.buf.type_definition()* Jumps to the definition of the type of the symbol under the cursor. Parameters: ~ • {options} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|. +typehierarchy({kind}) *vim.lsp.buf.typehierarchy()* + Lists all the subtypes or supertypes of the symbol under the cursor in the + |quickfix| window. If the symbol can resolve to multiple items, the user + can pick one using |vim.ui.select()|. + + Parameters: ~ + • {kind} (`"subtypes"|"supertypes"`) + workspace_symbol({query}, {options}) *vim.lsp.buf.workspace_symbol()* Lists all symbols in the current workspace in the quickfix window. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 39a99a61d1..7d189d7df0 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -217,7 +217,7 @@ The following new APIs and features were added. https://microsoft.github.io/language-server-protocol/specification/#textDocument_inlayHint • Implemented pull diagnostic textDocument/diagnostic: |vim.lsp.diagnostic.on_diagnostic()| https://microsoft.github.io/language-server-protocol/specification/#textDocument_diagnostic - • Implemented LSP type hierarchy: |vim.lsp.buf.supertypes()| and |vim.lsp.buf.subtypes()| + • Implemented LSP type hierarchy: |vim.lsp.buf.typehierarchy()| https://microsoft.github.io/language-server-protocol/specification/#textDocument_prepareTypeHierarchy • |vim.lsp.status()| consumes the last progress messages as a string. • LSP client now always saves and restores named buffer marks when applying -- cgit From 16513b30337523dc64707309ee7fe3dd2247266d Mon Sep 17 00:00:00 2001 From: Will Hopkins Date: Wed, 24 Apr 2024 18:14:05 -0700 Subject: feat(api): allow floats to be opened in non-current tabpage (#28480) \ --- runtime/doc/news.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 7d189d7df0..5e2a48701e 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -478,7 +478,8 @@ The following changes to existing APIs or features add new behavior. |:vertical|, |:horizontal| and |:botright|. • |nvim_open_win()| and |nvim_win_set_config()| now support opening normal (split) - windows, and moving floating windows into split windows. + windows, moving floating windows into split windows, and opening windows in + non-current tabpages. • 'errorfile' (|-q|) accepts `-` as an alias for stdin. -- cgit From 38b9c322c97b63f53caef7a651211fc9312d055e Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Wed, 24 Apr 2024 21:43:46 -0500 Subject: feat(fs): add vim.fs.root (#28477) vim.fs.root() is a function for finding a project root relative to a buffer using one or more "root markers". This is useful for LSP and could be useful for other "projects" designs, as well as for any plugins which work with a "projects" concept. --- runtime/doc/lsp.txt | 6 +++--- runtime/doc/lua.txt | 36 +++++++++++++++++++++++++++++------- runtime/doc/news.txt | 3 +++ 3 files changed, 35 insertions(+), 10 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 9385d92416..d1fd84669a 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -34,7 +34,7 @@ Follow these steps to get LSP features: vim.lsp.start({ name = 'my-server-name', cmd = {'name-of-language-server-executable'}, - root_dir = vim.fs.dirname(vim.fs.find({'setup.py', 'pyproject.toml'}, { upward = true })[1]), + root_dir = vim.fs.root(0, {'setup.py', 'pyproject.toml'}), }) < 3. Check that the server attached to the buffer: > @@ -836,7 +836,7 @@ start({config}, {opts}) *vim.lsp.start()* vim.lsp.start({ name = 'my-server-name', cmd = {'name-of-language-server-executable'}, - root_dir = vim.fs.dirname(vim.fs.find({'pyproject.toml', 'setup.py'}, { upward = true })[1]), + root_dir = vim.fs.root(0, {'pyproject.toml', 'setup.py'}), }) < @@ -848,7 +848,7 @@ start({config}, {opts}) *vim.lsp.start()* |vim.lsp.start_client()|. • `root_dir` path to the project root. By default this is used to decide if an existing client should be re-used. The example above uses - |vim.fs.find()| and |vim.fs.dirname()| to detect the root by traversing + |vim.fs.root()| and |vim.fs.dirname()| to detect the root by traversing the file system upwards starting from the current directory until either a `pyproject.toml` or `setup.py` file is found. • `workspace_folders` list of `{ uri:string, name: string }` tables diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index eaf61ff3fe..92c49bca40 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2891,13 +2891,6 @@ vim.fs.find({names}, {opts}) *vim.fs.find()* narrow the search to find only that type. Examples: >lua - -- location of Cargo.toml from the current buffer's path - local cargo = vim.fs.find('Cargo.toml', { - upward = true, - stop = vim.uv.os_homedir(), - path = vim.fs.dirname(vim.api.nvim_buf_get_name(0)), - }) - -- list all test directories under the runtime directory local test_dirs = vim.fs.find( {'test', 'tst', 'testdir'}, @@ -3013,6 +3006,35 @@ vim.fs.parents({start}) *vim.fs.parents()* (`nil`) (`string?`) +vim.fs.root({source}, {marker}) *vim.fs.root()* + Find the first parent directory containing a specific "marker", relative + to a buffer's directory. + + Example: >lua + -- Find the root of a Python project, starting from file 'main.py' + vim.fs.root(vim.fs.joinpath(vim.env.PWD, 'main.py'), {'pyproject.toml', 'setup.py' }) + + -- Find the root of a git repository + vim.fs.root(0, '.git') + + -- Find the parent directory containing any file with a .csproj extension + vim.fs.root(0, function(name, path) + return name:match('%.csproj$') ~= nil + end) +< + + Parameters: ~ + • {source} (`integer|string`) Buffer number (0 for current buffer) or + file path to begin the search from. + • {marker} (`string|string[]|fun(name: string, path: string): boolean`) + A marker, or list of markers, to search for. If a function, + the function is called for each evaluated item and should + return true if {name} and {path} are a match. + + Return: ~ + (`string?`) Directory path containing one of the given markers, or nil + if no directory was found. + ============================================================================== Lua module: vim.glob *vim.glob* diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 5e2a48701e..c05e060920 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -365,6 +365,9 @@ The following new APIs and features were added. • Added built-in |commenting| support. +• |vim.fs.root()| finds project root directories from a list of "root + markers". + ============================================================================== CHANGED FEATURES *news-changed* -- cgit From e0d92b9cc20b58179599f53dfa74ca821935a539 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 25 Apr 2024 04:15:58 -0700 Subject: fix(vim.ui)!: change open() to return pcall-like values #28502 Problem: `vim.ui.open` unnecessarily invents a different success/failure convention. Its return type was changed in 57adf8c6e01d, so we might as well change it to have a more conventional form. Solution: Change the signature to use the `pcall` convention of `status, result`. --- runtime/doc/lua.txt | 8 ++++---- runtime/doc/news.txt | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 92c49bca40..2909f1130f 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2560,8 +2560,8 @@ vim.ui.open({path}) *vim.ui.open()* vim.ui.open("https://neovim.io/") vim.ui.open("~/path/to/file") -- Synchronous (wait until the process exits). - local cmd, err = vim.ui.open("$VIMRUNTIME") - if cmd then + local ok, cmd = vim.ui.open("$VIMRUNTIME") + if ok then cmd:wait() end < @@ -2570,8 +2570,8 @@ vim.ui.open({path}) *vim.ui.open()* • {path} (`string`) Path or URL to open Return (multiple): ~ - (`vim.SystemObj?`) Command object, or nil if not found. - (`string?`) Error message on failure + (`boolean`) false if command not found, else true. + (`vim.SystemObj|string`) Command object, or error message on failure See also: ~ • |vim.system()| diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index c05e060920..537542ee46 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -157,6 +157,8 @@ unreleased features on Nvim HEAD. • Renamed vim.tbl_isarray() to vim.isarray(). +• Changed |vim.ui.open()| return-signature to match pcall() convention. + ============================================================================== NEW FEATURES *news-features* -- cgit From b13e63db1dbc1dbc7e23690653df1b7317660a2b Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Thu, 25 Apr 2024 08:07:44 -0500 Subject: feat(diagnostic): goto functions jump to highest severity (#28490) When the "severity" option is nil, vim.diagnostic.goto_next() and vim.diagnostic.goto_prev() jump to the next diagnostic with the highest severity. --- runtime/doc/diagnostic.txt | 5 +++-- runtime/doc/news.txt | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index b7d5cb0b2c..32c9959f5a 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -389,8 +389,9 @@ Lua module: vim.diagnostic *diagnostic-api* |nvim_win_get_cursor()|. • {wrap}? (`boolean`, default: `true`) Whether to loop around file or not. Similar to 'wrapscan'. - • {severity} (`vim.diagnostic.Severity`) See - |diagnostic-severity|. + • {severity}? (`vim.diagnostic.Severity`) See + |diagnostic-severity|. If `nil`, go to the + diagnostic with the highest severity. • {float}? (`boolean|vim.diagnostic.Opts.Float`, default: `true`) If `true`, call |vim.diagnostic.open_float()| after moving. If a diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 537542ee46..44d5ea39bf 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -387,6 +387,11 @@ The following changes to existing APIs or features add new behavior. • |vim.diagnostic.config()| now accepts a function for the virtual_text.prefix option, which allows for rendering e.g., diagnostic severities differently. +• |vim.diagnostic.goto_next()| and |vim.diagnostic.goto_prev()| jump to the + diagnostic with the highest severity when the "severity" option is + unspecified. To use the old behavior, use: >lua + vim.diagnostic.goto_next({ severity = { min = vim.diagnostic.severity.HINT } }) + • Defaults: • On Windows 'isfname' does not include ":". Drive letters are handled correctly without it. (Use |gF| for filepaths suffixed with ":line:col"). -- cgit From 37d8e504593646c81542f8c66f0d608e0a59f036 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Fri, 26 Apr 2024 08:15:44 -0500 Subject: fix(lsp): add "silent" option to vim.lsp.start (#28478) vim.notify cannot be suppressed and it is not always necessary to display a visible warning to the user if the RPC process fails to start. For instance, a user may have the same LSP configuration across systems, some of which may not have all of the LSP server executables installed. In that case, the user receives a notification every time a file is opened that they cannot suppress. Instead of using vim.notify in vim.lsp.rpc, propagate a normal error up through the call stack and use vim.notify in vim.lsp.start() only if the "silent" option is not set. This also updates lsp.start_client() to return an error message as its second return value if an error occurred, rather than calling vim.notify directly. Callers of lsp.start_client() will need to update call sites appropriately if they wish to report errors to the user (or even better, switch to vim.lsp.start). --- runtime/doc/lsp.txt | 11 +++++++---- runtime/doc/news.txt | 2 ++ 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index d1fd84669a..a0d0b75407 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -869,12 +869,14 @@ start({config}, {opts}) *vim.lsp.start()* |vim.lsp.ClientConfig|. • {opts} (`table?`) Optional keyword arguments • {reuse_client} - (`fun(client: vim.lsp.Client, config: table): boolean`) + (`fun(client: vim.lsp.Client, config: vim.lsp.ClientConfig): boolean`) Predicate used to decide if a client should be re-used. Used on all running clients. The default implementation re-uses a client if name and root_dir matches. • {bufnr} (`integer`) Buffer handle to attach to if starting or re-using a client (0 for current). + • {silent} (`boolean`) Suppress error reporting if the LSP + server fails to start (default false). Return: ~ (`integer?`) client_id @@ -886,10 +888,11 @@ start_client({config}) *vim.lsp.start_client()* • {config} (`vim.lsp.ClientConfig`) Configuration for the server. See |vim.lsp.ClientConfig|. - Return: ~ + Return (multiple): ~ (`integer?`) client_id |vim.lsp.get_client_by_id()| Note: client may not be fully initialized. Use `on_init` to do any actions once the client has been initialized. + (`string?`) Error message, if any status() *vim.lsp.status()* Consumes the latest progress messages from all clients and formats them as @@ -1073,7 +1076,7 @@ Lua module: vim.lsp.client *lsp-client* *vim.lsp.ClientConfig* Fields: ~ - • {cmd} (`string[]|fun(dispatchers: vim.lsp.rpc.Dispatchers): vim.lsp.rpc.PublicClient?`) + • {cmd} (`string[]|fun(dispatchers: vim.lsp.rpc.Dispatchers): vim.lsp.rpc.PublicClient`) command string[] that launches the language server (treated as in |jobstart()|, must be absolute or on `$PATH`, shell constructs like @@ -2340,7 +2343,7 @@ start({cmd}, {dispatchers}, {extra_spawn_params}) *vim.lsp.rpc.start()* See |vim.system()| Return: ~ - (`vim.lsp.rpc.PublicClient?`) Client RPC object, with these methods: + (`vim.lsp.rpc.PublicClient`) Client RPC object, with these methods: • `notify()` |vim.lsp.rpc.notify()| • `request()` |vim.lsp.rpc.request()| • `is_closing()` returns a boolean indicating if the RPC is closing. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 44d5ea39bf..b2e20e5405 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -243,6 +243,8 @@ The following new APIs and features were added. (e.g. `commitCharacters`). Note that this might affect plugins and language servers that don't support the feature, and in such cases the respective capability can be unset. + • |vim.lsp.start()| accepts a "silent" option for suppressing messages + if an LSP server failed to start. • Treesitter • Bundled parsers and queries (highlight, folds) for Markdown, Python, and -- cgit From b8273c9a339626078d49e706d882878090b07d42 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Fri, 26 Apr 2024 14:07:47 +0100 Subject: fix: lua annotations --- runtime/doc/lua.txt | 86 ++++++++++++++++++++++++---------------------- runtime/doc/treesitter.txt | 3 +- 2 files changed, 45 insertions(+), 44 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 2909f1130f..1411ac7436 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -678,44 +678,47 @@ vim.diff({a}, {b}, {opts}) *vim.diff()* Parameters: ~ • {a} (`string`) First string to compare • {b} (`string`) Second string to compare - • {opts} (`table`) Optional parameters: - • `on_hunk` (callback): Invoked for each hunk in the diff. - Return a negative number to cancel the callback for any - remaining hunks. Args: - • `start_a` (integer): Start line of hunk in {a}. - • `count_a` (integer): Hunk size in {a}. - • `start_b` (integer): Start line of hunk in {b}. - • `count_b` (integer): Hunk size in {b}. - • `result_type` (string): Form of the returned diff: - • "unified": (default) String in unified format. - • "indices": Array of hunk locations. Note: This option is + • {opts} (`table`) Optional parameters: + • {on_hunk} + (`fun(start_a: integer, count_a: integer, start_b: integer, count_b: integer): integer`) + Invoked for each hunk in the diff. Return a negative number + to cancel the callback for any remaining hunks. Arguments: + • `start_a` (`integer`): Start line of hunk in {a}. + • `count_a` (`integer`): Hunk size in {a}. + • `start_b` (`integer`): Start line of hunk in {b}. + • `count_b` (`integer`): Hunk size in {b}. + • {result_type} (`'unified'|'indices'`, default: `'unified'`) + Form of the returned diff: + • `unified`: String in unified format. + • `indices`: Array of hunk locations. Note: This option is ignored if `on_hunk` is used. - • `linematch` (boolean|integer): Run linematch on the + • {linematch} (`boolean|integer`) Run linematch on the resulting hunks from xdiff. When integer, only hunks upto this size in lines are run through linematch. Requires `result_type = indices`, ignored otherwise. - • `algorithm` (string): Diff algorithm to use. Values: - • "myers" the default algorithm - • "minimal" spend extra time to generate the smallest + • {algorithm} (`'myers'|'minimal'|'patience'|'histogram'`, + default: `'myers'`) Diff algorithm to use. Values: + • `myers`: the default algorithm + • `minimal`: spend extra time to generate the smallest possible diff - • "patience" patience diff algorithm - • "histogram" histogram diff algorithm - • `ctxlen` (integer): Context length - • `interhunkctxlen` (integer): Inter hunk context length - • `ignore_whitespace` (boolean): Ignore whitespace - • `ignore_whitespace_change` (boolean): Ignore whitespace + • `patience`: patience diff algorithm + • `histogram`: histogram diff algorithm + • {ctxlen} (`integer`) Context length + • {interhunkctxlen} (`integer`) Inter hunk context length + • {ignore_whitespace} (`boolean`) Ignore whitespace + • {ignore_whitespace_change} (`boolean`) Ignore whitespace change - • `ignore_whitespace_change_at_eol` (boolean) Ignore + • {ignore_whitespace_change_at_eol} (`boolean`) Ignore whitespace change at end-of-line. - • `ignore_cr_at_eol` (boolean) Ignore carriage return at + • {ignore_cr_at_eol} (`boolean`) Ignore carriage return at end-of-line - • `ignore_blank_lines` (boolean) Ignore blank lines - • `indent_heuristic` (boolean): Use the indent heuristic for + • {ignore_blank_lines} (`boolean`) Ignore blank lines + • {indent_heuristic} (`boolean`) Use the indent heuristic for the internal diff library. Return: ~ - (`string|table?`) See {opts.result_type}. `nil` if {opts.on_hunk} is - given. + (`string|integer[]`) See {opts.result_type}. `nil` if {opts.on_hunk} + is given. ============================================================================== @@ -829,8 +832,8 @@ vim.spell.check({str}) *vim.spell.check()* • {str} (`string`) Return: ~ - (`{[1]: string, [2]: string, [3]: string}[]`) List of tuples with - three items: + (`{[1]: string, [2]: 'bad'|'rare'|'local'|'caps', [3]: integer}[]`) + List of tuples with three items: • The badly spelled word. • The type of the spelling error: "bad" spelling mistake "rare" rare word "local" word only valid in another region "caps" word should @@ -911,7 +914,7 @@ vim.empty_dict() *vim.empty_dict()* Return: ~ (`table`) -vim.iconv({str}, {from}, {to}, {opts}) *vim.iconv()* +vim.iconv({str}, {from}, {to}) *vim.iconv()* The result is a String, which is the text {str} converted from encoding {from} to encoding {to}. When the conversion fails `nil` is returned. When some characters could not be converted they are replaced with "?". The @@ -920,9 +923,8 @@ vim.iconv({str}, {from}, {to}, {opts}) *vim.iconv()* Parameters: ~ • {str} (`string`) Text to convert - • {from} (`number`) Encoding of {str} - • {to} (`number`) Target encoding - • {opts} (`table?`) + • {from} (`string`) Encoding of {str} + • {to} (`string`) Target encoding Return: ~ (`string?`) Converted string if conversion succeeds, `nil` otherwise. @@ -962,7 +964,7 @@ vim.schedule({fn}) *vim.schedule()* |textlock| or other temporary restrictions. Parameters: ~ - • {fn} (`function`) + • {fn} (`fun()`) vim.str_byteindex({str}, {index}, {use_utf16}) *vim.str_byteindex()* Convert UTF-32 or UTF-16 {index} to byte index. If {use_utf16} is not @@ -974,8 +976,8 @@ vim.str_byteindex({str}, {index}, {use_utf16}) *vim.str_byteindex()* Parameters: ~ • {str} (`string`) - • {index} (`number`) - • {use_utf16} (`any?`) + • {index} (`integer`) + • {use_utf16} (`boolean?`) vim.str_utf_end({str}, {index}) *vim.str_utf_end()* Gets the distance (in bytes) from the last byte of the codepoint @@ -993,10 +995,10 @@ vim.str_utf_end({str}, {index}) *vim.str_utf_end()* Parameters: ~ • {str} (`string`) - • {index} (`number`) + • {index} (`integer`) Return: ~ - (`number`) + (`integer`) vim.str_utf_pos({str}) *vim.str_utf_pos()* Gets a list of the starting byte positions of each UTF-8 codepoint in the @@ -1008,7 +1010,7 @@ vim.str_utf_pos({str}) *vim.str_utf_pos()* • {str} (`string`) Return: ~ - (`table`) + (`integer[]`) vim.str_utf_start({str}, {index}) *vim.str_utf_start()* Gets the distance (in bytes) from the starting byte of the codepoint @@ -1029,10 +1031,10 @@ vim.str_utf_start({str}, {index}) *vim.str_utf_start()* Parameters: ~ • {str} (`string`) - • {index} (`number`) + • {index} (`integer`) Return: ~ - (`number`) + (`integer`) vim.str_utfindex({str}, {index}) *vim.str_utfindex()* Convert byte index to UTF-32 and UTF-16 indices. If {index} is not @@ -1045,7 +1047,7 @@ vim.str_utfindex({str}, {index}) *vim.str_utfindex()* Parameters: ~ • {str} (`string`) - • {index} (`number?`) + • {index} (`integer?`) Return (multiple): ~ (`integer`) UTF-32 index diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 2356a0c235..67cbeda2a8 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -731,8 +731,7 @@ get_captures_at_pos({bufnr}, {row}, {col}) • {col} (`integer`) Position column Return: ~ - (`table[]`) List of captures - `{ capture = "name", metadata = { ... } }` + (`{capture: string, lang: string, metadata: table}[]`) get_node({opts}) *vim.treesitter.get_node()* Returns the smallest named node at the given position -- cgit From 9b028bd64f4260a3a5576a3632f95a44bd658615 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 26 Apr 2024 08:43:29 -0700 Subject: refactor(vim.iter)!: rename xxback() => rxx() #28503 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: vim.iter has both `rfind()` and various `*back()` methods, which work in "reverse" or "backwards" order. It's inconsistent to have both kinds of names, and "back" is fairly uncommon (rust) compared to python (rfind, rstrip, rsplit, …). Solution: - Remove `nthback()` and let `nth()` take a negative index. - Because `rnth()` looks pretty obscure, and because it's intuitive for a function named `nth()` to take negative indexes. - Rename `xxback()` methods to `rxx()`. - This informally groups the "list-iterator" functions under a common `r` prefix, which helps discoverability. - Rename `peekback()` to `pop()`, in duality with the existing `peek`. --- runtime/doc/lua.txt | 102 ++++++++++++++++++++++++--------------------------- runtime/doc/news.txt | 8 ++++ 2 files changed, 56 insertions(+), 54 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 1411ac7436..51dcf99dd2 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -4053,6 +4053,9 @@ Iter:last() *Iter:last()* Return: ~ (`any`) + See also: ~ + • Iter.rpeek + Iter:map({f}) *Iter:map()* Maps the items of an iterator pipeline to the values returned by `f`. @@ -4094,53 +4097,28 @@ Iter:next() *Iter:next()* Return: ~ (`any`) -Iter:nextback() *Iter:nextback()* - "Pops" a value from a |list-iterator| (gets the last value and decrements - the tail). - - Example: >lua - local it = vim.iter({1, 2, 3, 4}) - it:nextback() - -- 4 - it:nextback() - -- 3 -< - - Return: ~ - (`any`) - Iter:nth({n}) *Iter:nth()* Gets the nth value of an iterator (and advances to it). - Example: >lua + If `n` is negative, offsets from the end of a |list-iterator|. + Example: >lua local it = vim.iter({ 3, 6, 9, 12 }) it:nth(2) -- 6 it:nth(2) -- 12 -< - - Parameters: ~ - • {n} (`number`) The index of the value to return. - - Return: ~ - (`any`) - -Iter:nthback({n}) *Iter:nthback()* - Gets the nth value from the end of a |list-iterator| (and advances to it). - Example: >lua - - local it = vim.iter({ 3, 6, 9, 12 }) - it:nthback(2) + local it2 = vim.iter({ 3, 6, 9, 12 }) + it2:nth(-2) -- 9 - it:nthback(2) + it2:nth(-2) -- 3 < Parameters: ~ - • {n} (`number`) The index of the value to return. + • {n} (`number`) Index of the value to return. May be negative if the + source is a |list-iterator|. Return: ~ (`any`) @@ -4162,19 +4140,16 @@ Iter:peek() *Iter:peek()* Return: ~ (`any`) -Iter:peekback() *Iter:peekback()* - Gets the last value of a |list-iterator| without consuming it. - - See also |Iter:last()|. +Iter:pop() *Iter:pop()* + "Pops" a value from a |list-iterator| (gets the last value and decrements + the tail). Example: >lua local it = vim.iter({1, 2, 3, 4}) - it:peekback() - -- 4 - it:peekback() - -- 4 - it:nextback() + it:pop() -- 4 + it:pop() + -- 3 < Return: ~ @@ -4194,8 +4169,8 @@ Iter:rev() *Iter:rev()* (`Iter`) Iter:rfind({f}) *Iter:rfind()* - Gets the first value in a |list-iterator| that satisfies a predicate, - starting from the end. + Gets the first value satisfying a predicate, from the end of a + |list-iterator|. Advances the iterator. Returns nil and drains the iterator if no value is found. @@ -4218,14 +4193,34 @@ Iter:rfind({f}) *Iter:rfind()* See also: ~ • Iter.find -Iter:skip({n}) *Iter:skip()* - Skips `n` values of an iterator pipeline. +Iter:rpeek() *Iter:rpeek()* + Gets the last value of a |list-iterator| without consuming it. Example: >lua + local it = vim.iter({1, 2, 3, 4}) + it:rpeek() + -- 4 + it:rpeek() + -- 4 + it:pop() + -- 4 +< - local it = vim.iter({ 3, 6, 9, 12 }):skip(2) + Return: ~ + (`any`) + + See also: ~ + • Iter.last + +Iter:rskip({n}) *Iter:rskip()* + Discards `n` values from the end of a |list-iterator| pipeline. + + Example: >lua + local it = vim.iter({ 1, 2, 3, 4, 5 }):rskip(2) it:next() - -- 9 + -- 1 + it:pop() + -- 3 < Parameters: ~ @@ -4234,15 +4229,14 @@ Iter:skip({n}) *Iter:skip()* Return: ~ (`Iter`) -Iter:skipback({n}) *Iter:skipback()* - Skips `n` values backwards from the end of a |list-iterator| pipeline. +Iter:skip({n}) *Iter:skip()* + Skips `n` values of an iterator pipeline. Example: >lua - local it = vim.iter({ 1, 2, 3, 4, 5 }):skipback(2) + + local it = vim.iter({ 3, 6, 9, 12 }):skip(2) it:next() - -- 1 - it:nextback() - -- 3 + -- 9 < Parameters: ~ @@ -4254,7 +4248,7 @@ Iter:skipback({n}) *Iter:skipback()* Iter:slice({first}, {last}) *Iter:slice()* Sets the start and end of a |list-iterator| pipeline. - Equivalent to `:skip(first - 1):skipback(len - last + 1)`. + Equivalent to `:skip(first - 1):rskip(len - last + 1)`. Parameters: ~ • {first} (`number`) diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index b2e20e5405..5881d90358 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -159,6 +159,14 @@ unreleased features on Nvim HEAD. • Changed |vim.ui.open()| return-signature to match pcall() 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. + ============================================================================== NEW FEATURES *news-features* -- cgit From 688860741589b4583129e426f4df0523f9213275 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Fri, 26 Apr 2024 11:12:49 -0500 Subject: feat(lsp): add more LSP defaults (#28500) - crn for rename - crr for code actions - gr for references - (in Insert mode) for signature help --- runtime/doc/change.txt | 4 ++++ runtime/doc/lsp.txt | 42 ++++++++++++++++++------------------------ runtime/doc/news.txt | 11 ++++++++--- runtime/doc/vim_diff.txt | 4 ++++ 4 files changed, 34 insertions(+), 27 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 6d3efb4167..0f362c0cd4 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -281,6 +281,10 @@ gr{char} Replace the virtual characters under the cursor with that have a special meaning in Insert mode, such as most CTRL-keys, cannot be used. + *gr-default* + Mapped to |vim.lsp.buf.references()| by default. + |default-mappings| + *digraph-arg* The argument for Normal mode commands like |r| and |t| is a single character. When 'cpo' doesn't contain the 'D' flag, this character can also be entered diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index a0d0b75407..b3f60ed41f 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -61,47 +61,41 @@ options are not restored when the LSP client is stopped or detached. - |K| is mapped to |vim.lsp.buf.hover()| unless |'keywordprg'| is customized or a custom keymap for `K` exists. + *crr* *v_crr* *crn* *i_CTRL-S* +Some keymaps are created unconditionally when Nvim starts: +- "crn" is mapped in Normal mode to |vim.lsp.buf.rename()| +- "crr" is mapped in Normal and Visual mode to |vim.lsp.buf.code_action()| +- "gr" is mapped in Normal mode to |vim.lsp.buf.references()| |gr-default| +- CTRL-S is mapped in Insert mode to |vim.lsp.buf.signature_help()| + +If not wanted, these keymaps can be removed at any time using +|vim.keymap.del()| or |:unmap|. + *lsp-defaults-disable* To override the above defaults, set or unset the options on |LspAttach|: >lua + vim.api.nvim_create_autocmd('LspAttach', { callback = function(ev) vim.bo[ev.buf].formatexpr = nil vim.bo[ev.buf].omnifunc = nil - vim.keymap.del("n", "K", { buffer = ev.buf }) + vim.keymap.del('n', 'K', { buffer = ev.buf }) end, }) -To use other LSP features like hover, rename, etc. you can set other keymaps -on |LspAttach|. Example: >lua - vim.api.nvim_create_autocmd('LspAttach', { - callback = function(args) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = args.buf }) - end, - }) - -The most common functions are: - -- |vim.lsp.buf.hover()| -- |vim.lsp.buf.format()| -- |vim.lsp.buf.references()| -- |vim.lsp.buf.implementation()| -- |vim.lsp.buf.code_action()| +To use other LSP features, set keymaps on |LspAttach|. Not all language +servers provide the same capabilities. To ensure you only set keymaps if the +language server supports a feature, guard keymaps behind capability checks. +Example: >lua - -Not all language servers provide the same capabilities. To ensure you only set -keymaps if the language server supports a feature, you can guard the keymap -calls behind capability checks: ->lua vim.api.nvim_create_autocmd('LspAttach', { callback = function(args) local client = vim.lsp.get_client_by_id(args.data.client_id) - if client.server_capabilities.hoverProvider then - vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = args.buf }) + if client.supports_method('textDocument/implementation') then + vim.keymap.set('n', 'g', vim.lsp.buf.implementation, { buffer = args.buf }) end end, }) < - To learn what capabilities are available you can run the following command in a buffer with a started LSP client: >vim diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 5881d90358..edf0b8fb7c 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -408,6 +408,10 @@ The following changes to existing APIs or features add new behavior. • 'comments' includes "fb:•". • 'shortmess' includes the "C" flag. • 'grepprg' defaults to using ripgrep if available. + • |crn| in Normal mode maps to |vim.lsp.buf.rename()|. + • |crr| in Normal and Visual mode maps to |vim.lsp.buf.code_action()|. + • "gr" in Normal mode maps to |vim.lsp.buf.references()| |gr-default| + • |i_CTRL-S| in Insert mode maps to |vim.lsp.buf.signature_help()| • Automatic linting of treesitter query files (see |ft-query-plugin|). Can be disabled via: >lua vim.g.query_lint_on = {} @@ -438,9 +442,10 @@ The following changes to existing APIs or features add new behavior. :call netrw#BrowseX(expand(exists("g:netrw_gx")? g:netrw_gx : ''), netrw#CheckIfRemote()) -• |vim.lsp.start()| now maps |K| to use |vim.lsp.buf.hover()| if the server - supports it, unless |'keywordprg'| was customized before calling - |vim.lsp.start()|. +• |vim.lsp.start()| now creates the following default keymaps (assuming the + server supports the feature): + - |K| in Normal mode maps to |vim.lsp.buf.hover()|, unless |'keywordprg'| + was customized before calling |vim.lsp.start()|. • Terminal buffers started with no arguments (and use 'shell') close automatically if the job exited without error, eliminating the (often diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index d426f8151f..c767c71523 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -137,6 +137,10 @@ of these in your config by simply removing the mapping, e.g. ":unmap Y". - * |v_star-default| - gc |gc-default| |v_gc-default| |o_gc-default| - gcc |gcc-default| +- |crn| +- |crr| +- gr |gr-default| +- |i_CTRL-S| - Nvim LSP client defaults |lsp-defaults| - K |K-lsp-default| -- cgit From 73034611c25d16df5e87c8afb2d339a03a91bd0d Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Fri, 26 Apr 2024 13:16:12 -0500 Subject: feat(diagnostic): add default mappings for diagnostics (#16230) --- runtime/doc/news.txt | 4 ++++ runtime/doc/tagsrch.txt | 12 ++++++++++++ runtime/doc/vim_diff.txt | 3 +++ 3 files changed, 19 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index edf0b8fb7c..12d170612c 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -412,6 +412,10 @@ The following changes to existing APIs or features add new behavior. • |crr| in Normal and Visual mode maps to |vim.lsp.buf.code_action()|. • "gr" in Normal mode maps to |vim.lsp.buf.references()| |gr-default| • |i_CTRL-S| in Insert mode maps to |vim.lsp.buf.signature_help()| + • "]d" and "[d" in Normal mode map to |vim.diagnostic.goto_next()| and + |vim.diagnostic.goto_prev()|, respectively. |]d-default| |[d-default| + • d (and ) map to |vim.diagnostic.open_float()| + |CTRL-W_d-default| • Automatic linting of treesitter query files (see |ft-query-plugin|). Can be disabled via: >lua vim.g.query_lint_on = {} diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt index 6e53b5ebae..ef1654d365 100644 --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -780,9 +780,17 @@ CTRL-W i Open a new window, with the cursor on the first line beginning of the file. If a count is given, the count'th matching line is displayed. + *[d-default* + Mapped to |vim.diagnostic.goto_prev()| by default. + |default-mappings| + *]d* ]d like "[d", but start at the current cursor position. + *]d-default* + Mapped to |vim.diagnostic.goto_next()| by default. + |default-mappings| + *:ds* *:dsearch* :[range]ds[earch][!] [count] [/]string[/] Like "[d" and "]d", but search in [range] lines @@ -829,6 +837,10 @@ CTRL-W d Open a new window, with the cursor on the first beginning of the file. If a count is given, the count'th matching line is jumped to. + *CTRL-W_d-default* + Mapped to |vim.diagnostic.open_float()| by default. + |default-mappings| + *:dsp* *:dsplit* :[range]dsp[lit][!] [count] [/]string[/] Like "CTRL-W d", but search in [range] lines diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index c767c71523..4edcec36a2 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -141,6 +141,9 @@ of these in your config by simply removing the mapping, e.g. ":unmap Y". - |crr| - gr |gr-default| - |i_CTRL-S| +- ]d |]d-default| +- [d |[d-default| +- d |CTRL-W_d-default| - Nvim LSP client defaults |lsp-defaults| - K |K-lsp-default| -- cgit From 9b8a0755390b7eb3ad369f3a0a42eb9aecb8cbe2 Mon Sep 17 00:00:00 2001 From: Mathias Fußenegger Date: Fri, 26 Apr 2024 20:26:21 +0200 Subject: fix(lsp): change `silent` in lsp.start.Opts to optional (#28524) --- runtime/doc/lsp.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index b3f60ed41f..5a98d32628 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -869,7 +869,7 @@ start({config}, {opts}) *vim.lsp.start()* re-uses a client if name and root_dir matches. • {bufnr} (`integer`) Buffer handle to attach to if starting or re-using a client (0 for current). - • {silent} (`boolean`) Suppress error reporting if the LSP + • {silent}? (`boolean`) Suppress error reporting if the LSP server fails to start (default false). Return: ~ -- cgit From f1f5fb911b575372fef49a13d86079b5902ada76 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 27 Apr 2024 05:50:46 +0800 Subject: vim-patch:fe1e2b5e2d65 runtime(doc): clarify syntax vs matching mechanism fixes: vim/vim#14643 https://github.com/vim/vim/commit/fe1e2b5e2d65f05d820f17db935b15454a63be06 Co-authored-by: Christian Brabandt --- runtime/doc/builtin.txt | 4 ++++ runtime/doc/pattern.txt | 13 +++++++++++++ runtime/doc/syntax.txt | 8 ++++++-- runtime/doc/usr_41.txt | 2 +- 4 files changed, 24 insertions(+), 3 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 94721f5024..588d1b7983 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -8208,6 +8208,10 @@ synconcealed({lnum}, {col}) *synconcealed()* synconcealed(lnum, 5) [1, 'X', 2] synconcealed(lnum, 6) [0, '', 0] + Note: Doesn't consider |matchadd()| highlighting items, + since syntax and matching highlighting are two different + mechanisms |syntax-vs-match|. + synstack({lnum}, {col}) *synstack()* Return a |List|, which is the stack of syntax items at the position {lnum} and {col} in the current window. {lnum} is diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 17136ee650..b3bc5e99a1 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1375,6 +1375,19 @@ Finally, these constructs are unique to Perl: ============================================================================== 10. Highlighting matches *match-highlight* + *syntax-vs-match* + Note that the match highlight mechanism is independent + of |syntax-highlighting|, which is (usually) a buffer-local + highlighting, while matching is window-local, both methods + can be freely mixed. Match highlighting functions give you + a bit more flexibility in when and how to apply, but are + typically only used for temporary highlighting, without strict + rules. Both methods can be used to conceal text. + + Thus the matching functions like |matchadd()| won't consider + syntax rules and functions like |synconcealend()| and the + other way around. + *:mat* *:match* :mat[ch] {group} /{pattern}/ Define a pattern to highlight in the current window. It will diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 73d1629d6e..5aaf51318e 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -3825,7 +3825,9 @@ Whether or not it is actually concealed depends on the value of the 'conceallevel' option. The 'concealcursor' option is used to decide whether concealable items in the current line are displayed unconcealed to be able to edit the line. -Another way to conceal text is with |matchadd()|. + +Another way to conceal text is with |matchadd()|, but internally this works a +bit differently |syntax-vs-match|. concealends *:syn-concealends* @@ -3833,7 +3835,9 @@ When the "concealends" argument is given, the start and end matches of the region, but not the contents of the region, are marked as concealable. Whether or not they are actually concealed depends on the setting on the 'conceallevel' option. The ends of a region can only be concealed separately -in this way when they have their own highlighting via "matchgroup" +in this way when they have their own highlighting via "matchgroup". The +|synconcealed()| function can be used to retrieve information about conealed +items. cchar *:syn-cchar* *E844* diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 1c03a61d55..f096201e0f 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -948,7 +948,7 @@ Syntax and highlighting: *syntax-functions* *highlighting-functions* synIDattr() get a specific attribute of a syntax ID synIDtrans() get translated syntax ID synstack() get list of syntax IDs at a specific position - synconcealed() get info about concealing + synconcealed() get info about (synax) concealing diff_hlID() get highlight ID for diff mode at a position matchadd() define a pattern to highlight (a "match") matchaddpos() define a list of positions to highlight -- cgit From a1568f5df0c37d8cab6999fecd5eaa6bab8ad5ec Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 27 Apr 2024 05:52:04 +0800 Subject: vim-patch:00ae5c5cba7b runtime(doc): fix typo https://github.com/vim/vim/commit/00ae5c5cba7b2b42662687b3150397fe1737fba0 Co-authored-by: Christian Brabandt --- runtime/doc/usr_41.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index f096201e0f..9515548cc5 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -948,7 +948,7 @@ Syntax and highlighting: *syntax-functions* *highlighting-functions* synIDattr() get a specific attribute of a syntax ID synIDtrans() get translated syntax ID synstack() get list of syntax IDs at a specific position - synconcealed() get info about (synax) concealing + synconcealed() get info about (syntax) concealing diff_hlID() get highlight ID for diff mode at a position matchadd() define a pattern to highlight (a "match") matchaddpos() define a list of positions to highlight -- cgit From e81eb34aa11f45315725ca2876b81b28d1105978 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 27 Apr 2024 05:52:28 +0800 Subject: vim-patch:9525f6213604 runtime(doc): fix typo synconcealend -> synconcealed (vim/vim#14644) https://github.com/vim/vim/commit/9525f62136047225f4dca8ba68ab2023600ec522 Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com> --- runtime/doc/pattern.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index b3bc5e99a1..1ef182127c 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1385,7 +1385,7 @@ Finally, these constructs are unique to Perl: rules. Both methods can be used to conceal text. Thus the matching functions like |matchadd()| won't consider - syntax rules and functions like |synconcealend()| and the + syntax rules and functions like |synconcealed()| and the other way around. *:mat* *:match* -- cgit From 0547347e72c1e345faf7b7d835a806bfb1f59b68 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 27 Apr 2024 10:31:09 +0200 Subject: vim-patch:79952b9c6774 runtime(jq): include syntax, ftplugin and compiler plugin closes: vim/vim#14619 https://github.com/vim/vim/commit/79952b9c6774d30f248a0ecf9ea84318be947fc4 Co-authored-by: Vito --- runtime/doc/syntax.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 5aaf51318e..9e26e7cdb5 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1614,6 +1614,15 @@ To disable syntax highlighting of errors: > let g:vim_json_warnings = 0 +JQ *jq.vim* *jq_quote_highlight* *ft-jq-syntax* + +To disable numbers having their own color add the following to your vimrc: > + hi link jqNumber Normal + +If you want quotes to have different highlighting than strings > + let g:jq_quote_highlight = 1 + + LACE *lace.vim* *ft-lace-syntax* Lace (Language for Assembly of Classes in Eiffel) is case insensitive, but the -- cgit From a41546d4ac60cecc48b83f85ea9d53ee2fb7dfbb Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Sat, 27 Apr 2024 17:48:35 -0500 Subject: docs: breaking change in diagnostic goto #28541 --- runtime/doc/news.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 12d170612c..4747ad5917 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -140,6 +140,11 @@ The following changes may require adaptations in user config or plugins. • |nvim_open_win()| now blocks all autocommands when `noautocmd` is set, rather than just those from setting the `buffer` to display in the window. +• |vim.diagnostic.goto_next()| and |vim.diagnostic.goto_prev()| jump to the + diagnostic with the highest severity when the "severity" option is + unspecified. To use the old behavior, use: >lua + vim.diagnostic.goto_next({ severity = { min = vim.diagnostic.severity.HINT } }) + ============================================================================== BREAKING CHANGES IN HEAD *news-breaking-dev* @@ -397,11 +402,6 @@ The following changes to existing APIs or features add new behavior. • |vim.diagnostic.config()| now accepts a function for the virtual_text.prefix option, which allows for rendering e.g., diagnostic severities differently. -• |vim.diagnostic.goto_next()| and |vim.diagnostic.goto_prev()| jump to the - diagnostic with the highest severity when the "severity" option is - unspecified. To use the old behavior, use: >lua - vim.diagnostic.goto_next({ severity = { min = vim.diagnostic.severity.HINT } }) - • Defaults: • On Windows 'isfname' does not include ":". Drive letters are handled correctly without it. (Use |gF| for filepaths suffixed with ":line:col"). -- cgit From 26b5405d181e8c9e75c4b4ec9aae963cc25f285f Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 28 Apr 2024 16:27:47 +0200 Subject: fix(treesitter): enforce lowercase language names (#28546) * fix(treesitter): enforce lowercase language names Problem: On case-insensitive file systems (e.g., macOS), `has_parser` will return `true` for uppercase aliases, which will then try to inject the uppercase language unsuccessfully. Solution: Enforce and assume parser names to be lowercase when resolving language names. --- runtime/doc/treesitter.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 67cbeda2a8..2b9eba1520 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -30,6 +30,9 @@ A parser can also be loaded manually using a full path: >lua vim.treesitter.language.add('python', { path = "/path/to/python.so" }) < +Parser names are assumed to be lower case if the file system is +case-sensitive. + To associate certain |filetypes| with a treesitter language (name of parser), use |vim.treesitter.language.register()|. For example, to use the `xml` treesitter parser for buffers with filetype `svg` or `xslt`, use: >lua -- cgit From 83635e4e3db9a99c128e84e79deb590da354215d Mon Sep 17 00:00:00 2001 From: glepnir Date: Sun, 28 Apr 2024 23:15:10 +0800 Subject: fix(diagnostic): get border from config (#28531) Co-authored-by: Justin M. Keyes Co-authored-by: Gregory Anders --- runtime/doc/diagnostic.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/doc') diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index 32c9959f5a..b87de3e366 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -499,6 +499,7 @@ Lua module: vim.diagnostic *diagnostic-api* diagnostic instead of prepending it. Overrides the setting from |vim.diagnostic.config()|. • {focus_id}? (`string`) + • {border}? (`string`) see |vim.api.nvim_open_win()|. *vim.diagnostic.Opts.Signs* -- cgit From 513fc461957f370f9e89b3cfd56cb03a816d6941 Mon Sep 17 00:00:00 2001 From: Luna Saphie Mittelbach Date: Sun, 28 Apr 2024 18:00:48 +0200 Subject: feat(defaults): improve :grep defaults #28545 Based on feedback from #28324, pass -H and -I to regular grep (available on all platforms officially supported by Neovim), and only pass -uu to ripgrep. This makes :grep ignore binary files by default in both cases. --- runtime/doc/news.txt | 3 ++- runtime/doc/options.txt | 11 ++++------- runtime/doc/vim_diff.txt | 3 ++- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 4747ad5917..1da81e3422 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -407,7 +407,8 @@ The following changes to existing APIs or features add new behavior. correctly without it. (Use |gF| for filepaths suffixed with ":line:col"). • 'comments' includes "fb:•". • 'shortmess' includes the "C" flag. - • 'grepprg' defaults to using ripgrep if available. + • 'grepprg' uses the -H and -I flags for grep by default, + and defaults to using ripgrep if available. • |crn| in Normal mode maps to |vim.lsp.buf.rename()|. • |crr| in Normal and Visual mode maps to |vim.lsp.buf.code_action()|. • "gr" in Normal mode maps to |vim.lsp.buf.references()| |gr-default| diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 7b5e3a1c49..9e9c48e099 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -2861,10 +2861,7 @@ A jump table for the options with a short description can be found at |Q_op|. line. The placeholder "$*" is allowed to specify where the arguments will be included. Environment variables are expanded |:set_env|. See |option-backslash| about including spaces and backslashes. - When your "grep" accepts the "-H" argument, use this to make ":grep" - also work well with a single file: >vim - set grepprg=grep\ -nH -< Special value: When 'grepprg' is set to "internal" the |:grep| command + Special value: When 'grepprg' is set to "internal" the |:grep| command works like |:vimgrep|, |:lgrep| like |:lvimgrep|, |:grepadd| like |:vimgrepadd| and |:lgrepadd| like |:lvimgrepadd|. See also the section |:make_makeprg|, since most of the comments there @@ -2872,11 +2869,11 @@ A jump table for the options with a short description can be found at |Q_op|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. This option defaults to: - - `rg --vimgrep -uuu $* ...` if ripgrep is available (|:checkhealth|), - - `grep -n $* /dev/null` on Unix, + - `rg --vimgrep -uu ` if ripgrep is available (|:checkhealth|), + - `grep -HIn $* /dev/null` on Unix, - `findstr /n $* nul` on Windows. Ripgrep can perform additional filtering such as using .gitignore rules - and skipping hidden or binary files. This is disabled by default (see the -u option) + and skipping hidden files. This is disabled by default (see the -u option) to more closely match the behaviour of standard grep. You can make ripgrep match Vim's case handling using the -i/--ignore-case and -S/--smart-case options. diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 4edcec36a2..97c25cc603 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -52,7 +52,8 @@ Defaults *nvim-defaults* - 'encoding' is UTF-8 (cf. 'fileencoding' for file-content encoding) - 'fillchars' defaults (in effect) to "vert:│,fold:·,foldsep:│" - 'formatoptions' defaults to "tcqj" -- 'grepprg' defaults to using ripgrep if available +- 'grepprg' uses the -H and -I flags for regular grep, + and defaults to using ripgrep if available - 'hidden' is enabled - 'history' defaults to 10000 (the maximum) - 'hlsearch' is enabled -- cgit From 61063653b06bfccac083c0105ecd0c433b3bb8f7 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 28 Apr 2024 09:02:18 -0700 Subject: feat(defaults): visual CTRL-R for LSP mappings #28537 Problem: The new LSP "refactor menu" keybinding "crr" is also defined in visual mode, which overlaps with the builtin "c". Solution: Use CTRL-R instead of "crr" for visual mode. fix #28528 --- runtime/doc/diagnostic.txt | 2 +- runtime/doc/lsp.txt | 6 ++++-- runtime/doc/news.txt | 3 ++- runtime/doc/vim_diff.txt | 2 ++ 4 files changed, 9 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index b87de3e366..4958dcfe67 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -499,7 +499,7 @@ Lua module: vim.diagnostic *diagnostic-api* diagnostic instead of prepending it. Overrides the setting from |vim.diagnostic.config()|. • {focus_id}? (`string`) - • {border}? (`string`) see |vim.api.nvim_open_win()|. + • {border}? (`string`) see |nvim_open_win()|. *vim.diagnostic.Opts.Signs* diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 5a98d32628..3017329506 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -61,10 +61,12 @@ options are not restored when the LSP client is stopped or detached. - |K| is mapped to |vim.lsp.buf.hover()| unless |'keywordprg'| is customized or a custom keymap for `K` exists. - *crr* *v_crr* *crn* *i_CTRL-S* + *crr* *v_crr* *crn* *i_CTRL-S* *v_CTRL-R_CTRL-R* *v_CTRL-R_r* Some keymaps are created unconditionally when Nvim starts: - "crn" is mapped in Normal mode to |vim.lsp.buf.rename()| -- "crr" is mapped in Normal and Visual mode to |vim.lsp.buf.code_action()| +- "crr" is mapped in Normal mode to |vim.lsp.buf.code_action()| +- CTRL-R CTRL-R (also "CTRL-R r") is mapped in Visual mode to + |vim.lsp.buf.code_action()| - "gr" is mapped in Normal mode to |vim.lsp.buf.references()| |gr-default| - CTRL-S is mapped in Insert mode to |vim.lsp.buf.signature_help()| diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 1da81e3422..700aba31b9 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -410,7 +410,8 @@ The following changes to existing APIs or features add new behavior. • 'grepprg' uses the -H and -I flags for grep by default, and defaults to using ripgrep if available. • |crn| in Normal mode maps to |vim.lsp.buf.rename()|. - • |crr| in Normal and Visual mode maps to |vim.lsp.buf.code_action()|. + • |crr| in Normal mode maps to |vim.lsp.buf.code_action()|. + • |v_CTRL-R_CTRL-R| in Visual mode maps to |vim.lsp.buf.code_action()|. • "gr" in Normal mode maps to |vim.lsp.buf.references()| |gr-default| • |i_CTRL-S| in Insert mode maps to |vim.lsp.buf.signature_help()| • "]d" and "[d" in Normal mode map to |vim.diagnostic.goto_next()| and diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 97c25cc603..c30239057d 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -140,6 +140,8 @@ of these in your config by simply removing the mapping, e.g. ":unmap Y". - gcc |gcc-default| - |crn| - |crr| +- |v_CTRL-R_CTRL-R| +- r |v_CTRL-R_r| - gr |gr-default| - |i_CTRL-S| - ]d |]d-default| -- cgit From bc7f86209d3961aa479a8caeb792a8d39de55ece Mon Sep 17 00:00:00 2001 From: Maria José Solano Date: Mon, 29 Apr 2024 13:45:53 -0700 Subject: fix(lsp): redundant vim.snippet.jumpable #28560 --- runtime/doc/lua.txt | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 51dcf99dd2..c5d656992c 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -4306,8 +4306,33 @@ Iter:totable() *Iter:totable()* ============================================================================== Lua module: vim.snippet *vim.snippet* -vim.snippet.active() *vim.snippet.active()* - Returns `true` if there's an active snippet in the current buffer. +*vim.snippet.ActiveFilter* + + Fields: ~ + • {direction} (`vim.snippet.Direction`) Navigation direction. -1 for + previous, 1 for next. + + +vim.snippet.active({filter}) *vim.snippet.active()* + Returns `true` if there's an active snippet in the current buffer, + applying the given filter if provided. + + You can use this function to navigate a snippet as follows: >lua + vim.keymap.set({ 'i', 's' }, '', function() + if vim.snippet.active({ direction = 1 }) then + return 'lua vim.snippet.jump(1)' + else + return '' + end + end, { expr = true }) +< + + Parameters: ~ + • {filter} (`vim.snippet.ActiveFilter?`) Filter to constrain the search + with: + • `direction` (vim.snippet.Direction): Navigation direction. + Will return `true` if the snippet can be jumped in the + given direction. See |vim.snippet.ActiveFilter|. Return: ~ (`boolean`) @@ -4343,26 +4368,6 @@ vim.snippet.jump({direction}) *vim.snippet.jump()* • {direction} (`vim.snippet.Direction`) Navigation direction. -1 for previous, 1 for next. -vim.snippet.jumpable({direction}) *vim.snippet.jumpable()* - Returns `true` if there is an active snippet which can be jumped in the - given direction. You can use this function to navigate a snippet as - follows: >lua - vim.keymap.set({ 'i', 's' }, '', function() - if vim.snippet.jumpable(1) then - return 'lua vim.snippet.jump(1)' - else - return '' - end - end, { expr = true }) -< - - Parameters: ~ - • {direction} (`vim.snippet.Direction`) Navigation direction. -1 for - previous, 1 for next. - - Return: ~ - (`boolean`) - ============================================================================== Lua module: vim.text *vim.text* -- cgit From 9eb87c5de696700047238895d0b9515741e9cca1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 30 Apr 2024 05:54:03 +0800 Subject: vim-patch:04e1aaa94e3b (#28570) runtime(doc): Fix a typo in usr_30.txt closes: vim/vim#14662 https://github.com/vim/vim/commit/04e1aaa94e3b7bf3ae6d376f52504aeb02bc9ca5 Co-authored-by: UM-Li --- runtime/doc/usr_30.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/usr_30.txt b/runtime/doc/usr_30.txt index a0d22482c3..98dbefae46 100644 --- a/runtime/doc/usr_30.txt +++ b/runtime/doc/usr_30.txt @@ -246,7 +246,7 @@ code block the cursor is in: > =a{ -I you have really badly indented code, you can re-indent the whole file with: +If you have really badly indented code, you can re-indent the whole file with: > gg=G -- cgit From f59db07cdc8f266c9d08f4c229326d471f2d62ac Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 30 Apr 2024 06:02:38 +0800 Subject: vim-patch:9.1.0381: cbuffer and similar commands don't accept a range (#28571) Problem: cbuffer and similar quickfix and locationlist commands don't accept a range, even so it is documented they should (ilan-schemoul, after 8.1.1241) Solution: Define ex commands with ADDR_LINES instead of ADDR_OTHER fixes: vim/vim#14638 closes: vim/vim#14657 https://github.com/vim/vim/commit/652c821366691a8bd5474766581090df0c742fa1 Co-authored-by: Christian Brabandt --- runtime/doc/quickfix.txt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index b4c2b7c192..5d3c0cbdc2 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -275,7 +275,8 @@ processing a quickfix or location list command, it will be aborted. current window is used instead of the quickfix list. *:cb* *:cbuffer* *E681* -:cb[uffer][!] [bufnr] Read the error list from the current buffer. +:[range]cb[uffer][!] [bufnr] + Read the error list from the current buffer. When [bufnr] is given it must be the number of a loaded buffer. That buffer will then be used instead of the current buffer. @@ -284,26 +285,31 @@ processing a quickfix or location list command, it will be aborted. See |:cc| for [!]. *:lb* *:lbuffer* -:lb[uffer][!] [bufnr] Same as ":cbuffer", except the location list for the +:[range]lb[uffer][!] [bufnr] + Same as ":cbuffer", except the location list for the current window is used instead of the quickfix list. *:cgetb* *:cgetbuffer* -:cgetb[uffer] [bufnr] Read the error list from the current buffer. Just +:[range]cgetb[uffer] [bufnr] + Read the error list from the current buffer. Just like ":cbuffer" but don't jump to the first error. *:lgetb* *:lgetbuffer* -:lgetb[uffer] [bufnr] Same as ":cgetbuffer", except the location list for +:[range]lgetb[uffer] [bufnr] + Same as ":cgetbuffer", except the location list for the current window is used instead of the quickfix list. *:cad* *:cadd* *:caddbuffer* -:cad[dbuffer] [bufnr] Read the error list from the current buffer and add +:[range]cad[dbuffer] [bufnr] + Read the error list from the current buffer and add the errors to the current quickfix list. If a quickfix list is not present, then a new list is created. Otherwise, same as ":cbuffer". *:laddb* *:laddbuffer* -:laddb[uffer] [bufnr] Same as ":caddbuffer", except the location list for +:[range]laddb[uffer] [bufnr] + Same as ":caddbuffer", except the location list for the current window is used instead of the quickfix list. -- cgit From b7e5769132e865122fe4bf8588be9ca1820db802 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 29 Apr 2024 23:44:53 +0200 Subject: vim-patch:c4d0c8c81245 runtime(java): Improve the recognition of the "indent" method declarations (vim/vim#14659) There is a flaw in the current implementation that has been exacerbated around v5.2. It lies in the recognition of all three indentation styles simultaneously: a tab, two space, and eight space character(s). With it, it is not uncommon to misidentify various constructs as method declarations when they belong to two-space indented members and other blocks of a type and are offset at eight space characters or a tab from the start of the line. For example, ------------------------------------------------------------ class Test { static String hello() { return "hello"; } public static void main(String[] args) { try { if (args.length > 0) { // FIXME: eight spaces. System.out.println(args[0]); } else { // FIXME: a tab. System.out.println(hello()); } } catch (Exception e) { throw new Error(e); } } } ------------------------------------------------------------ ------------------------------------------------------------ :let g:java_highlight_functions = 'indent' :doautocmd Syntax ------------------------------------------------------------ A better approach is to pick an only indentation style out of all supported styles (so either two spaces _or_ eight spaces _or_ a tab). Note that tabs and spaces can still be mixed, only the leading tab or the leading run of spaces matters for the recognition. And there is no reason to not complement the set of valid styles with any number of spaces from 1 to 8, inclusively. Please proceed with the necessary change as follows: - rename from "indent" to "indent2" for a 2-space run; - rename from "indent" to "indent8" for an 8-space run; - continue to have "indent" for a tab run; - define an "indent" variable with a suffix number denoting the preferred amount of indentation for any other run of spaces [1-8]. As before, this alternative style of recognition of method declarations still does not prescribe naming conventions and still cannot recognise method declarations in nested types that are conventionally indented. The proposed changes also follow suit of "style" in stopping the claiming of constructor and enum constant declarations. https://github.com/vim/vim/commit/c4d0c8c81245918632a9d3c2c20a390546fad065 Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com> --- runtime/doc/syntax.txt | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 9e26e7cdb5..07d360ce29 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1542,15 +1542,25 @@ Function names are not highlighted, as the way to find functions depends on how you write Java code. The syntax file knows two possible ways to highlight functions: -If you write function declarations that are always indented by either -a tab, 8 spaces or 2 spaces you may want to set > +If you write function declarations that are consistently indented by either +a tab, or a space . . . or eight space character(s), you may want to set > :let java_highlight_functions="indent" + :let java_highlight_functions="indent1" + :let java_highlight_functions="indent2" + :let java_highlight_functions="indent3" + :let java_highlight_functions="indent4" + :let java_highlight_functions="indent5" + :let java_highlight_functions="indent6" + :let java_highlight_functions="indent7" + :let java_highlight_functions="indent8" +Note that in terms of 'shiftwidth', this is the leftmost step of indentation. However, if you follow the Java guidelines about how functions and classes are -supposed to be named (with respect to upper and lowercase), use > +supposed to be named (with respect to upper- and lowercase) and there is any +amount of indentation, you may want to set > :let java_highlight_functions="style" -If both options do not work for you, but you would still want function -declarations to be highlighted create your own definitions by changing the -definitions in java.vim or by creating your own java.vim which includes the +If neither setting does work for you, but you would still want function +declarations to be highlighted, create your own definitions by changing the +definitions in java.vim or by creating your own java.vim that includes the original one and then adds the code to highlight functions. In Java 1.1 the functions System.out.println() and System.err.println() should -- cgit From 234b5f67019b435b604308a96c366b1187c2cc3a Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 30 Apr 2024 01:04:42 +0200 Subject: docs: various fixes (#28208) Co-authored-by: Evgeni Chasnovski Co-authored-by: Famiu Haque Co-authored-by: Gregory Anders Co-authored-by: Guilherme Soares Co-authored-by: Jannik Buhr Co-authored-by: thomaswuhoileong <72001875+thomaswuhoileong@users.noreply.github.com> Co-authored-by: tom-anders <13141438+tom-anders@users.noreply.github.com> Co-authored-by: zeertzjq --- runtime/doc/options.txt | 2 +- runtime/doc/vvars.txt | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 9e9c48e099..c44db11acd 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1442,7 +1442,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'commentstring' 'cms' string (default "") local to buffer A template for a comment. The "%s" in the value is replaced with the - comment text. For example, C uses "/*%s*/". Currently only used to + comment text. For example, C uses "/*%s*/". Used for |commenting| and to add markers for folding, see |fold-marker|. *'complete'* *'cpt'* *E535* diff --git a/runtime/doc/vvars.txt b/runtime/doc/vvars.txt index e71e31abf8..de7f23a34d 100644 --- a/runtime/doc/vvars.txt +++ b/runtime/doc/vvars.txt @@ -60,9 +60,10 @@ v:collate *v:completed_item* *completed_item-variable* v:completed_item - Dictionary containing the most recent |complete-items| after - |CompleteDone|. Empty if the completion failed, or after - leaving and re-entering insert mode. + Dictionary containing the |complete-items| for the most + recently completed word after |CompleteDone|. Empty if the + completion failed, or after leaving and re-entering insert + mode. Note: Plugins can modify the value to emulate the builtin |CompleteDone| event behavior. -- cgit From 71cf75f96a67aeb79ac3af6aa829bac81bd2d33d Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 30 Apr 2024 04:30:21 -0700 Subject: docs: misc #24163 - Also delete old perl scripts which are not used since 8+ years ago. fix #23251 fix #27367 ref https://github.com/neovim/neovim/issues/2252#issuecomment-1902662577 Helped-by: Daniel Kongsgaard Co-authored-by: Kevin Pham --- runtime/doc/api.txt | 16 +++++++--- runtime/doc/autocmd.txt | 26 +++++++-------- runtime/doc/deprecated.txt | 11 ++++--- runtime/doc/develop.txt | 2 ++ runtime/doc/lsp.txt | 2 +- runtime/doc/lua.txt | 41 ++++++++++-------------- runtime/doc/news.txt | 19 +++++++---- runtime/doc/nvim_terminal_emulator.txt | 40 +++++++++++++++++++++++ runtime/doc/options.txt | 1 + runtime/doc/remote_plugin.txt | 6 ++-- runtime/doc/treesitter.txt | 20 +++++++++--- runtime/doc/ui.txt | 4 +-- runtime/doc/vim_diff.txt | 58 +++++++++++++++++----------------- 13 files changed, 152 insertions(+), 94 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index cc5f228920..463301693d 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -112,7 +112,11 @@ Basic types ~ Dictionary (msgpack: map) Object < - Note: empty Array is accepted as a valid argument for Dictionary parameter. + Note: + - Empty Array is accepted as a valid Dictionary parameter. + - Functions cannot cross RPC boundaries. But API functions (e.g. + |nvim_create_autocmd()|) may support Lua function parameters for non-RPC + invocations. Special types (msgpack EXT) ~ @@ -504,8 +508,9 @@ Extended marks (extmarks) represent buffer annotations that track text changes in the buffer. They can represent cursors, folds, misspelled words, anything that needs to track a logical location in the buffer over time. |api-indexing| -Extmark position works like "bar" cursor: it exists between characters. Thus, -the maximum extmark index on a line is 1 more than the character index: > +Extmark position works like a "vertical bar" cursor: it exists between +characters. Thus, the maximum extmark index on a line is 1 more than the +character index: > f o o b a r line contents 0 1 2 3 4 5 character positions (0-based) @@ -3447,7 +3452,8 @@ nvim_create_autocmd({event}, {opts}) *nvim_create_autocmd()* Vimscript function name, if string) called when the event(s) is triggered. Lua callback can return a truthy value (not `false` or `nil`) to delete the autocommand. - Receives a table argument with these keys: + Receives one argument, a table with these keys: + *event-args* • id: (number) autocommand id • event: (string) name of the triggered event |autocmd-events| @@ -3456,7 +3462,7 @@ nvim_create_autocmd({event}, {opts}) *nvim_create_autocmd()* • buf: (number) expanded value of • file: (string) expanded value of • data: (any) arbitrary data passed from - |nvim_exec_autocmds()| + |nvim_exec_autocmds()| *event-data* • command (string) optional: Vim command to execute on event. Cannot be used with {callback} • once (boolean) optional: defaults to false. Run the diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index b3974e3246..bb84966228 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -903,18 +903,18 @@ ShellFilterPost After executing a shell command with ":{range}!cmd", ":w !cmd" or ":r !cmd". Can be used to check for any changed files. *SourcePre* -SourcePre Before sourcing a vim/lua file. |:source| +SourcePre Before sourcing a Vimscript/Lua file. |:source| is the name of the file being sourced. *SourcePost* -SourcePost After sourcing a vim/lua file. |:source| +SourcePost After sourcing a Vimscript/Lua file. |:source| is the name of the file being sourced. Not triggered when sourcing was interrupted. Also triggered after a SourceCmd autocommand was triggered. *SourceCmd* -SourceCmd When sourcing a vim/lua file. |:source| +SourceCmd When sourcing a Vimscript/Lua file. |:source| is the name of the file being sourced. - The autocommand must source this file. + The autocommand must source that file. |Cmd-event| *SpellFileMissing* SpellFileMissing When trying to load a spell checking file and @@ -989,18 +989,16 @@ TermClose When a |terminal| job ends. Sets these |v:event| keys: status *TermRequest* -TermRequest When a |terminal| job emits an OSC or DCS - sequence. Sets |v:termrequest|. When used from - Lua, the request string is included in the - "data" field of the autocommand callback. +TermRequest When a |:terminal| child process emits an OSC + or DCS sequence. Sets |v:termrequest|. The + |event-data| is the request string. *TermResponse* TermResponse When Nvim receives an OSC or DCS response from - the terminal. Sets |v:termresponse|. When used - from Lua, the response string is included in - the "data" field of the autocommand callback. - May be triggered halfway through another event - (file I/O, a shell command, or anything else - that takes time). Example: >lua + the host terminal. Sets |v:termresponse|. The + |event-data| is the response string. May be + triggered during another event (file I/O, + a shell command, or anything else that takes + time). Example: >lua -- Query the terminal palette for the RGB value of color 1 -- (red) using OSC 4 diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index 602b033ecc..622bce14b7 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -148,8 +148,9 @@ LSP FUNCTIONS `progress` of |vim.lsp.Client| - *vim.lsp.get_active_clients()* Use |vim.lsp.get_clients()| - *vim.lsp.for_each_buffer_client()* Use |vim.lsp.get_clients()| -- *vim.lsp.util.lookup_section()* Use |vim.tbl_get()| and - |vim.split()| with {plain=true} instead. +- *vim.lsp.util.lookup_section()* Use |vim.tbl_get()| instead: > + local keys = vim.split(section, '.', { plain = true }) + local vim.tbl_get(table, unpack(keys)) - *vim.lsp.util.trim_empty_lines()* Use |vim.split()| with `trimempty` instead. - *vim.lsp.util.try_trim_markdown_code_blocks()* - *vim.lsp.util.set_lines()* @@ -217,8 +218,10 @@ UI EXTENSIONS by the Nvim core directly instead of the TUI. VARIABLES -- *b:terminal_job_pid* PID of the top-level process in a |:terminal|. - Use `jobpid(&channel)` instead. +- *b:terminal_job_pid* Use `jobpid(&channel)` instead. +- *b:terminal_job_id* Use `&channel` instead. To access in non-current buffer: + - Lua: `vim.bo[bufnr].channel` + - Vimscript: `getbufvar(bufnr, '&channel')` vim:noet:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index ba16943979..b843988b94 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -532,6 +532,8 @@ External UIs are expected to implement these common features: published in this event. See also "mouse_on", "mouse_off". - UIs generally should NOT set |$NVIM_APPNAME| (unless explicitly requested by the user). +- Support the text decorations/attributes given by |ui-event-hl_attr_define|. + The "url" attr should be presented as a clickable hyperlink. vim:tw=78:ts=8:sw=4:et:ft=help:norl: diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 3017329506..d199634bae 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -61,7 +61,7 @@ options are not restored when the LSP client is stopped or detached. - |K| is mapped to |vim.lsp.buf.hover()| unless |'keywordprg'| is customized or a custom keymap for `K` exists. - *crr* *v_crr* *crn* *i_CTRL-S* *v_CTRL-R_CTRL-R* *v_CTRL-R_r* + *crr* *crn* *i_CTRL-S* *v_CTRL-R_CTRL-R* *v_CTRL-R_r* Some keymaps are created unconditionally when Nvim starts: - "crn" is mapped in Normal mode to |vim.lsp.buf.rename()| - "crr" is mapped in Normal mode to |vim.lsp.buf.code_action()| diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index c5d656992c..071cdc8ef1 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -592,24 +592,13 @@ A subset of the `vim.*` API is available in threads. This includes: ============================================================================== VIM.HIGHLIGHT *vim.highlight* -Nvim includes a function for highlighting a selection on yank. - -To enable it, add the following to your `init.vim`: >vim - au TextYankPost * silent! lua vim.highlight.on_yank() -< - -You can customize the highlight group and the duration of the highlight via: >vim - au TextYankPost * silent! lua vim.highlight.on_yank {higroup="IncSearch", timeout=150} -< +vim.highlight.on_yank({opts}) *vim.highlight.on_yank()* + Highlight the yanked text during a |TextYankPost| event. -If you want to exclude visual selections from highlighting on yank, use: >vim - au TextYankPost * silent! lua vim.highlight.on_yank {on_visual=false} + Add the following to your `init.vim`: >vim + autocmd TextYankPost * silent! lua vim.highlight.on_yank {higroup='Visual', timeout=300} < - -vim.highlight.on_yank({opts}) *vim.highlight.on_yank()* - Highlight the yanked text - Parameters: ~ • {opts} (`table?`) Optional parameters • higroup highlight group for yanked region (default @@ -4002,18 +3991,22 @@ Iter:flatten({depth}) *Iter:flatten()* (`Iter`) Iter:fold({init}, {f}) *Iter:fold()* - Folds ("reduces") an iterator into a single value. + Folds ("reduces") an iterator into a single value. *Iter:reduce()* Examples: >lua -- Create a new table with only even values - local t = { a = 1, b = 2, c = 3, d = 4 } - local it = vim.iter(t) - it:filter(function(k, v) return v % 2 == 0 end) - it:fold({}, function(t, k, v) - t[k] = v - return t - end) - -- { b = 2, d = 4 } + vim.iter({ a = 1, b = 2, c = 3, d = 4 }) + :filter(function(k, v) return v % 2 == 0 end) + :fold({}, function(acc, k, v) + acc[k] = v + return acc + end) --> { b = 2, d = 4 } + + -- Get the "maximum" item of an iterable. + vim.iter({ -99, -4, 3, 42, 0, 0, 7 }) + :fold({}, function(acc, v) + acc.max = math.max(v, acc.max or v) return acc + end) --> { max = 42 } < Parameters: ~ diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 700aba31b9..692554295c 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -4,9 +4,9 @@ NVIM REFERENCE MANUAL -Notable changes in Nvim 0.10 from 0.9 *news* +Notable changes since Nvim 0.9 *news* -For changes in Nvim 0.9, see |news-0.9|. +For changes in the previous release, see |news-0.9|. Type |gO| to see the table of contents. @@ -148,8 +148,10 @@ The following changes may require adaptations in user config or plugins. ============================================================================== BREAKING CHANGES IN HEAD *news-breaking-dev* -The following breaking changes were made during the development cycle to -unreleased features on Nvim HEAD. + ====== Remove this section before release. ====== + +The following changes to UNRELEASED features were made during the development +cycle (Nvim HEAD, the "master" branch). • Removed `vim.treesitter.foldtext` as transparent foldtext is now supported https://github.com/neovim/neovim/pull/20750 @@ -225,6 +227,8 @@ The following new APIs and features were added. swapfile is owned by a running Nvim process, instead of prompting. If you always want the swapfile dialog, delete the default SwapExists handler: `autocmd! nvim_swapfile`. |default-autocmds| + • Navigating the |jumplist| with CTRL+O, CTRL+I behaves more intuitively + when deleting buffers, and avoids "invalid buffer" cases. #25461 • LSP • LSP method names are available in |vim.lsp.protocol.Methods|. @@ -368,9 +372,10 @@ The following new APIs and features were added. • |vim.version.le()| and |vim.version.ge()| are added to |vim.version|. -• |extmarks| can be associated with a URL and URLs are included as a new - highlight attribute. The TUI will display URLs using the OSC 8 control - sequence, enabling clickable text in supporting terminals. +• |extmarks| can set a "url" highlight attribute, so the text region can + become a clickable hyperlink (assuming UI support). The TUI renders URLs + using the OSC 8 control sequence, enabling clickable text in supporting + terminals. • Added |nvim_tabpage_set_win()| to set the current window of a tabpage. diff --git a/runtime/doc/nvim_terminal_emulator.txt b/runtime/doc/nvim_terminal_emulator.txt index d4e05cee26..a6ebc7e958 100644 --- a/runtime/doc/nvim_terminal_emulator.txt +++ b/runtime/doc/nvim_terminal_emulator.txt @@ -126,6 +126,46 @@ color index is just forwarded. Editor highlighting (|syntax-highlighting|, |highlight-groups|, etc.) has higher precedence: it is applied after terminal colors are resolved. +------------------------------------------------------------------------------ +EVENTS *terminal-events* + +Applications running in a :terminal buffer can send requests, which Nvim +exposes via the |TermRequest| event. + +OSC 7: change working directory *terminal-osc7* + +To handle OSC 7 emitted from :terminal processes, this code will :cd to the +directory indicated in the request. >lua + + vim.api.nvim_create_autocmd({ 'TermRequest' }, { + desc = 'Handles OSC 7 dir change requests', + callback = function(ev) + if string.sub(vim.v.termrequest, 1, 4) == '\x1b]7;' then + local dir = string.gsub(vim.v.termrequest, '\x1b]7;file://[^/]*', '') + if vim.fn.isdirectory(dir) == 0 then + vim.notify('invalid dir: '..dir) + return + end + vim.api.nvim_buf_set_var(ev.buf, 'osc7_dir', dir) + if vim.o.autochdir and vim.api.nvim_get_current_buf() == ev.buf then + vim.cmd.cd(dir) + end + end + end + }) + vim.api.nvim_create_autocmd({ 'BufEnter', 'WinEnter', 'DirChanged' }, { + callback = function(ev) + if vim.b.osc7_dir and vim.fn.isdirectory(vim.b.osc7_dir) == 1 then + vim.cmd.cd(vim.b.osc7_dir) + end + end + }) + +To try it out, select the above code and source it with `:'<,'>lua`, then run +this command in a :terminal buffer: > + + printf "\033]7;file://./foo/bar\033\\" + ============================================================================== Status Variables *terminal-status* diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index c44db11acd..edda46e197 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -6837,6 +6837,7 @@ A jump table for the options with a short description can be found at |Q_op|. Level Messages ~ ---------------------------------------------------------------------- + 1 Enables Lua tracing (see above). Does not produce messages. 2 When a file is ":source"'ed, or |shada| file is read or written. 3 UI info, terminal capabilities. 4 Shell commands. diff --git a/runtime/doc/remote_plugin.txt b/runtime/doc/remote_plugin.txt index cfe4b08000..694c339ef2 100644 --- a/runtime/doc/remote_plugin.txt +++ b/runtime/doc/remote_plugin.txt @@ -30,9 +30,9 @@ check whether a plugin host is available for their chosen programming language. Plugin hosts are programs that provide a high-level environment for plugins, taking care of most boilerplate involved in defining commands, autocmds, and -functions that are implemented over |RPC| connections. Hosts are loaded only -when one of their registered plugins require it, keeping Nvim's startup as -fast as possible, even if many plugins/hosts are installed. +functions implemented over |RPC| connections. Hosts are loaded only when one +of their registered plugins require it, keeping Nvim's startup as fast as +possible, even if many plugins/hosts are installed. ============================================================================== 3. Example *remote-plugin-example* diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 2b9eba1520..7ee3769bbd 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -18,15 +18,25 @@ changes. This documentation may also not fully reflect the latest changes. PARSER FILES *treesitter-parsers* Parsers are the heart of treesitter. They are libraries that treesitter will -search for in the `parser` runtime directory. By default, Nvim bundles parsers -for C, Lua, Vimscript, Vimdoc and Treesitter query files, but parsers can be -installed via a plugin like https://github.com/nvim-treesitter/nvim-treesitter -or even manually. +search for in the `parser` runtime directory. + +Nvim includes these parsers: + +- C +- Lua +- Markdown +- Vimscript +- Vimdoc +- Treesitter query files |ft-query-plugin| + +You can install more parsers manually, or with a plugin like +https://github.com/nvim-treesitter/nvim-treesitter . Parsers are searched for as `parser/{lang}.*` in any 'runtimepath' directory. If multiple parsers for the same language are found, the first one is used. (NOTE: This typically implies the priority "user config > plugins > bundled".) -A parser can also be loaded manually using a full path: >lua + +To load a parser from its filepath: >lua vim.treesitter.language.add('python', { path = "/path/to/python.so" }) < diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt index 969851f027..1f5132bd30 100644 --- a/runtime/doc/ui.txt +++ b/runtime/doc/ui.txt @@ -331,8 +331,8 @@ numerical highlight ids to the actual attributes. `blend`: blend level (0-100). Could be used by UIs to support blending floating windows to the background or to signal a transparent cursor. - `url`: a URL associated with this highlight. UIs can - display this URL however they wish. + `url`: URL associated with this highlight. UIs should + present the region as a clickable hyperlink. For absent color keys the default color should be used. Don't store the default value in the table, rather a sentinel value, so that diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index c30239057d..8ddad66e23 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -317,36 +317,39 @@ Normal commands: |Q| replays the last recorded macro instead of switching to Ex mode (|gQ|). Options: - Local values for global-local number/boolean options are unset when the - option is set without a scope (e.g. by using |:set|), similarly to how - global-local string options work. - - 'autoread' works in the terminal (if it supports "focus" events) - 'cpoptions' flags: |cpo-_| - 'diffopt' "linematch" feature - 'exrc' searches for ".nvim.lua", ".nvimrc", or ".exrc" files. The + +Local values for global-local number/boolean options are unset when the option +is set without a scope (e.g. by using |:set|), similarly to how global-local +string options work. + +- 'autoread' works in the terminal (if it supports "focus" events) +- 'cpoptions' flags: |cpo-_| +- 'diffopt' "linematch" feature +- 'exrc' searches for ".nvim.lua", ".nvimrc", or ".exrc" files. The user is prompted whether to trust the file. - 'fillchars' flags: "msgsep", "horiz", "horizup", "horizdown", +- 'fillchars' flags: "msgsep", "horiz", "horizup", "horizdown", "vertleft", "vertright", "verthoriz" - 'foldcolumn' supports up to 9 dynamic/fixed columns - 'guicursor' works in the terminal (TUI) - 'inccommand' shows interactive results for |:substitute|-like commands +- 'foldcolumn' supports up to 9 dynamic/fixed columns +- 'guicursor' works in the terminal (TUI) +- 'inccommand' shows interactive results for |:substitute|-like commands and |:command-preview| commands - 'jumpoptions' "view" tries to restore the |mark-view| when moving through - the |jumplist|, |changelist|, |alternate-file| or using |mark-motions|. - 'laststatus' global statusline support - 'mousescroll' amount to scroll by when scrolling with a mouse - 'pumblend' pseudo-transparent popupmenu - 'scrollback' - 'shortmess' "F" flag does not affect output from autocommands - 'signcolumn' supports up to 9 dynamic/fixed columns - 'statuscolumn' full control of columns using 'statusline' format - 'tabline' middle-click on tabpage label closes tabpage, +- 'jumpoptions' "view" tries to restore the |mark-view| when moving through +- the |jumplist|, |changelist|, |alternate-file| or using |mark-motions|. +- 'laststatus' global statusline support +- 'mousescroll' amount to scroll by when scrolling with a mouse +- 'pumblend' pseudo-transparent popupmenu +- 'scrollback' +- 'shortmess' + - "F" flag does not affect output from autocommands. + - "q" flag fully hides macro recording message. +- 'signcolumn' supports up to 9 dynamic/fixed columns +- 'statuscolumn' full control of columns using 'statusline' format +- 'tabline' middle-click on tabpage label closes tabpage, and %@Func@foo%X can call any function on mouse-click - 'termpastefilter' - 'ttimeout', 'ttimeoutlen' behavior was simplified - 'winblend' pseudo-transparency in floating windows |api-floatwin| - 'winhighlight' window-local highlights +- 'termpastefilter' +- 'ttimeout', 'ttimeoutlen' behavior was simplified +- 'winblend' pseudo-transparency in floating windows |api-floatwin| +- 'winhighlight' window-local highlights Providers: If a Python interpreter is available on your `$PATH`, |:python| and @@ -596,9 +599,6 @@ Autocommands: - |TermResponse| is fired for any OSC sequence received from the terminal, instead of the Primary Device Attributes response. |v:termresponse| -Options: -- |shm-q| fully hides macro recording message instead of only shortening it. - ============================================================================== Missing features *nvim-missing* -- cgit From 0330dd9e69de7567fd2479c0203b778a1d2dce2f Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 30 Apr 2024 05:12:51 -0700 Subject: fix(api): mark nvim__complete_set as experimental #28579 Problem: nvim_complete_set was added in 5ed55ff14c8b7e346811cb6228bf63fb5106bae9 but needs more bake time. Solution: Rename it, mark it as experimental. --- runtime/doc/api.txt | 32 +++++++++++++++++--------------- runtime/doc/news.txt | 3 +++ 2 files changed, 20 insertions(+), 15 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 463301693d..e564b19fc3 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -584,6 +584,23 @@ created for extmark changes. ============================================================================== Global Functions *api-global* +nvim__complete_set({index}, {opts}) *nvim__complete_set()* + EXPERIMENTAL: this api may change in the future. + + Sets info for the completion item at the given index. If the info text was + shown in a window, returns the window and buffer ids, or empty dict if not + shown. + + Parameters: ~ + • {index} Completion candidate index + • {opts} Optional parameters. + • info: (string) info text. + + Return: ~ + Dictionary containing these keys: + • winid: (number) floating window id + • bufnr: (number) buffer id in floating window + nvim__get_runtime({pat}, {all}, {opts}) *nvim__get_runtime()* Find files in runtime directories @@ -678,21 +695,6 @@ nvim_chan_send({chan}, {data}) *nvim_chan_send()* • {chan} id of the channel • {data} data to write. 8-bit clean: can contain NUL bytes. -nvim_complete_set({index}, {opts}) *nvim_complete_set()* - Set info for the completion candidate index. if the info was shown in a - window, then the window and buffer ids are returned for further - customization. If the text was not shown, an empty dict is returned. - - Parameters: ~ - • {index} the completion candidate index - • {opts} Optional parameters. - • info: (string) info text. - - Return: ~ - Dictionary containing these keys: - • winid: (number) floating window id - • bufnr: (number) buffer id in floating window - nvim_create_buf({listed}, {scratch}) *nvim_create_buf()* Creates a new, empty, unnamed buffer. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 692554295c..57f0f1d6d4 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -174,6 +174,9 @@ cycle (Nvim HEAD, the "master" branch). • Removed Iter:nthback(), use Iter:nth() with negative index instead. +• Renamed nvim_complete_set to nvim__complete_set and marked it as + experimental. + ============================================================================== NEW FEATURES *news-features* -- cgit From ee41153a945876ad0c7f0927ffa7b5a5afdaca89 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Tue, 30 Apr 2024 09:57:31 +0100 Subject: feat(diagnostic): revert default behaviour of goto_next/prev() Follow-up to #28490 Problem: The new behaviour of goto_next/prev() of navigating to the next highest severity doesn't work well when diagnostic providers have different interpretations of severities. E.g. the user may be blocked from navigating to a useful LSP warning, due to some linter error. Solution: The behaviour of next highest severity is now a hidden option `_highest = true`. We can revisit how to integrate this behaviour during the 0.11 cycle. --- runtime/doc/diagnostic.txt | 7 +++---- runtime/doc/news.txt | 5 ----- 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index 4958dcfe67..ac10b4ea39 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -389,9 +389,8 @@ Lua module: vim.diagnostic *diagnostic-api* |nvim_win_get_cursor()|. • {wrap}? (`boolean`, default: `true`) Whether to loop around file or not. Similar to 'wrapscan'. - • {severity}? (`vim.diagnostic.Severity`) See - |diagnostic-severity|. If `nil`, go to the - diagnostic with the highest severity. + • {severity}? (`vim.diagnostic.SeverityFilter`) See + |diagnostic-severity|. • {float}? (`boolean|vim.diagnostic.Opts.Float`, default: `true`) If `true`, call |vim.diagnostic.open_float()| after moving. If a @@ -435,7 +434,7 @@ Lua module: vim.diagnostic *diagnostic-api* • {update_in_insert}? (`boolean`, default: `false`) Update diagnostics in Insert mode (if `false`, diagnostics are updated on |InsertLeave|) - • {severity_sort}? (`boolean|{reverse?:boolean}`, default: `false) + • {severity_sort}? (`boolean|{reverse?:boolean}`, default: `false`) Sort diagnostics by severity. This affects the order in which signs and virtual text are displayed. When true, higher severities are diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 57f0f1d6d4..bae0030a14 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -140,11 +140,6 @@ The following changes may require adaptations in user config or plugins. • |nvim_open_win()| now blocks all autocommands when `noautocmd` is set, rather than just those from setting the `buffer` to display in the window. -• |vim.diagnostic.goto_next()| and |vim.diagnostic.goto_prev()| jump to the - diagnostic with the highest severity when the "severity" option is - unspecified. To use the old behavior, use: >lua - vim.diagnostic.goto_next({ severity = { min = vim.diagnostic.severity.HINT } }) - ============================================================================== BREAKING CHANGES IN HEAD *news-breaking-dev* -- cgit From dafa51c16d9bdaec5011b591b0ce8dff287624b7 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 30 Apr 2024 06:06:14 -0700 Subject: docs(api): sort unreleased nvim__ functions last #28580 --- runtime/doc/api.txt | 186 ++++++++++++++++++++++++++-------------------------- 1 file changed, 93 insertions(+), 93 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index e564b19fc3..d15230ba2d 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -584,99 +584,6 @@ created for extmark changes. ============================================================================== Global Functions *api-global* -nvim__complete_set({index}, {opts}) *nvim__complete_set()* - EXPERIMENTAL: this api may change in the future. - - Sets info for the completion item at the given index. If the info text was - shown in a window, returns the window and buffer ids, or empty dict if not - shown. - - Parameters: ~ - • {index} Completion candidate index - • {opts} Optional parameters. - • info: (string) info text. - - Return: ~ - Dictionary containing these keys: - • winid: (number) floating window id - • bufnr: (number) buffer id in floating window - -nvim__get_runtime({pat}, {all}, {opts}) *nvim__get_runtime()* - Find files in runtime directories - - Attributes: ~ - |api-fast| - - Parameters: ~ - • {pat} pattern of files to search for - • {all} whether to return all matches or only the first - • {opts} is_lua: only search Lua subdirs - - Return: ~ - list of absolute paths to the found files - -nvim__id({obj}) *nvim__id()* - Returns object given as argument. - - This API function is used for testing. One should not rely on its presence - in plugins. - - Parameters: ~ - • {obj} Object to return. - - Return: ~ - its argument. - -nvim__id_array({arr}) *nvim__id_array()* - Returns array given as argument. - - This API function is used for testing. One should not rely on its presence - in plugins. - - Parameters: ~ - • {arr} Array to return. - - Return: ~ - its argument. - -nvim__id_dictionary({dct}) *nvim__id_dictionary()* - Returns dictionary given as argument. - - This API function is used for testing. One should not rely on its presence - in plugins. - - Parameters: ~ - • {dct} Dictionary to return. - - Return: ~ - its argument. - -nvim__id_float({flt}) *nvim__id_float()* - Returns floating-point value given as argument. - - This API function is used for testing. One should not rely on its presence - in plugins. - - Parameters: ~ - • {flt} Value to return. - - Return: ~ - its argument. - -nvim__inspect_cell({grid}, {row}, {col}) *nvim__inspect_cell()* - NB: if your UI doesn't use hlstate, this will not return hlstate first - time. - -nvim__invalidate_glyph_cache() *nvim__invalidate_glyph_cache()* - For testing. The condition in schar_cache_clear_if_full is hard to reach, - so this function can be used to force a cache clear in a test. - -nvim__stats() *nvim__stats()* - Gets internal stats. - - Return: ~ - Map of various internal stats. - nvim_chan_send({chan}, {data}) *nvim_chan_send()* Send data to channel `id`. For a job, it writes it to the stdin of the process. For the stdio channel |channel-stdio|, it writes to Nvim's @@ -1572,6 +1479,99 @@ nvim_unsubscribe({event}) *nvim_unsubscribe()* Parameters: ~ • {event} Event type string +nvim__complete_set({index}, {opts}) *nvim__complete_set()* + EXPERIMENTAL: this API may change in the future. + + Sets info for the completion item at the given index. If the info text was + shown in a window, returns the window and buffer ids, or empty dict if not + shown. + + Parameters: ~ + • {index} Completion candidate index + • {opts} Optional parameters. + • info: (string) info text. + + Return: ~ + Dictionary containing these keys: + • winid: (number) floating window id + • bufnr: (number) buffer id in floating window + +nvim__get_runtime({pat}, {all}, {opts}) *nvim__get_runtime()* + Find files in runtime directories + + Attributes: ~ + |api-fast| + + Parameters: ~ + • {pat} pattern of files to search for + • {all} whether to return all matches or only the first + • {opts} is_lua: only search Lua subdirs + + Return: ~ + list of absolute paths to the found files + +nvim__id({obj}) *nvim__id()* + Returns object given as argument. + + This API function is used for testing. One should not rely on its presence + in plugins. + + Parameters: ~ + • {obj} Object to return. + + Return: ~ + its argument. + +nvim__id_array({arr}) *nvim__id_array()* + Returns array given as argument. + + This API function is used for testing. One should not rely on its presence + in plugins. + + Parameters: ~ + • {arr} Array to return. + + Return: ~ + its argument. + +nvim__id_dictionary({dct}) *nvim__id_dictionary()* + Returns dictionary given as argument. + + This API function is used for testing. One should not rely on its presence + in plugins. + + Parameters: ~ + • {dct} Dictionary to return. + + Return: ~ + its argument. + +nvim__id_float({flt}) *nvim__id_float()* + Returns floating-point value given as argument. + + This API function is used for testing. One should not rely on its presence + in plugins. + + Parameters: ~ + • {flt} Value to return. + + Return: ~ + its argument. + +nvim__inspect_cell({grid}, {row}, {col}) *nvim__inspect_cell()* + NB: if your UI doesn't use hlstate, this will not return hlstate first + time. + +nvim__invalidate_glyph_cache() *nvim__invalidate_glyph_cache()* + For testing. The condition in schar_cache_clear_if_full is hard to reach, + so this function can be used to force a cache clear in a test. + +nvim__stats() *nvim__stats()* + Gets internal stats. + + Return: ~ + Map of various internal stats. + ============================================================================== Vimscript Functions *api-vimscript* -- cgit From cb24a3907c8d24a898d99042f0f16c8919a2e7ab Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 30 Apr 2024 09:37:45 -0700 Subject: docs: format vim_diff.txt for "flow" layout #28584 --- runtime/doc/vim_diff.txt | 616 +++++++++++++++++++++++------------------------ 1 file changed, 298 insertions(+), 318 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 8ddad66e23..0e5232bbf9 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -1,19 +1,19 @@ *vim_diff.txt* Nvim - NVIM REFERENCE MANUAL + NVIM REFERENCE MANUAL -Differences between Nvim and Vim *vim-differences* +Differences between Nvim and Vim *vim-differences* Nvim differs from Vim in many ways, although editor and Vimscript (not Vim9script) features are mostly identical. This document is a complete and centralized reference of the differences. - Type |gO| to see the table of contents. + Type |gO| to see the table of contents. ============================================================================== -Configuration *nvim-config* +Configuration *nvim-config* User configuration and data files are found in standard |base-directories| (see also |$NVIM_APPNAME|). Note in particular: @@ -24,7 +24,7 @@ User configuration and data files are found in standard |base-directories| session information. |shada| ============================================================================== -Defaults *nvim-defaults* +Defaults *nvim-defaults* - Filetype detection is enabled by default. This can be disabled by adding ":filetype off" to |init.vim|. @@ -99,7 +99,7 @@ Defaults *nvim-defaults* - |g:vimsyn_embed| defaults to "l" to enable Lua highlighting DEFAULT MOUSE - *default-mouse* *disable-mouse* + *default-mouse* *disable-mouse* By default the mouse is enabled, and opens a |popup-menu| with standard actions ("Cut", "Copy", "Paste", …). Mouse is NOT enabled in |command-mode| or the |more-prompt|, so you can temporarily disable it just by @@ -123,7 +123,7 @@ To remove the "How-to disable mouse" menu item and the separator above it: >vim aunmenu PopUp.-1- < DEFAULT MAPPINGS - *default-mappings* + *default-mappings* Nvim creates the following default mappings at |startup|. You can disable any of these in your config by simply removing the mapping, e.g. ":unmap Y". @@ -151,7 +151,7 @@ of these in your config by simply removing the mapping, e.g. ":unmap Y". - K |K-lsp-default| DEFAULT AUTOCOMMANDS - *default-autocmds* + *default-autocmds* Default autocommands exist in the following groups. Use ":autocmd! {group}" to remove them and ":autocmd {group}" to see how they're defined. @@ -175,7 +175,7 @@ nvim_swapfile: swapfile…" message. ============================================================================== -New Features *nvim-features* +New Features *nvim-features* MAJOR COMPONENTS @@ -200,7 +200,7 @@ USER EXPERIENCE Working intuitively and consistently is a major goal of Nvim. - *feature-compile* + *feature-compile* - Nvim always includes ALL features, in contrast to Vim (which ships various combinations of 100+ optional features). |feature-compile| Think of it as a leaner version of Vim's "HUGE" build. This reduces surface area for bugs, @@ -247,74 +247,72 @@ by Nvim developers. FEATURES Command-line: - The expression prompt (|@=|, |c_CTRL-R_=|, |i_CTRL-R_=|) is highlighted +- The expression prompt (|@=|, |c_CTRL-R_=|, |i_CTRL-R_=|) is highlighted using a built-in Vimscript expression parser. |expr-highlight| - *E5408* *E5409* - |input()|, |inputdialog()| support custom highlighting. |input()-highlight| - *g:Nvim_color_cmdline* - (Experimental) Command-line (|:|) is colored by callback defined in - `g:Nvim_color_cmdline` (this callback is for testing only, and will be - removed in the future). +- *E5408* *E5409* |input()|, |inputdialog()| support custom highlighting. + |input()-highlight| +- (Experimental) *g:Nvim_color_cmdline* Command-line (|:|) is colored by + callback defined in `g:Nvim_color_cmdline` (this callback is for testing + only, and will be removed in the future). Commands: - |:checkhealth| - |:drop| is always available - |:Man| is available by default, with many improvements such as completion - |:match| can be invoked before highlight group is defined - |:source| works with Lua +- |:checkhealth| +- |:drop| is always available +- |:Man| is available by default, with many improvements such as completion +- |:match| can be invoked before highlight group is defined +- |:source| works with Lua User commands can support |:command-preview| to show results as you type - |:write| with "++p" flag creates parent directories. +- |:write| with "++p" flag creates parent directories. Events: - |RecordingEnter| - |RecordingLeave| - |SearchWrapped| - |Signal| - |TabNewEntered| - |TermClose| - |TermOpen| - |UIEnter| - |UILeave| +- |RecordingEnter| +- |RecordingLeave| +- |SearchWrapped| +- |Signal| +- |TabNewEntered| +- |TermClose| +- |TermOpen| +- |UIEnter| +- |UILeave| Functions: - |dictwatcheradd()| notifies a callback whenever a |Dict| is modified - |dictwatcherdel()| - |menu_get()| - |msgpackdump()|, |msgpackparse()| provide msgpack de/serialization - |stdpath()| - |system()|, |systemlist()| can run {cmd} directly (without 'shell') - |matchadd()| can be called before highlight group is defined - |tempname()| tries to recover if the Nvim |tempdir| disappears. - |writefile()| with "p" flag creates parent directories. +- |dictwatcheradd()| notifies a callback whenever a |Dict| is modified +- |dictwatcherdel()| +- |menu_get()| +- |msgpackdump()|, |msgpackparse()| provide msgpack de/serialization +- |stdpath()| +- |system()|, |systemlist()| can run {cmd} directly (without 'shell') +- |matchadd()| can be called before highlight group is defined +- |tempname()| tries to recover if the Nvim |tempdir| disappears. +- |writefile()| with "p" flag creates parent directories. Highlight groups: - |highlight-blend| controls blend level for a highlight group - |expr-highlight| highlight groups (prefixed with "Nvim") - |hl-NormalFloat| highlights floating window - |hl-FloatBorder| highlights border of a floating window - |hl-FloatTitle| highlights title of a floating window - |hl-FloatFooter| highlights footer of a floating window - |hl-NormalNC| highlights non-current windows - |hl-MsgArea| highlights messages/cmdline area - |hl-MsgSeparator| highlights separator for scrolled messages - |hl-Substitute| - |hl-TermCursor| - |hl-TermCursorNC| - |hl-WinSeparator| highlights window separators - |hl-Whitespace| highlights 'listchars' whitespace - |hl-WinBar| highlights 'winbar' - |hl-WinBarNC| highlights non-current window 'winbar' +- |highlight-blend| controls blend level for a highlight group +- |expr-highlight| highlight groups (prefixed with "Nvim") +- |hl-NormalFloat| highlights floating window +- |hl-FloatBorder| highlights border of a floating window +- |hl-FloatTitle| highlights title of a floating window +- |hl-FloatFooter| highlights footer of a floating window +- |hl-NormalNC| highlights non-current windows +- |hl-MsgArea| highlights messages/cmdline area +- |hl-MsgSeparator| highlights separator for scrolled messages +- |hl-Substitute| +- |hl-TermCursor| +- |hl-TermCursorNC| +- |hl-WinSeparator| highlights window separators +- |hl-Whitespace| highlights 'listchars' whitespace +- |hl-WinBar| highlights 'winbar' +- |hl-WinBarNC| highlights non-current window 'winbar' Input/Mappings: - ALT (|META|) chords always work (even in the |TUI|). Map |, , , , , , , , etc. - Case-sensitive: and are two different keycodes. - - ALT may behave like if not mapped. |i_ALT| |v_ALT| |c_ALT| + - Case-sensitive: and are two different keycodes. +- ALT may behave like if not mapped. |i_ALT| |v_ALT| |c_ALT| Normal commands: - |gO| shows a filetype-defined "outline" of the current buffer. - |Q| replays the last recorded macro instead of switching to Ex mode (|gQ|). +- |gO| shows a filetype-defined "outline" of the current buffer. +- |Q| replays the last recorded macro instead of switching to Ex mode (|gQ|). Options: @@ -352,80 +350,73 @@ string options work. - 'winhighlight' window-local highlights Providers: - If a Python interpreter is available on your `$PATH`, |:python| and +- If a Python interpreter is available on your `$PATH`, |:python| and |:python3| are always available. See |provider-python|. Shell: - Shell output (|:!|, |:make|, …) is always routed through the UI, so it +- Shell output (|:!|, |:make|, …) is always routed through the UI, so it cannot "mess up" the screen. (You can still use "chansend(v:stderr,…)" if you want to mess up the screen :) - - Nvim throttles (skips) messages from shell commands (|:!|, |:grep|, |:make|) +- Nvim throttles (skips) messages from shell commands (|:!|, |:grep|, |:make|) if there is too much output. No data is lost, this only affects display and improves performance. |:terminal| output is never throttled. - - |:!| does not support "interactive" commands. Use |:terminal| instead. +- |:!| does not support "interactive" commands. Use |:terminal| instead. (GUI Vim has a similar limitation, see ":help gui-pty" in Vim.) - - :!start is not special-cased on Windows. - - |system()| does not support writing/reading "backgrounded" commands. |E5677| +- :!start is not special-cased on Windows. +- |system()| does not support writing/reading "backgrounded" commands. |E5677| Signs: - Signs are removed if the associated line is deleted. - Signs placed twice with the same identifier in the same group are moved. +- Signs are removed if the associated line is deleted. +- Signs placed twice with the same identifier in the same group are moved. Startup: - |-e| and |-es| invoke the same "improved Ex mode" as -E and -Es. - |-E| and |-Es| read stdin as text (into buffer 1). - |-es| and |-Es| have improved behavior: +- |-e| and |-es| invoke the same "improved Ex mode" as -E and -Es. +- |-E| and |-Es| read stdin as text (into buffer 1). +- |-es| and |-Es| have improved behavior: - Quits automatically, don't need "-c qa!". - Skips swap-file dialog. - |-s| reads Normal commands from stdin if the script name is "-". - Reading text (instead of commands) from stdin |--|: +- |-s| reads Normal commands from stdin if the script name is "-". +- Reading text (instead of commands) from stdin |--|: - works by default: "-" file is optional - works in more cases: |-Es|, file args TUI: - *:set-termcap* - Start Nvim with 'verbose' level 3 to show terminal capabilities: > - nvim -V3 + *:set-termcap* +- Start Nvim with 'verbose' level 3 to show terminal capabilities: > + nvim -V3 < - *'term'* *E529* *E530* *E531* - 'term' reflects the terminal type derived from |$TERM| and other environment + *'term'* *E529* *E530* *E531* +- 'term' reflects the terminal type derived from |$TERM| and other environment checks. For debugging only; not reliable during startup. >vim - :echo &term -< "builtin_x" means one of the |builtin-terms| was chosen, because the expected + :echo &term +- "builtin_x" means one of the |builtin-terms| was chosen, because the expected terminfo file was not found on the system. - - Nvim will use 256-colour capability on Linux virtual terminals. Vim uses +- Nvim will use 256-colour capability on Linux virtual terminals. Vim uses only 8 colours plus bright foreground on Linux VTs. - - Vim combines what is in its |builtin-terms| with what it reads from terminfo, +- Vim combines what is in its |builtin-terms| with what it reads from terminfo, and has a 'ttybuiltin' setting to control how that combination works. Nvim uses one or the other, it does not attempt to merge the two. UI/Display: - |Visual| selection highlights the character at cursor. |visual-use| - - messages: When showing messages longer than 'cmdheight', only +- |Visual| selection highlights the character at cursor. |visual-use| +- messages: When showing messages longer than 'cmdheight', only scroll the message lines, not the entire screen. The separator line is decorated by |hl-MsgSeparator| and the "msgsep" flag of 'fillchars'. *msgsep* Variables: - |v:progpath| is always absolute ("full") - |v:windowid| is always available (for use by external UIs) - |OptionSet| autocommand args |v:option_new|, |v:option_old|, - |v:option_oldlocal|, |v:option_oldglobal| have the type of the option +- |v:progpath| is always absolute ("full") +- |v:windowid| is always available (for use by external UIs) +- |OptionSet| autocommand args |v:option_new|, |v:option_old|, +- |v:option_oldlocal|, |v:option_oldglobal| 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. Vimscript: - |:redir| nested in |execute()| works. +- |:redir| nested in |execute()| works. ============================================================================== -Upstreamed features *nvim-upstreamed* +Upstreamed features *nvim-upstreamed* These Nvim features were later integrated into Vim. @@ -440,45 +431,44 @@ These Nvim features were later integrated into Vim. - 'statusline' supports unlimited alignment sections ============================================================================== -Other changes *nvim-changed* +Other changes *nvim-changed* This section documents various low-level behavior changes. |mkdir()| behaviour changed: -1. Assuming /tmp/foo does not exist and /tmp can be written to - mkdir('/tmp/foo/bar', 'p', 0700) will create both /tmp/foo and /tmp/foo/bar - with 0700 permissions. Vim mkdir will create /tmp/foo with 0755. -2. If you try to create an existing directory with `'p'` (e.g. mkdir('/', - 'p')) mkdir() will silently exit. In Vim this was an error. -3. mkdir() error messages now include strerror() text when mkdir fails. +- 1. Assuming /tmp/foo does not exist and /tmp can be written to + mkdir('/tmp/foo/bar', 'p', 0700) will create both /tmp/foo and + /tmp/foo/bar with 0700 permissions. Vim mkdir will create /tmp/foo with + 0755. +- 2. If you try to create an existing directory with `'p'` (e.g. mkdir('/', + 'p')) mkdir() will silently exit. In Vim this was an error. +- 3. mkdir() error messages now include strerror() text when mkdir fails. |string()| and |:echo| behaviour changed: -1. No maximum recursion depth limit is applied to nested container - structures. -2. |string()| fails immediately on nested containers, not when recursion limit - was exceeded. -3. When |:echo| encounters duplicate containers like >vim - +- 1. No maximum recursion depth limit is applied to nested container + structures. +- 2. |string()| fails immediately on nested containers, not when recursion + limit was exceeded. +- 3. When |:echo| encounters duplicate containers like >vim let l = [] echo [l, l] -< - it does not use "[...]" (was: "[[], [...]]", now: "[[], []]"). "..." is - only used for recursive containers. -4. |:echo| printing nested containers adds "@level" after "..." designating - the level at which recursive container was printed: |:echo-self-refer|. - Same thing applies to |string()| (though it uses construct like - "{E724@level}"), but this is not reliable because |string()| continues to - error out. -5. Stringifyed infinite and NaN values now use |str2float()| and can be evaled - back. -6. (internal) Trying to print or stringify VAR_UNKNOWN in Vim results in - nothing, E908, in Nvim it is internal error. +< it does not use "[...]" (was: "[[], [...]]", now: "[[], []]"). "..." is + only used for recursive containers. +- 4. |:echo| printing nested containers adds "@level" after "..." designating + the level at which recursive container was printed: |:echo-self-refer|. + Same thing applies to |string()| (though it uses construct like + "{E724@level}"), but this is not reliable because |string()| continues to + error out. +- 5. Stringifyed infinite and NaN values now use |str2float()| and can be + evaled back. +- 6. (internal) Trying to print or stringify VAR_UNKNOWN in Vim results in + nothing, E908, in Nvim it is internal error. |json_decode()| behaviour changed: -1. It may output |msgpack-special-dict|. -2. |msgpack-special-dict| is emitted also in case of duplicate keys, while in - Vim it errors out. -3. It accepts only valid JSON. Trailing commas are not accepted. +- 1. It may output |msgpack-special-dict|. +- 2. |msgpack-special-dict| is emitted also in case of duplicate keys, while + in Vim it errors out. +- 3. It accepts only valid JSON. Trailing commas are not accepted. |json_encode()| behaviour slightly changed: now |msgpack-special-dict| values are accepted, but |v:none| is not. @@ -522,38 +512,37 @@ Lua interface (|lua.txt|): 'runtimepath'. |lua-module-load| Commands: - |:doautocmd| does not warn about "No matching autocommands". - |:wincmd| accepts a count. - `:write!` does not show a prompt if the file was updated externally. - |:=| does not accept |ex-flags|. With an arg it is equivalent to |:lua=| +- |:doautocmd| does not warn about "No matching autocommands". +- |:wincmd| accepts a count. +- `:write!` does not show a prompt if the file was updated externally. +- |:=| does not accept |ex-flags|. With an arg it is equivalent to |:lua=| Command-line: - The meanings of arrow keys do not change depending on 'wildoptions'. +- The meanings of arrow keys do not change depending on 'wildoptions'. Functions: - |input()| and |inputdialog()| support for each other’s features (return on +- |input()| and |inputdialog()| support for each other’s features (return on cancel and completion respectively) via dictionary argument (replaces all other arguments if used), and "cancelreturn" can have any type if passed in a dictionary. - |input()| and |inputdialog()| support user-defined cmdline highlighting. +- |input()| and |inputdialog()| support user-defined cmdline highlighting. Highlight groups: - |hl-ColorColumn|, |hl-CursorColumn| are lower priority than most other +- |hl-ColorColumn|, |hl-CursorColumn| are lower priority than most other groups - |hl-CurSearch| highlights match under cursor instead of last match found +- |hl-CurSearch| highlights match under cursor instead of last match found using |n| or |N| - |hl-CursorLine| is low-priority unless foreground color is set - |hl-VertSplit| superseded by |hl-WinSeparator| - Highlight groups names are allowed to contain `@` characters. - It is an error to define a highlight group with a name that doesn't match - the regexp `[a-zA-Z0-9_.@-]*` (see |group-name|). - -Macro/|recording| behavior - Replay of a macro recorded during :lmap produces the same actions as when it +- |hl-CursorLine| is low-priority unless foreground color is set +- |hl-VertSplit| superseded by |hl-WinSeparator| +- Highlight groups names are allowed to contain `@` characters. + - It is an error to define a highlight group with a name that doesn't match + the regexp `[a-zA-Z0-9_.@-]*` (see |group-name|). + +Macro (|recording|) behavior: +- Replay of a macro recorded during :lmap produces the same actions as when it was recorded. In Vim if a macro is recorded while using :lmap'ped keys then the behaviour during record and replay differs. - - 'keymap' is implemented via :lmap instead of :lnoremap so that you can use +- 'keymap' is implemented via :lmap instead of :lnoremap so that you can use macros and 'keymap' at the same time. This also means you can use |:imap| on the results of keys from 'keymap'. @@ -564,13 +553,13 @@ Mappings: lhs of a mapping. Motion: - The |jumplist| avoids useless/phantom jumps. +- The |jumplist| avoids useless/phantom jumps. Performance: - Folds are not updated during insert-mode. +- Folds are not updated during insert-mode. Syntax highlighting: - syncolor.vim has been removed. Nvim now sets up default highlighting groups +- syncolor.vim has been removed. Nvim now sets up default highlighting groups automatically for both light and dark backgrounds, regardless of whether or not syntax highlighting is enabled. This means that |:syntax-on| and |:syntax-enable| are now identical. Users who previously used an @@ -578,10 +567,10 @@ Syntax highlighting: colorscheme. |:colorscheme| Vimscript compatibility: - `count` does not alias to |v:count| - `errmsg` does not alias to |v:errmsg| - `shell_error` does not alias to |v:shell_error| - `this_session` does not alias to |v:this_session| +- `count` does not alias to |v:count| +- `errmsg` does not alias to |v:errmsg| +- `shell_error` does not alias to |v:shell_error| +- `this_session` does not alias to |v:this_session| Working directory (Vim implemented some of these after Nvim): - |DirChanged| and |DirChangedPre| can be triggered when switching to another @@ -600,7 +589,7 @@ Autocommands: instead of the Primary Device Attributes response. |v:termresponse| ============================================================================== -Missing features *nvim-missing* +Missing features *nvim-missing* These legacy Vim features are not yet implemented: @@ -610,75 +599,75 @@ These legacy Vim features are not yet implemented: - *'previewpopup'* ============================================================================== -Removed legacy features *nvim-removed* +Removed legacy features *nvim-removed* These Vim features were intentionally removed from Nvim. Aliases: - ex (alias for "nvim -e") - exim (alias for "nvim -E") - gex (GUI) - gview (GUI) - gvim (GUI) - gvimdiff (GUI) - rgview (GUI) - rgvim (GUI) - rview - rvim - view (alias for "nvim -R") - vimdiff (alias for "nvim -d" |diff-mode|) +- ex (alias for "nvim -e") +- exim (alias for "nvim -E") +- gex (GUI) +- gview (GUI) +- gvim (GUI) +- gvimdiff (GUI) +- rgview (GUI) +- rgvim (GUI) +- rview +- rvim +- view (alias for "nvim -R") +- vimdiff (alias for "nvim -d" |diff-mode|) Commands: - :behave - :fixdel - *hardcopy* `:hardcopy` was removed. Instead, use `:TOhtml` and print the +- :behave +- :fixdel +- *hardcopy* `:hardcopy` was removed. Instead, use `:TOhtml` and print the resulting HTML using a web browser or other HTML viewer. - :helpfind - :mode (no longer accepts an argument) - :open - :Print - :promptfind - :promptrepl - :scriptversion (always version 1) - :shell - :sleep! (does not hide the cursor; same as :sleep) - :smile - :tearoff - :cstag - :cscope - :lcscope - :scscope - :Vimuntar - The old `:TOhtml`, replaced by a Lua version (contains many differences) +- :helpfind +- :mode (no longer accepts an argument) +- :open +- :Print +- :promptfind +- :promptrepl +- :scriptversion (always version 1) +- :shell +- :sleep! (does not hide the cursor; same as :sleep) +- :smile +- :tearoff +- :cstag +- :cscope +- :lcscope +- :scscope +- :Vimuntar +- `:TOhtml` was replaced by a Lua version (with various differences) Compile-time features: - Emacs tags support - X11 integration (see |x11-selection|) +- Emacs tags support +- X11 integration (see |x11-selection|) Cscope: *cscope* - Cscope support was removed in favour of plugin-based solutions such as: +- Cscope support was removed in favour of plugin-based solutions such as: https://github.com/dhananjaylatkar/cscope_maps.nvim Eval: - Vim9script - *cscope_connection()* - *err_teapot()* - *js_encode()* - *js_decode()* - *v:none* (used by Vim to represent JavaScript "undefined"); use |v:null| instead. - *v:sizeofint* - *v:sizeoflong* - *v:sizeofpointer* +- Vim9script +- *cscope_connection()* +- *err_teapot()* +- *js_encode()* +- *js_decode()* +- *v:none* (used by Vim to represent JavaScript "undefined"); use |v:null| instead. +- *v:sizeofint* +- *v:sizeoflong* +- *v:sizeofpointer* Events: - *SafeStateAgain* - *SigUSR1* Use |Signal| to detect `SIGUSR1` signal instead. +- *SafeStateAgain* +- *SigUSR1* Use |Signal| to detect `SIGUSR1` signal instead. Highlight groups: - *hl-StatusLineTerm* *hl-StatusLineTermNC* are unnecessary because Nvim - supports 'winhighlight' window-local highlights. - For example, to mimic Vim's StatusLineTerm: >vim +- *hl-StatusLineTerm* *hl-StatusLineTermNC* are unnecessary because Nvim + supports 'winhighlight' window-local highlights. For example, to mimic Vim's + StatusLineTerm: >vim hi StatusLineTerm ctermfg=black ctermbg=green hi StatusLineTermNC ctermfg=green autocmd TermOpen,WinEnter * if &buftype=='terminal' @@ -687,48 +676,45 @@ Highlight groups: < Options: - *'aleph'* *'al'* - antialias - 'backspace' no longer supports number values. Instead: +- *'aleph'* *'al'* +- antialias +- '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` - *'balloondelay'* *'bdlay'* - *'ballooneval'* *'beval'* *'noballooneval'* *'nobeval'* - *'balloonexpr'* *'bexpr'* - bioskey (MS-DOS) - conskey (MS-DOS) - *'cp'* *'nocompatible'* *'nocp'* *'compatible'* (Nvim is always "nocompatible".) - 'cpoptions' (gjpkHw<*- and all POSIX flags were removed) - *'cryptmethod'* *'cm'* *'key'* (Vim encryption implementation) - cscopepathcomp - cscopeprg - cscopequickfix - cscoperelative - cscopetag - cscopetagorder - cscopeverbose - *'ed'* *'edcompatible'* *'noed'* *'noedcompatible'* - 'encoding' ("utf-8" is always used) - esckeys - 'guioptions' "t" flag was removed - *'guifontset'* *'gfs'* (Use 'guifont' instead.) - *'guipty'* (Nvim uses pipes and PTYs consistently on all platforms.) - 'highlight' (Names of builtin |highlight-groups| cannot be changed.) - *'hkmap'* *'hk'* use `set keymap=hebrew` instead. - *'hkmapp'* *'hkp'* use `set keymap=hebrewp` instead. - keyprotocol - - *'pastetoggle'* *'pt'* Just Paste It.™ |paste| is handled automatically when +- *'balloondelay'* *'bdlay'* +- *'ballooneval'* *'beval'* *'noballooneval'* *'nobeval'* +- *'balloonexpr'* *'bexpr'* +- bioskey (MS-DOS) +- conskey (MS-DOS) +- *'cp'* *'nocompatible'* *'nocp'* *'compatible'* (Nvim is always "nocompatible".) +- 'cpoptions' (gjpkHw<*- and all POSIX flags were removed) +- *'cryptmethod'* *'cm'* *'key'* (Vim encryption implementation) +- cscopepathcomp +- cscopeprg +- cscopequickfix +- cscoperelative +- cscopetag +- cscopetagorder +- cscopeverbose +- *'ed'* *'edcompatible'* *'noed'* *'noedcompatible'* +- 'encoding' ("utf-8" is always used) +- esckeys +- 'guioptions' "t" flag was removed +- *'guifontset'* *'gfs'* (Use 'guifont' instead.) +- *'guipty'* (Nvim uses pipes and PTYs consistently on all platforms.) +- 'highlight' (Names of builtin |highlight-groups| cannot be changed.) +- *'hkmap'* *'hk'* use `set keymap=hebrew` instead. +- *'hkmapp'* *'hkp'* use `set keymap=hebrewp` instead. +- keyprotocol +- *'pastetoggle'* *'pt'* Just Paste It.™ |paste| is handled automatically when you paste text using your terminal's or GUI's paste feature (CTRL-SHIFT-v, CMD-v (macOS), middle-click, …). - - *'imactivatefunc'* *'imaf'* - *'imactivatekey'* *'imak'* - *'imstatusfunc'* *'imsf'* - *'insertmode'* *'im'* Use the following script to emulate 'insertmode': ->vim +- *'imactivatefunc'* *'imaf'* +- *'imactivatekey'* *'imak'* +- *'imstatusfunc'* *'imsf'* +- *'insertmode'* *'im'* Use the following script to emulate 'insertmode': >vim autocmd BufWinEnter * startinsert inoremap inoremap @@ -754,50 +740,44 @@ Options: end end) EOF -< - *'macatsui'* - *'maxcombine'* *'mco'* - Nvim counts maximum character sizes in bytes, not codepoints. This is - guaranteed to be big enough to always fit all chars properly displayed - in vim with 'maxcombine' set to 6. - - You can still edit text with larger characters than fits in the screen buffer, - you just can't see them. Use |g8| or |ga|. See |mbyte-combining|. - - NOTE: the rexexp engine still has a hard-coded limit of considering +- *'macatsui'* +- *'maxcombine'* *'mco'* : Nvim counts maximum character sizes in bytes, not + codepoints. This is guaranteed to be big enough to always fit all chars + properly displayed in vim with 'maxcombine' set to 6. + - You can still edit text with larger characters than fits in the screen + buffer, you just can't see them. Use |g8| or |ga|. See |mbyte-combining|. + - NOTE: the rexexp engine still has a hard-coded limit of considering 6 composing chars only. - - *'maxmem'* Nvim delegates memory-management to the OS. - *'maxmemtot'* Nvim delegates memory-management to the OS. - printoptions - *'printdevice'* - *'printencoding'* - *'printexpr'* - *'printfont'* - *'printheader'* - *'printmbcharset'* - *'prompt'* *'noprompt'* - *'remap'* *'noremap'* - *'restorescreen'* *'rs'* *'norestorescreen'* *'nors'* - *'secure'* - Everything is allowed in 'exrc' files since they must be explicitly marked - trusted. - *'shelltype'* - 'shortmess' flags: *shm-f* *shm-n* *shm-x* *shm-i* (behave like always on) - *'shortname'* *'sn'* *'noshortname'* *'nosn'* - *'swapsync'* *'sws'* - *'termencoding'* *'tenc'* (Vim 7.4.852 also removed this for Windows) - *'terse'* *'noterse'* (Add "s" to 'shortmess' instead) - textauto - textmode - *'toolbar'* *'tb'* - *'toolbariconsize'* *'tbis'* - *'ttybuiltin'* *'tbi'* *'nottybuiltin'* *'notbi'* - *'ttyfast'* *'tf'* *'nottyfast'* *'notf'* - *'ttymouse'* *'ttym'* - *'ttyscroll'* *'tsl'* - *'ttytype'* *'tty'* - weirdinvert +- *'maxmem'* Nvim delegates memory-management to the OS. +- *'maxmemtot'* Nvim delegates memory-management to the OS. +- printoptions +- *'printdevice'* +- *'printencoding'* +- *'printexpr'* +- *'printfont'* +- *'printheader'* +- *'printmbcharset'* +- *'prompt'* *'noprompt'* +- *'remap'* *'noremap'* +- *'restorescreen'* *'rs'* *'norestorescreen'* *'nors'* +- *'secure'* : Everything is allowed in 'exrc' files, because they must be + explicitly marked as "trusted". +- *'shelltype'* +- 'shortmess' flags: *shm-f* *shm-n* *shm-x* *shm-i* (behave like always on) +- *'shortname'* *'sn'* *'noshortname'* *'nosn'* +- *'swapsync'* *'sws'* +- *'termencoding'* *'tenc'* (Vim 7.4.852 also removed this for Windows) +- *'terse'* *'noterse'* (Add "s" to 'shortmess' instead) +- textauto +- textmode +- *'toolbar'* *'tb'* +- *'toolbariconsize'* *'tbis'* +- *'ttybuiltin'* *'tbi'* *'nottybuiltin'* *'notbi'* +- *'ttyfast'* *'tf'* *'nottyfast'* *'notf'* +- *'ttymouse'* *'ttym'* +- *'ttyscroll'* *'tsl'* +- *'ttytype'* *'tty'* +- weirdinvert Plugins: @@ -813,47 +793,47 @@ Providers: - *if_tcl* Startup: - --literal (file args are always literal; to expand wildcards on Windows, use - |:n| e.g. `nvim +"n *"`) - Easy mode: eview, evim, nvim -y - Restricted mode: rview, rvim, nvim -Z - Vi mode: nvim -v +- `--literal`: File args are always literal; to expand wildcards on Windows, + use |:n| e.g. `nvim +"n *"` +- Easy mode: eview, evim, nvim -y +- Restricted mode: rview, rvim, nvim -Z +- Vi mode: nvim -v Test functions: - test_alloc_fail() - test_autochdir() - test_disable_char_avail() - test_feedinput() - test_garbagecollect_soon - test_getvalue() - test_ignore_error() - test_null_blob() - test_null_channel() - test_null_dict() - test_null_function() - test_null_job() - test_null_list() - test_null_partial() - test_null_string() - test_option_not_set() - test_override() - test_refcount() - test_scrollbar() - test_setmouse() - test_settime() - test_srand_seed() +- test_alloc_fail() +- test_autochdir() +- test_disable_char_avail() +- test_feedinput() +- test_garbagecollect_soon +- test_getvalue() +- test_ignore_error() +- test_null_blob() +- test_null_channel() +- test_null_dict() +- test_null_function() +- test_null_job() +- test_null_list() +- test_null_partial() +- test_null_string() +- test_option_not_set() +- test_override() +- test_refcount() +- test_scrollbar() +- test_setmouse() +- test_settime() +- test_srand_seed() TUI: - *t_xx* *termcap-options* *t_AB* *t_Sb* *t_vb* *t_SI* - Nvim does not have special `t_XX` options nor keycodes to configure + *t_xx* *termcap-options* *t_AB* *t_Sb* *t_vb* *t_SI* +- Nvim does not have special `t_XX` options nor keycodes to configure terminal capabilities. Instead Nvim treats the terminal as any other UI, e.g. 'guicursor' sets the terminal cursor style if possible. - *termcap* - Nvim never uses the termcap database, only |terminfo| and |builtin-terms|. + *termcap* +- Nvim never uses the termcap database, only |terminfo| and |builtin-terms|. - *xterm-8bit* *xterm-8-bit* - Xterm can be run in a mode where it uses true 8-bit CSI. Supporting this + *xterm-8bit* *xterm-8-bit* +- Xterm can be run in a mode where it uses true 8-bit CSI. Supporting this requires autodetection of whether the terminal is in UTF-8 mode or non-UTF-8 mode, as the 8-bit CSI character has to be written differently in each case. Vim issues a "request version" sequence to the terminal at startup and looks -- cgit From 54dfee8f0a68985a196857821af1add287b5991a Mon Sep 17 00:00:00 2001 From: Evgeni Chasnovski Date: Thu, 2 May 2024 11:25:21 +0300 Subject: docs: add `hl-SnippetTabstop` tag --- runtime/doc/lua.txt | 2 +- runtime/doc/syntax.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 071cdc8ef1..2b1d20feda 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -4338,7 +4338,7 @@ vim.snippet.expand({input}) *vim.snippet.expand()* https://microsoft.github.io/language-server-protocol/specification/#snippet_syntax for the specification of valid input. - Tabstops are highlighted with hl-SnippetTabstop. + Tabstops are highlighted with |hl-SnippetTabstop|. Parameters: ~ • {input} (`string`) diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 07d360ce29..00e42f7cf7 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -5054,6 +5054,8 @@ QuickFixLine Current |quickfix| item in the quickfix window. Combined with *hl-Search* Search Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out. + *hl-SnippetTabstop* +SnippetTabstop Tabstops in snippets. |vim.snippet| *hl-SpecialKey* SpecialKey Unprintable characters: Text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace| -- cgit From d5063f4b290e1c4262f7ced6d425ff2d7a2e2045 Mon Sep 17 00:00:00 2001 From: Yi Ming Date: Thu, 2 May 2024 21:16:20 +0800 Subject: feat(lsp): vim.lsp.inlay_hint.enable(nil) applies to all buffers #28543 Problem: Inlay hints `enable()` does not fully implement the `:help dev-lua` guidelines: Interface conventions ~ - 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()| Solution: Implement globally enabling inlay hints. * refactor(lsp): do not rely on `enable` to create autocmds * refactor(lsp): make `bufstates` a defaulttable * refactor(lsp): make `bufstate` inherit values from `globalstate` * feat(lsp): `vim.lsp.inlay_hints` now take effect on all buffers by default * test(lsp): add basic tests for enable inlay hints for all buffers * test(lsp): add test cases cover more than one buffer --- runtime/doc/lsp.txt | 4 ++-- runtime/doc/news.txt | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index d199634bae..06fec15f3c 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1611,8 +1611,8 @@ enable({enable}, {filter}) *vim.lsp.inlay_hint.enable()* Parameters: ~ • {enable} (`boolean?`) true/nil to enable, false to disable • {filter} (`table?`) Optional filters |kwargs|, or `nil` for all. - • {bufnr} (`integer?`) Buffer number, or 0/nil for current - buffer. + • {bufnr} (`integer?`) Buffer number, or 0 for current + buffer, or nil for all. get({filter}) *vim.lsp.inlay_hint.get()* Get the list of inlay hints, (optionally) restricted by buffer or range. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index bae0030a14..4d06f3df8d 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -148,6 +148,8 @@ BREAKING CHANGES IN HEAD *news-breaking-dev* The following changes to UNRELEASED features were made during the development cycle (Nvim HEAD, the "master" branch). +• `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 -- cgit From 037ea6e786b5d05f4a8965e4c2ba6aa60ec7c01a Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Wed, 10 Apr 2024 11:42:46 +0200 Subject: feat(api): add nvim__redraw for more granular redrawing Experimental and subject to future changes. Add a way to redraw certain elements that are not redrawn while Nvim is waiting for input, or currently have no API to do so. This API covers all that can be done with the :redraw* commands, in addition to the following new features: - Immediately move the cursor to a (non-current) window. - Target a specific window or buffer to mark for redraw. - Mark a buffer range for redraw (replaces nvim__buf_redraw_range()). - Redraw the 'statuscolumn'. --- runtime/doc/api.txt | 29 +++++++++++++++++++++++++++++ runtime/doc/various.txt | 6 +++++- 2 files changed, 34 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index d15230ba2d..86f4c3875c 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -1566,6 +1566,35 @@ nvim__invalidate_glyph_cache() *nvim__invalidate_glyph_cache()* For testing. The condition in schar_cache_clear_if_full is hard to reach, so this function can be used to force a cache clear in a test. +nvim__redraw({opts}) *nvim__redraw()* + EXPERIMENTAL: this API may change in the future. + + Instruct Nvim to redraw various components. + + Parameters: ~ + • {opts} Optional parameters. + • win: Target a specific |window-ID| as described below. + • buf: Target a specific buffer number as described below. + • flush: Update the screen with pending updates. + • valid: When present mark `win`, `buf`, or all windows for + redraw. When `true`, only redraw changed lines (useful for + decoration providers). When `false`, forcefully redraw. + • range: Redraw a range in `buf`, the buffer in `win` or the + current buffer (useful for decoration providers). Expects a + tuple `[first, last]` with the first and last line number of + the range, 0-based end-exclusive |api-indexing|. + • cursor: Immediately update cursor position on the screen in + `win` or the current window. + • statuscolumn: Redraw the 'statuscolumn' in `buf`, `win` or + all windows. + • statusline: Redraw the 'statusline' in `buf`, `win` or all + windows. + • winbar: Redraw the 'winbar' in `buf`, `win` or all windows. + • tabline: Redraw the 'tabline'. + + See also: ~ + • |:redraw| + nvim__stats() *nvim__stats()* Gets internal stats. diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index aa05d2bbb2..d41bdb5b00 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -14,6 +14,7 @@ Various commands *various* *CTRL-L* CTRL-L Clears and redraws the screen. The redraw may happen later, after processing typeahead. + See also |nvim__redraw()|. *CTRL-L-default* By default, also clears search highlighting |:nohlsearch| and updates diffs |:diffupdate|. @@ -21,6 +22,7 @@ CTRL-L Clears and redraws the screen. The redraw may happen *:mod* *:mode* :mod[e] Clears and redraws the screen. + See also |nvim__redraw()|. *:redr* *:redraw* :redr[aw][!] Redraws pending screen updates now, or the entire @@ -28,6 +30,7 @@ CTRL-L Clears and redraws the screen. The redraw may happen |:mode| or |CTRL-L|. Useful to update the screen during a script or function (or a mapping if 'lazyredraw' set). + See also |nvim__redraw()|. *:redraws* *:redrawstatus* :redraws[tatus][!] Redraws the status line and window bar of the current @@ -35,11 +38,12 @@ CTRL-L Clears and redraws the screen. The redraw may happen included. Redraws the commandline instead if it contains the 'ruler'. Useful if 'statusline' or 'winbar' includes an item that doesn't cause automatic updating. + See also |nvim__redraw()|. *:redrawt* *:redrawtabline* :redrawt[abline] Redraw the tabline. Useful to update the tabline when 'tabline' includes an item that doesn't trigger - automatic updating. + automatic updating. See also |nvim__redraw()|. *N* When entering a number: Remove the last digit. -- cgit From 350d81856473b45100d6b0e5920b757df1b4ad27 Mon Sep 17 00:00:00 2001 From: Yi Ming Date: Thu, 2 May 2024 22:26:07 +0800 Subject: feat(lsp): inlay_hint.is_enabled({filter}) #28523 vim.diagnostic.enable and vim.diagnostic.is_enabled() use the same pattern. --- runtime/doc/lsp.txt | 6 ++++-- runtime/doc/news.txt | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 06fec15f3c..27c0bd8f0f 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1645,13 +1645,15 @@ get({filter}) *vim.lsp.inlay_hint.get()* • {client_id} (`integer`) • {inlay_hint} (`lsp.InlayHint`) -is_enabled({bufnr}) *vim.lsp.inlay_hint.is_enabled()* +is_enabled({filter}) *vim.lsp.inlay_hint.is_enabled()* Note: ~ • This API is pre-release (unstable). Parameters: ~ - • {bufnr} (`integer?`) Buffer handle, or 0 for current + • {filter} (`table`) Optional filters |kwargs|, or `nil` for all. + • {bufnr} (`integer?`) Buffer number, or 0 for current + buffer, or nil for all. Return: ~ (`boolean`) diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 4d06f3df8d..78d5560878 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -148,6 +148,8 @@ BREAKING CHANGES IN HEAD *news-breaking-dev* 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 -- cgit From 40ce8577977fcdce8ad76863c70eb522e4cefd4d Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 3 May 2024 03:20:03 -0700 Subject: fix(vim.ui)!: change open() to return `result|nil, errmsg|nil` #28612 reverts e0d92b9cc20b58179599f53dfa74ca821935a539 #28502 Problem: `vim.ui.open()` has a `pcall()` like signature, under the assumption that this is the Lua idiom for returning result-or-error. However, the `result|nil, errmsg|nil` pattern: - has precedent in: - `io.open` - `vim.uv` (`:help luv-error-handling`) - has these advantages: - Can be used with `assert()`: ``` local result, err = assert(foobar()) ``` - Allows LuaLS to infer the type of `result`: ``` local result, err = foobar() if err then ... elseif result then ... end ``` Solution: - Revert to the `result|nil, errmsg|nil` pattern. - Document the pattern in our guidelines. --- runtime/doc/develop.txt | 5 +++++ runtime/doc/lua.txt | 8 ++++---- runtime/doc/news.txt | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index b843988b94..f2eef7b131 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -309,6 +309,11 @@ See also |dev-naming|. - 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`: > + ---@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| Interface conventions ~ diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 2b1d20feda..4f538f52ab 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2551,8 +2551,8 @@ vim.ui.open({path}) *vim.ui.open()* vim.ui.open("https://neovim.io/") vim.ui.open("~/path/to/file") -- Synchronous (wait until the process exits). - local ok, cmd = vim.ui.open("$VIMRUNTIME") - if ok then + local cmd, err = vim.ui.open("$VIMRUNTIME") + if cmd then cmd:wait() end < @@ -2561,8 +2561,8 @@ vim.ui.open({path}) *vim.ui.open()* • {path} (`string`) Path or URL to open Return (multiple): ~ - (`boolean`) false if command not found, else true. - (`vim.SystemObj|string`) Command object, or error message on failure + (`vim.SystemObj?`) Command object, or nil if not found. + (`string?`) Error message on failure, or nil on success. See also: ~ • |vim.system()| diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 78d5560878..3886dbdfb0 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -163,7 +163,7 @@ cycle (Nvim HEAD, the "master" branch). • Renamed vim.tbl_isarray() to vim.isarray(). -• Changed |vim.ui.open()| return-signature to match pcall() convention. +• Changed |vim.ui.open()| return-signature to match `result|nil, errormsg|nil` convention. • Renamed Iter:nextback() to Iter:pop() -- cgit From d50596e1e33354c9a69684ab358a4e98954e3934 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 3 May 2024 17:17:13 +0200 Subject: docs: deduplicate information in deprecated.txt Refer to `deprecated.txt` in `news.txt` in the deprecated section and order `deprecated.txt` according to which version a feature was deprecated in. --- runtime/doc/deprecated.txt | 136 +++++++++++++++++++++++++++++---------------- runtime/doc/news-0.9.txt | 30 +--------- runtime/doc/news.txt | 52 +---------------- 3 files changed, 90 insertions(+), 128 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index 622bce14b7..309d5b7d60 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -12,22 +12,100 @@ They should not be used in new scripts, and old scripts should be updated. ============================================================================== Deprecated features +DEPRECATED IN 0.10 *deprecated-0.10* + +• Configuring |diagnostic-signs| using |:sign-define| or |sign_define()|. Use + the "signs" key of |vim.diagnostic.config()| instead. + +• Checkhealth functions: + - *health#report_error* *vim.health.report_error()* Use |vim.health.error()| instead. + - *health#report_info* *vim.health.report_info()* Use |vim.health.info()| instead. + - *health#report_ok* *vim.health.report_ok()* Use |vim.health.ok()| instead. + - *health#report_start* *vim.health.report_start()* Use |vim.health.start()| instead. + - *health#report_warn* *vim.health.report_warn()* Use |vim.health.warn()| instead. + +• |API| functions: + - *nvim_buf_get_option()* Use |nvim_get_option_value()| instead. + - *nvim_buf_set_option()* Use |nvim_set_option_value()| instead. + - *nvim_call_atomic()* Use |nvim_exec_lua()| instead. + - *nvim_get_option()* Use |nvim_get_option_value()| instead. + - *nvim_set_option()* Use |nvim_set_option_value()| instead. + - *nvim_win_get_option()* Use |nvim_get_option_value()| instead. + - *nvim_win_set_option()* Use |nvim_set_option_value()| instead. + +• vim.diagnostic functions: + - *vim.diagnostic.disable()* Use |vim.diagnostic.enable()| + - *vim.diagnostic.is_disabled()* Use |vim.diagnostic.is_enabled()| + - Legacy signature: `vim.diagnostic.enable(buf:number, namespace:number)` + +• vim.lsp functions: + - *vim.lsp.util.get_progress_messages()* Use |vim.lsp.status()| instead. + - *vim.lsp.get_active_clients()* Use |vim.lsp.get_clients()| instead. + - *vim.lsp.for_each_buffer_client()* Use |vim.lsp.get_clients()| instead. + - *vim.lsp.util.trim_empty_lines()* Use |vim.split()| with `trimempty` instead. + - *vim.lsp.util.try_trim_markdown_code_blocks()* + - *vim.lsp.util.set_lines()* + - *vim.lsp.util.extract_completion_items()* + - *vim.lsp.util.parse_snippet()* + - *vim.lsp.util.text_document_completion_list_to_complete_items()* + - *vim.lsp.util.lookup_section()* Use |vim.tbl_get()| instead: > + local keys = vim.split(section, '.', { plain = true }) + local vim.tbl_get(table, unpack(keys)) + +• *vim.loop* Use |vim.uv| instead. + +• vim.treesitter functions: + - *LanguageTree:for_each_child()* Use |LanguageTree:children()| (non-recursive) instead. + +• The "term_background" UI option |ui-ext-options| is deprecated and no longer + populated. Background color detection is now performed in Lua by the Nvim + core, not the TUI. + +• Lua stdlib: + - *vim.tbl_add_reverse_lookup()* + - *vim.tbl_flatten()* Use |Iter:flatten()| instead. + - *vim.tbl_islist()* Use |vim.islist()| instead. + +DEPRECATED IN 0.9 *deprecated-0.9* + +• vim.treesitter functions + - *vim.treesitter.language.require_language()* Use |vim.treesitter.language.add()| instead. + - *vim.treesitter.get_node_at_pos()* Use |vim.treesitter.get_node()| instead. + - *vim.treesitter.get_node_at_cursor()* Use |vim.treesitter.get_node()| + and |TSNode:type()| instead. + +• |API| functions: + - *nvim_get_hl_by_name()* Use |nvim_get_hl()| instead. + - *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()| + +• Lua stdlib: + - *nvim_exec()* Use |nvim_exec2()| instead. + - *vim.pretty_print()* Use |vim.print()| instead. + +DEPRECATED IN 0.8 OR EARLIER + API - *nvim_buf_clear_highlight()* Use |nvim_buf_clear_namespace()| instead. - *nvim_buf_set_virtual_text()* Use |nvim_buf_set_extmark()| instead. - *nvim_command_output()* Use |nvim_exec2()| instead. -- *nvim_call_atomic()* Use |nvim_exec_lua()| instead. - *nvim_execute_lua()* Use |nvim_exec_lua()| instead. -- *nvim_get_hl_by_name()* Use |nvim_get_hl()| instead. -- *nvim_get_hl_by_id()* Use |nvim_get_hl()| instead. -- *nvim_exec()* Use |nvim_exec2()| instead. - *nvim_get_option_info()* Use |nvim_get_option_info2()| instead. -- *nvim_buf_get_option()* Use |nvim_get_option_value()| instead. -- *nvim_buf_set_option()* Use |nvim_set_option_value()| instead. -- *nvim_get_option()* Use |nvim_get_option_value()| instead. -- *nvim_set_option()* Use |nvim_set_option_value()| instead. -- *nvim_win_get_option()* Use |nvim_get_option_value()| instead. -- *nvim_win_set_option()* Use |nvim_set_option_value()| instead. COMMANDS - *:rv* *:rviminfo* Deprecated alias to |:rshada| command. @@ -61,11 +139,6 @@ FUNCTIONS - *buffer_name()* Obsolete name for |bufname()|. - *buffer_number()* Obsolete name for |bufnr()|. - *file_readable()* Obsolete name for |filereadable()|. -- *health#report_error* *vim.health.report_error()* Use |vim.health.error()| instead. -- *health#report_info* *vim.health.report_info()* Use |vim.health.info()| instead. -- *health#report_ok* *vim.health.report_ok()* Use |vim.health.ok()| instead. -- *health#report_start* *vim.health.report_start()* Use |vim.health.start()| instead. -- *health#report_warn* *vim.health.report_warn()* Use |vim.health.warn()| instead. - *highlight_exists()* Obsolete name for |hlexists()|. - *highlightID()* Obsolete name for |hlID()|. - *inputdialog()* Use |input()| instead. @@ -81,9 +154,6 @@ HIGHLIGHTS - *hl-VertSplit* Use |hl-WinSeparator| instead. LSP DIAGNOSTICS -- *vim.diagnostic.disable()* Use |vim.diagnostic.enable()| -- *vim.diagnostic.is_disabled()* Use |vim.diagnostic.is_enabled()| - For each of the functions below, use the corresponding function in |vim.diagnostic| instead (unless otherwise noted). For example, use |vim.diagnostic.get()| instead of |vim.lsp.diagnostic.get()|. @@ -144,39 +214,9 @@ LSP FUNCTIONS {async=false} instead. - *vim.lsp.buf.range_formatting()* Use |vim.lsp.formatexpr()| or |vim.lsp.buf.format()| instead. -- *vim.lsp.util.get_progress_messages()* Use |vim.lsp.status()| or access - `progress` of |vim.lsp.Client| -- *vim.lsp.get_active_clients()* Use |vim.lsp.get_clients()| -- *vim.lsp.for_each_buffer_client()* Use |vim.lsp.get_clients()| -- *vim.lsp.util.lookup_section()* Use |vim.tbl_get()| instead: > - local keys = vim.split(section, '.', { plain = true }) - local vim.tbl_get(table, unpack(keys)) -- *vim.lsp.util.trim_empty_lines()* Use |vim.split()| with `trimempty` instead. -- *vim.lsp.util.try_trim_markdown_code_blocks()* -- *vim.lsp.util.set_lines()* -- *vim.lsp.util.extract_completion_items()* -- *vim.lsp.util.parse_snippet()* -- *vim.lsp.util.text_document_completion_list_to_complete_items()* - -TREESITTER FUNCTIONS -- *vim.treesitter.language.require_language()* Use |vim.treesitter.language.add()| - instead. -- *vim.treesitter.get_node_at_pos()* Use |vim.treesitter.get_node()| - instead. -- *vim.treesitter.get_node_at_cursor()* Use |vim.treesitter.get_node()| - and |TSNode:type()| instead. -- *vim.treesitter.query.get_query()* Use |vim.treesitter.query.get()| - instead. -- *LanguageTree:for_each_child()* Use |LanguageTree:children()| - (non-recursive) instead. LUA - vim.register_keystroke_callback() Use |vim.on_key()| instead. -- *vim.pretty_print()* Use |vim.print()| instead. -- *vim.loop* Use |vim.uv| instead. -- *vim.tbl_add_reverse_lookup()* -- *vim.tbl_flatten()* Use |Iter:flatten()| instead. -- *vim.tbl_islist()* Use |vim.islist()| instead. NORMAL COMMANDS - *]f* *[f* Same as "gf". diff --git a/runtime/doc/news-0.9.txt b/runtime/doc/news-0.9.txt index f1f3ac6954..20c92a2750 100644 --- a/runtime/doc/news-0.9.txt +++ b/runtime/doc/news-0.9.txt @@ -290,34 +290,6 @@ The following deprecated functions or APIs were removed. ============================================================================== DEPRECATIONS -The following functions are now deprecated and will be removed in the next -release. - -• |vim.treesitter.language.add()| replaces `vim.treesitter.language.require_language()` - -• |vim.treesitter.get_node_at_pos()| and |vim.treesitter.get_node_at_cursor()| - are both deprecated in favor of |vim.treesitter.get_node()|. - -• `vim.api.nvim_get_hl_by_name()`, `vim.api.nvim_get_hl_by_id()` were deprecated, 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()` - -• |nvim_exec()| is now deprecated in favor of |nvim_exec2()|. - -• Renamed |vim.pretty_print()| to |vim.print()|. +See |deprecated-0.9|. vim:tw=78:ts=8:sw=2:et:ft=help:norl: diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 3886dbdfb0..9860e54828 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -556,56 +556,6 @@ The following deprecated functions or APIs were removed. ============================================================================== DEPRECATIONS *news-deprecations* -The following functions are now deprecated and will be removed in a future -release. - -• Configuring |diagnostic-signs| using |:sign-define| or |sign_define()|. Use - the "signs" key of |vim.diagnostic.config()| instead. - -• Checkhealth functions: - - |health#report_error|, |vim.health.report_error()| Use |vim.health.error()| instead. - - |health#report_info|, |vim.health.report_info()| Use |vim.health.info()| instead. - - |health#report_ok|, |vim.health.report_ok()| Use |vim.health.ok()| instead. - - |health#report_start|, |vim.health.report_start()| Use |vim.health.start()| instead. - - |health#report_warn|, |vim.health.report_warn()| Use |vim.health.warn()| instead. - -• |API| functions: - - |nvim_buf_get_option()| Use |nvim_get_option_value()| instead. - - |nvim_buf_set_option()| Use |nvim_set_option_value()| instead. - - nvim_call_atomic() Use |nvim_exec_lua()| instead. - - |nvim_get_option()| Use |nvim_get_option_value()| instead. - - |nvim_set_option()| Use |nvim_set_option_value()| instead. - - |nvim_win_get_option()| Use |nvim_get_option_value()| instead. - - |nvim_win_set_option()| Use |nvim_set_option_value()| instead. - -• vim.diagnostic functions: - - |vim.diagnostic.disable()| - - |vim.diagnostic.is_disabled()| - - Legacy signature: `vim.diagnostic.enable(buf:number, namespace:number)` - -• vim.lsp functions: - - |vim.lsp.util.get_progress_messages()| Use |vim.lsp.status()| instead. - - |vim.lsp.get_active_clients()| Use |vim.lsp.get_clients()| instead. - - |vim.lsp.for_each_buffer_client()| Use |vim.lsp.get_clients()| instead. - - |vim.lsp.util.trim_empty_lines()| Use |vim.split()| with `trimempty` instead. - - |vim.lsp.util.try_trim_markdown_code_blocks()| - - |vim.lsp.util.set_lines()| - - |vim.lsp.util.extract_completion_items()| - - |vim.lsp.util.parse_snippet()| - - |vim.lsp.util.text_document_completion_list_to_complete_items()| - -• `vim.loop` has been renamed to |vim.uv|. - -• vim.treesitter functions: - - |LanguageTree:for_each_child()| Use |LanguageTree:children()| (non-recursive) instead. - -• The "term_background" UI option |ui-ext-options| is deprecated and no longer - populated. Background color detection is now performed in Lua by the Nvim - core, not the TUI. - -• Lua stdlib: - - |vim.tbl_add_reverse_lookup()| - - |vim.tbl_flatten()| - - |vim.tbl_islist()| +See |deprecated-0.10|. vim:tw=78:ts=8:sw=2:et:ft=help:norl: -- cgit From e948d7feba240568b1c0ab9bcb37cc264666a67d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 4 May 2024 15:53:42 +0800 Subject: vim-patch:ad4881cb3c04 (#28636) runtime(doc): correct getscriptinfo() example (vim/vim#14718) When "sid" is specified, it returns a List with a single item. https://github.com/vim/vim/commit/ad4881cb3c04048242f69dc77af2dde889c9beea --- runtime/doc/builtin.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 588d1b7983..031d2d6fcd 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -3014,7 +3014,7 @@ getscriptinfo([{opts}]) *getscriptinfo()* Examples: >vim echo getscriptinfo({'name': 'myscript'}) - echo getscriptinfo({'sid': 15}).variables + echo getscriptinfo({'sid': 15})[0].variables < gettabinfo([{tabnr}]) *gettabinfo()* -- cgit From b024643ca7571cffb3dcc79c21dbccfe14aa3a6f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 6 May 2024 06:43:01 +0800 Subject: vim-patch:53753f6a4925 (#28647) runtime(doc): Fix typos in help documents closes: vim/vim#14720 https://github.com/vim/vim/commit/53753f6a49253cdb3f98f6461d3de3b07ed67451 Co-authored-by: h-east Co-authored-by: Christian Clason --- runtime/doc/change.txt | 2 +- runtime/doc/eval.txt | 4 ++++ runtime/doc/indent.txt | 2 +- runtime/doc/syntax.txt | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 0f362c0cd4..42d6bcfae0 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1296,7 +1296,7 @@ The expression must evaluate to a String. A Number is always automatically converted to a String. For the "p" and ":put" command, if the result is a Float it's converted into a String. If the result is a List each element is turned into a String and used as a line. A Dictionary is converted into a -String. A FuncRef results in an error message (use string() to convert). +String. A Funcref results in an error message (use string() to convert). If the "= register is used for the "p" command, the String is split up at characters. If the String ends in a , it is regarded as a linewise diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index ef416fe56f..7b4dba5a50 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2144,6 +2144,10 @@ text... :cons[t] {var-name} = {expr1} :cons[t] [{name1}, {name2}, ...] = {expr1} :cons[t] [{name}, ..., ; {lastname}] = {expr1} +:cons[t] {var-name} =<< [trim] [eval] {marker} +text... +text... +{marker} Similar to |:let|, but additionally lock the variable after setting the value. This is the same as locking the variable with |:lockvar| just after |:let|, thus: > diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index c20143bc6e..a890d531ac 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -1232,5 +1232,5 @@ By default, the yaml indent script does not try to detect multiline scalars. If you want to enable this, set the following variable: > let g:yaml_indent_multiline_scalar = 1 - +< vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 00e42f7cf7..b93733b721 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -477,7 +477,8 @@ Enables Stylus for ".astro" files. Default Value: "disable" NOTE: You need to install an external plugin to support stylus in astro files. -ASPPERL and ASPVBS *ft-aspperl-syntax* *ft-aspvbs-syntax* +ASPPERL *ft-aspperl-syntax* +ASPVBS *ft-aspvbs-syntax* `*.asp` and `*.asa` files could be either Perl or Visual Basic script. Since it's hard to detect this you can set two global variables to tell Vim what you are -- cgit From 783c1e596c35e44e9699e5a1881d3c8f5c4fc596 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 6 May 2024 04:42:30 -0700 Subject: refactor(snippet): rename exit() => stop() #28628 --- runtime/doc/develop.txt | 7 +++++++ runtime/doc/lua.txt | 6 +++--- runtime/doc/news.txt | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index f2eef7b131..7fc154441f 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -373,6 +373,9 @@ 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"?) - call: Calls a function + - cancel: Cancels or dismisses an event or interaction, typically + user-initiated and without error. (Compare "abort", which + cancels and signals error/failure.) - clear: Clears state but does not destroy the container - create: Creates a new (non-trivial) thing (TODO: rename to "def"?) - del: Deletes a thing (or group of things) @@ -388,10 +391,14 @@ Use existing common {verb} names (actions) if possible: - open: Opens something (a buffer, window, …) - parse: Parses something into a structured form - set: Sets a thing (or group of things) + - start: Spin up a long-lived process. Prefer "enable" except when + "start" is obviously more appropriate. + - stop: Inverse of "start". Teardown a long-lived process. - try_{verb}: Best-effort operation, failure returns null or error obj Do NOT use these deprecated verbs: - disable: Prefer `enable(enable: boolean)`. + - exit: Prefer "cancel" (or "stop" if appropriate). - is_disabled: Prefer `is_enabled()`. - list: Redundant with "get" - notify: Redundant with "print", "echo" diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 4f538f52ab..e24f5dfc7e 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -4330,9 +4330,6 @@ vim.snippet.active({filter}) *vim.snippet.active()* Return: ~ (`boolean`) -vim.snippet.exit() *vim.snippet.exit()* - Exits the current snippet. - vim.snippet.expand({input}) *vim.snippet.expand()* Expands the given snippet text. Refer to https://microsoft.github.io/language-server-protocol/specification/#snippet_syntax @@ -4361,6 +4358,9 @@ vim.snippet.jump({direction}) *vim.snippet.jump()* • {direction} (`vim.snippet.Direction`) Navigation direction. -1 for previous, 1 for next. +vim.snippet.stop() *vim.snippet.stop()* + Exits the current snippet. + ============================================================================== Lua module: vim.text *vim.text* diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 9860e54828..07ea31e1df 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -176,6 +176,8 @@ cycle (Nvim HEAD, the "master" branch). • Renamed nvim_complete_set to nvim__complete_set and marked it as experimental. +• Renamed vim.snippet.exit() to vim.snippet.stop(). + ============================================================================== NEW FEATURES *news-features* -- cgit From bb032d952bfc692062fceb764ff2742c5bdd3324 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Mon, 6 May 2024 08:13:50 -0500 Subject: revert: default LSP mappings (#28649) Revert the default LSP mappings before the 0.10 release as these might need some further consideration. In particular, it's not clear if "c" prefixed maps in Normal mode are acceptable as defaults since they interfere with text objects or operator ranges. We will re-introduce default mappings at the beginning of the 0.11 release cycle, this reversion is only for the imminent 0.10 release. --- runtime/doc/lsp.txt | 17 ++++------------- runtime/doc/news.txt | 6 ------ runtime/doc/vim_diff.txt | 6 ------ 3 files changed, 4 insertions(+), 25 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 27c0bd8f0f..40a80b1261 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -61,18 +61,6 @@ options are not restored when the LSP client is stopped or detached. - |K| is mapped to |vim.lsp.buf.hover()| unless |'keywordprg'| is customized or a custom keymap for `K` exists. - *crr* *crn* *i_CTRL-S* *v_CTRL-R_CTRL-R* *v_CTRL-R_r* -Some keymaps are created unconditionally when Nvim starts: -- "crn" is mapped in Normal mode to |vim.lsp.buf.rename()| -- "crr" is mapped in Normal mode to |vim.lsp.buf.code_action()| -- CTRL-R CTRL-R (also "CTRL-R r") is mapped in Visual mode to - |vim.lsp.buf.code_action()| -- "gr" is mapped in Normal mode to |vim.lsp.buf.references()| |gr-default| -- CTRL-S is mapped in Insert mode to |vim.lsp.buf.signature_help()| - -If not wanted, these keymaps can be removed at any time using -|vim.keymap.del()| or |:unmap|. - *lsp-defaults-disable* To override the above defaults, set or unset the options on |LspAttach|: >lua @@ -92,8 +80,11 @@ Example: >lua vim.api.nvim_create_autocmd('LspAttach', { callback = function(args) local client = vim.lsp.get_client_by_id(args.data.client_id) + if client.supports_method('textDocument/rename') then + -- Create a keymap for vim.lsp.buf.rename() + end if client.supports_method('textDocument/implementation') then - vim.keymap.set('n', 'g', vim.lsp.buf.implementation, { buffer = args.buf }) + -- Create a keymap for vim.lsp.buf.implementation end end, }) diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 07ea31e1df..ed994472ac 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -418,12 +418,6 @@ The following changes to existing APIs or features add new behavior. • 'shortmess' includes the "C" flag. • 'grepprg' uses the -H and -I flags for grep by default, and defaults to using ripgrep if available. - • |crn| in Normal mode maps to |vim.lsp.buf.rename()|. - • |crr| in Normal mode maps to |vim.lsp.buf.code_action()|. - • |v_CTRL-R_CTRL-R| in Visual mode maps to |vim.lsp.buf.code_action()|. - • "gr" in Normal mode maps to |vim.lsp.buf.references()| |gr-default| - • |i_CTRL-S| in Insert mode maps to |vim.lsp.buf.signature_help()| - • "]d" and "[d" in Normal mode map to |vim.diagnostic.goto_next()| and |vim.diagnostic.goto_prev()|, respectively. |]d-default| |[d-default| • d (and ) map to |vim.diagnostic.open_float()| |CTRL-W_d-default| diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 0e5232bbf9..15134531e1 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -138,12 +138,6 @@ of these in your config by simply removing the mapping, e.g. ":unmap Y". - * |v_star-default| - gc |gc-default| |v_gc-default| |o_gc-default| - gcc |gcc-default| -- |crn| -- |crr| -- |v_CTRL-R_CTRL-R| -- r |v_CTRL-R_r| -- gr |gr-default| -- |i_CTRL-S| - ]d |]d-default| - [d |[d-default| - d |CTRL-W_d-default| -- cgit From 4e5086a67e8916d9a5c5c5cb1933633b3e200eee Mon Sep 17 00:00:00 2001 From: tom-anders <13141438+tom-anders@users.noreply.github.com> Date: Mon, 29 Apr 2024 19:20:31 +0200 Subject: refactor(lsp): s/options/opts for parameters in vim.lsp.buf See https://github.com/neovim/neovim/pull/28483#discussion_r1583344120 --- runtime/doc/lsp.txt | 138 ++++++++++++++++++++++++++-------------------------- 1 file changed, 69 insertions(+), 69 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 40a80b1261..8f6913b1c9 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1235,30 +1235,30 @@ add_workspace_folder({workspace_folder}) clear_references() *vim.lsp.buf.clear_references()* Removes document highlights from current buffer. -code_action({options}) *vim.lsp.buf.code_action()* +code_action({opts}) *vim.lsp.buf.code_action()* Selects a code action available at the current cursor position. Parameters: ~ - • {options} (`table?`) A table with the following fields: - • {context}? (`lsp.CodeActionContext`) Corresponds to - `CodeActionContext` of the LSP specification: - • {diagnostics}? (`table`) LSP `Diagnostic[]`. Inferred - from the current position if not provided. - • {only}? (`table`) List of LSP `CodeActionKind`s used to - filter the code actions. Most language servers support - values like `refactor` or `quickfix`. - • {triggerKind}? (`integer`) The reason why code actions - were requested. - • {filter}? (`fun(x: lsp.CodeAction|lsp.Command):boolean`) - Predicate taking an `CodeAction` and returning a boolean. - • {apply}? (`boolean`) When set to `true`, and there is - just one remaining action (after filtering), the action - is applied without user query. - • {range}? (`{start: integer[], end: integer[]}`) Range for - which code actions should be requested. If in visual mode - this defaults to the active selection. Table must contain - `start` and `end` keys with {row,col} tuples using - mark-like indexing. See |api-indexing| + • {opts} (`table?`) A table with the following fields: + • {context}? (`lsp.CodeActionContext`) Corresponds to + `CodeActionContext` of the LSP specification: + • {diagnostics}? (`table`) LSP `Diagnostic[]`. Inferred from + the current position if not provided. + • {only}? (`table`) List of LSP `CodeActionKind`s used to + filter the code actions. Most language servers support + values like `refactor` or `quickfix`. + • {triggerKind}? (`integer`) The reason why code actions + were requested. + • {filter}? (`fun(x: lsp.CodeAction|lsp.Command):boolean`) + Predicate taking an `CodeAction` and returning a boolean. + • {apply}? (`boolean`) When set to `true`, and there is just + one remaining action (after filtering), the action is + applied without user query. + • {range}? (`{start: integer[], end: integer[]}`) Range for + which code actions should be requested. If in visual mode + this defaults to the active selection. Table must contain + `start` and `end` keys with {row,col} tuples using mark-like + indexing. See |api-indexing| See also: ~ • https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_codeAction @@ -1277,7 +1277,7 @@ completion({context}) *vim.lsp.buf.completion()* See also: ~ • vim.lsp.protocol.CompletionTriggerKind -declaration({options}) *vim.lsp.buf.declaration()* +declaration({opts}) *vim.lsp.buf.declaration()* Jumps to the declaration of the symbol under the cursor. Note: ~ @@ -1285,13 +1285,13 @@ declaration({options}) *vim.lsp.buf.declaration()* |vim.lsp.buf.definition()| instead. Parameters: ~ - • {options} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|. + • {opts} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|. -definition({options}) *vim.lsp.buf.definition()* +definition({opts}) *vim.lsp.buf.definition()* Jumps to the definition of the symbol under the cursor. Parameters: ~ - • {options} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|. + • {opts} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|. document_highlight() *vim.lsp.buf.document_highlight()* Send request to the server to resolve document highlights for the current @@ -1307,11 +1307,11 @@ document_highlight() *vim.lsp.buf.document_highlight()* highlights. |hl-LspReferenceText| |hl-LspReferenceRead| |hl-LspReferenceWrite| -document_symbol({options}) *vim.lsp.buf.document_symbol()* +document_symbol({opts}) *vim.lsp.buf.document_symbol()* Lists all symbols in the current buffer in the quickfix window. Parameters: ~ - • {options} (`vim.lsp.ListOpts?`) See |vim.lsp.ListOpts|. + • {opts} (`vim.lsp.ListOpts?`) See |vim.lsp.ListOpts|. execute_command({command_params}) *vim.lsp.buf.execute_command()* Executes an LSP server command. @@ -1322,53 +1322,53 @@ execute_command({command_params}) *vim.lsp.buf.execute_command()* See also: ~ • https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_executeCommand -format({options}) *vim.lsp.buf.format()* +format({opts}) *vim.lsp.buf.format()* Formats a buffer using the attached (and optionally filtered) language server clients. Parameters: ~ - • {options} (`table?`) A table with the following fields: - • {formatting_options}? (`table`) Can be used to specify - FormattingOptions. Some unspecified options will be - automatically derived from the current Nvim options. See - https://microsoft.github.io/language-server-protocol/specification/#formattingOptions - • {timeout_ms}? (`integer`, default: `1000`) Time in - milliseconds to block for formatting requests. No effect - if async=true. - • {bufnr}? (`integer`, default: current buffer) Restrict - formatting to the clients attached to the given buffer. - • {filter}? (`fun(client: vim.lsp.Client): boolean?`) - Predicate used to filter clients. Receives a client as - argument and must return a boolean. Clients matching the - predicate are included. Example: >lua - -- Never request typescript-language-server for formatting - vim.lsp.buf.format { - filter = function(client) return client.name ~= "tsserver" end - } + • {opts} (`table?`) A table with the following fields: + • {formatting_options}? (`table`) Can be used to specify + FormattingOptions. Some unspecified options will be + automatically derived from the current Nvim options. See + https://microsoft.github.io/language-server-protocol/specification/#formattingOptions + • {timeout_ms}? (`integer`, default: `1000`) Time in + milliseconds to block for formatting requests. No effect if + async=true. + • {bufnr}? (`integer`, default: current buffer) Restrict + formatting to the clients attached to the given buffer. + • {filter}? (`fun(client: vim.lsp.Client): boolean?`) + Predicate used to filter clients. Receives a client as + argument and must return a boolean. Clients matching the + predicate are included. Example: >lua + -- Never request typescript-language-server for formatting + vim.lsp.buf.format { + filter = function(client) return client.name ~= "tsserver" end + } < - • {async}? (`boolean`, default: false) If true the method - won't block. Editing the buffer while formatting - asynchronous can lead to unexpected changes. - • {id}? (`integer`) Restrict formatting to the client with - ID (client.id) matching this field. - • {name}? (`string`) Restrict formatting to the client with - name (client.name) matching this field. - • {range}? (`{start:integer[],end:integer[]}`, default: - current selection in visual mode, `nil` in other modes, - formatting the full buffer) Range to format. Table must - contain `start` and `end` keys with {row,col} tuples - using (1,0) indexing. + • {async}? (`boolean`, default: false) If true the method + won't block. Editing the buffer while formatting + asynchronous can lead to unexpected changes. + • {id}? (`integer`) Restrict formatting to the client with ID + (client.id) matching this field. + • {name}? (`string`) Restrict formatting to the client with + name (client.name) matching this field. + • {range}? (`{start:integer[],end:integer[]}`, default: + current selection in visual mode, `nil` in other modes, + formatting the full buffer) Range to format. Table must + contain `start` and `end` keys with {row,col} tuples using + (1,0) indexing. hover() *vim.lsp.buf.hover()* Displays hover information about the symbol under the cursor in a floating window. Calling the function twice will jump into the floating window. -implementation({options}) *vim.lsp.buf.implementation()* +implementation({opts}) *vim.lsp.buf.implementation()* Lists all the implementations for the symbol under the cursor in the quickfix window. Parameters: ~ - • {options} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|. + • {opts} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|. incoming_calls() *vim.lsp.buf.incoming_calls()* Lists all the call sites of the symbol under the cursor in the |quickfix| @@ -1383,13 +1383,13 @@ outgoing_calls() *vim.lsp.buf.outgoing_calls()* |quickfix| window. If the symbol can resolve to multiple items, the user can pick one in the |inputlist()|. -references({context}, {options}) *vim.lsp.buf.references()* +references({context}, {opts}) *vim.lsp.buf.references()* Lists all the references to the symbol under the cursor in the quickfix window. Parameters: ~ • {context} (`table?`) Context for the request - • {options} (`vim.lsp.ListOpts?`) See |vim.lsp.ListOpts|. + • {opts} (`vim.lsp.ListOpts?`) See |vim.lsp.ListOpts|. See also: ~ • https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_references @@ -1402,13 +1402,13 @@ remove_workspace_folder({workspace_folder}) Parameters: ~ • {workspace_folder} (`string?`) -rename({new_name}, {options}) *vim.lsp.buf.rename()* +rename({new_name}, {opts}) *vim.lsp.buf.rename()* Renames all references to the symbol under the cursor. Parameters: ~ • {new_name} (`string?`) If not provided, the user will be prompted for a new name using |vim.ui.input()|. - • {options} (`table?`) Additional options: + • {opts} (`table?`) Additional options: • {filter}? (`fun(client: vim.lsp.Client): boolean?`) Predicate used to filter clients. Receives a client as argument and must return a boolean. Clients matching the @@ -1421,11 +1421,11 @@ signature_help() *vim.lsp.buf.signature_help()* Displays signature information about the symbol under the cursor in a floating window. -type_definition({options}) *vim.lsp.buf.type_definition()* +type_definition({opts}) *vim.lsp.buf.type_definition()* Jumps to the definition of the type of the symbol under the cursor. Parameters: ~ - • {options} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|. + • {opts} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|. typehierarchy({kind}) *vim.lsp.buf.typehierarchy()* Lists all the subtypes or supertypes of the symbol under the cursor in the @@ -1435,7 +1435,7 @@ typehierarchy({kind}) *vim.lsp.buf.typehierarchy()* Parameters: ~ • {kind} (`"subtypes"|"supertypes"`) -workspace_symbol({query}, {options}) *vim.lsp.buf.workspace_symbol()* +workspace_symbol({query}, {opts}) *vim.lsp.buf.workspace_symbol()* Lists all symbols in the current workspace in the quickfix window. The list is filtered against {query}; if the argument is omitted from the @@ -1443,8 +1443,8 @@ workspace_symbol({query}, {options}) *vim.lsp.buf.workspace_symbol()* string means no filtering is done. Parameters: ~ - • {query} (`string?`) optional - • {options} (`vim.lsp.ListOpts?`) See |vim.lsp.ListOpts|. + • {query} (`string?`) optional + • {opts} (`vim.lsp.ListOpts?`) See |vim.lsp.ListOpts|. ============================================================================== -- cgit From e14e75099883e6904cf3575b612f3820cd122938 Mon Sep 17 00:00:00 2001 From: Jongwook Choi Date: Tue, 7 May 2024 14:09:27 -0400 Subject: fix(lsp): rename LspProgress data.result => data.params #28632 Rename the field `result` to `params` in the `data` table for `LspProgress` autocmds. This aligns with LspNotify. The previous name was chosen because the initial handler implementation mistakenly had a parameter name `result` instead of `params` for the `$/progress` LSP "notification" handler. However, `params` would be a more appropriate name that is more consistent with the underlying LSP type (`ProgressParams`). See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#progress --- runtime/doc/lsp.txt | 6 +++--- runtime/doc/news.txt | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 40a80b1261..5b2b8d6341 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -544,14 +544,14 @@ LspNotify *LspNotify* LspProgress *LspProgress* Upon receipt of a progress notification from the server. Notifications can be polled from a `progress` ring buffer of a |vim.lsp.Client| or use - |vim.lsp.status()| to get an aggregate message + |vim.lsp.status()| to get an aggregate message. If the server sends a "work done progress", the `pattern` is set to `kind` (one of `begin`, `report` or `end`). When used from Lua, the event contains a `data` table with `client_id` and - `result` properties. `result` will contain the request params sent by the - server. + `params` properties. `params` will contain the request params sent by the + server (see `lsp.ProgressParams`). Example: >vim autocmd LspProgress * redrawstatus diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index ed994472ac..6f13e505f1 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -178,6 +178,8 @@ cycle (Nvim HEAD, the "master" branch). • Renamed vim.snippet.exit() to vim.snippet.stop(). +• Changed |event-data| table for |LspProgress|: renamed `result` to `params`. + ============================================================================== NEW FEATURES *news-features* -- cgit From b0cc85c00504dc5530ab5d6c5fa03f3fa96d5a1a Mon Sep 17 00:00:00 2001 From: tom-anders <13141438+tom-anders@users.noreply.github.com> Date: Sat, 4 May 2024 10:10:44 +0200 Subject: docs(lsp): document vim.lsp.ListOpts.loclist --- runtime/doc/lsp.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 8f6913b1c9..6cb01ee3da 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1201,12 +1201,11 @@ Lua module: vim.lsp.buf *lsp-buf* vim.lsp.buf.references(nil, { on_list = on_list }) < - If you prefer loclist do something like this: >lua - local function on_list(options) - vim.fn.setloclist(0, {}, ' ', options) - vim.cmd.lopen() - end + If you prefer loclist instead of qflist: >lua + vim.lsp.buf.definition({ loclist = true }) + vim.lsp.buf.references(nil, { loclist = true }) < + • {loclist}? (`boolean`) *vim.lsp.LocationOpts* Extends: |vim.lsp.ListOpts| -- cgit From 5c40f3e86a81f78f821b8c75dafc3ce2ce67e1c5 Mon Sep 17 00:00:00 2001 From: tom-anders <13141438+tom-anders@users.noreply.github.com> Date: Sat, 4 May 2024 10:13:08 +0200 Subject: feat(lsp): support vim.lsp.ListOpts.loclist in location_handler() --- runtime/doc/news.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index ed994472ac..60cc3c48a4 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -266,6 +266,9 @@ The following new APIs and features were added. respective capability can be unset. • |vim.lsp.start()| accepts a "silent" option for suppressing messages if an LSP server failed to start. + • |vim.lsp.buf.definition()|, |vim.lsp.buf.declaration()|, + |vim.lsp.buf.type_definition()|, and |vim.lsp.buf.implementation()| now + support the `loclist` field of |vim.lsp.ListOpts|. • Treesitter • Bundled parsers and queries (highlight, folds) for Markdown, Python, and -- cgit From 9b1628da986d2858e7716b769ff2ca229f80a88c Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 8 May 2024 19:37:48 +0200 Subject: vim-patch:1e34b95e4402 runtime(netrw): Remove and cleanup Win9x legacy from netrw closes: vim/vim#14732 https://github.com/vim/vim/commit/1e34b95e4402fd8964ea4bcee0d2b6ffa6677aab Co-authored-by: Nir Lichtman --- runtime/doc/pi_netrw.txt | 114 ++++++++++++++++++----------------------------- 1 file changed, 43 insertions(+), 71 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index d8fcd066a8..3014da2c5d 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -446,10 +446,6 @@ settings are described below, in |netrw-browser-options|, and in messages don't always seem to show up this way, but one doesn't have to quit the window. - *g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank - lines that o/s's ftp "provides" on transfers - =0 force normal ftp behavior (no trailing line removal) - *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also permits network browsing to use ls with time and size sorting (default if windows) @@ -825,8 +821,6 @@ set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|) g:netrw_uid Holds current user-id for ftp. g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default) =1 use WinNT/2K/XP's rcp, binary mode - g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc - =1 use default method to do ftp > ----------------------------------------------------------------------- < *netrw-internal-variables* @@ -955,21 +949,8 @@ messages) you may write a NetReadFixup() function: endfunction > The NetReadFixup() function will be called if it exists and thus allows you to -customize your reading process. As a further example, contains -just such a function to handle Windows 95 ftp. For whatever reason, Windows -95's ftp dumps four blank lines at the end of a transfer, and so it is -desirable to automate their removal. Here's some code taken from -itself: -> - if has("win95") && g:netrw_win95ftp - fun! NetReadFixup(method, line1, line2) - if method == 3 " ftp (no <.netrc>) - let fourblanklines= line2 - 3 - silent fourblanklines .. "," .. line2 .. "g/^\s*/d" - endif - endfunction - endif -> +customize your reading process. + (Related topics: |ftp| |netrw-userpass| |netrw-start|) ============================================================================== @@ -3397,16 +3378,7 @@ Example: Clear netrw's marked file list via a mapping on gu > (This section is likely to grow as I get feedback) (also see |netrw-debug|) *netrw-p1* - P1. I use windows 95, and my ftp dumps four blank lines at the {{{2 - end of every read. - - See |netrw-fixup|, and put the following into your - <.vimrc> file: - - let g:netrw_win95ftp= 1 - - *netrw-p2* - P2. I use Windows, and my network browsing with ftp doesn't sort by {{{2 + P1. I use Windows, and my network browsing with ftp doesn't sort by {{{2 time or size! -or- The remote system is a Windows server; why don't I get sorts by time or size? @@ -3432,8 +3404,8 @@ Example: Clear netrw's marked file list via a mapping on gu > modify its listing behavior. - *netrw-p3* - P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw {{{2 + *netrw-p2* + P2. I tried rcp://user@host/ (or protocol other than ftp) and netrw {{{2 used ssh! That wasn't what I asked for... Netrw has two methods for browsing remote directories: ssh @@ -3441,8 +3413,8 @@ Example: Clear netrw's marked file list via a mapping on gu > When it comes time to do download a file (not just a directory listing), netrw will use the given protocol to do so. - *netrw-p4* - P4. I would like long listings to be the default. {{{2 + *netrw-p3* + P3. I would like long listings to be the default. {{{2 Put the following statement into your |vimrc|: > @@ -3451,8 +3423,8 @@ Example: Clear netrw's marked file list via a mapping on gu > Check out |netrw-browser-var| for more customizations that you can set. - *netrw-p5* - P5. My times come up oddly in local browsing {{{2 + *netrw-p4* + P4. My times come up oddly in local browsing {{{2 Does your system's strftime() accept the "%c" to yield dates such as "Sun Apr 27 11:49:23 1997"? If not, do a @@ -3461,16 +3433,16 @@ Example: Clear netrw's marked file list via a mapping on gu > let g:netrw_timefmt= "%X" (where X is the option) < - *netrw-p6* - P6. I want my current directory to track my browsing. {{{2 + *netrw-p5* + P5. I want my current directory to track my browsing. {{{2 How do I do that? Put the following line in your |vimrc|: > let g:netrw_keepdir= 0 < - *netrw-p7* - P7. I use Chinese (or other non-ascii) characters in my filenames, {{{2 + *netrw-p6* + P6. I use Chinese (or other non-ascii) characters in my filenames, {{{2 and netrw (Explore, Sexplore, Hexplore, etc) doesn't display them! (taken from an answer provided by Wu Yongwei on the vim @@ -3484,8 +3456,8 @@ Example: Clear netrw's marked file list via a mapping on gu > (...it is one more reason to recommend that people use utf-8!) - *netrw-p8* - P8. I'm getting "ssh is not executable on your system" -- what do I {{{2 + *netrw-p7* + P7. I'm getting "ssh is not executable on your system" -- what do I {{{2 do? (Dudley Fox) Most people I know use putty for windows ssh. It @@ -3567,8 +3539,8 @@ Example: Clear netrw's marked file list via a mapping on gu > of the others will use the string in g:netrw_ssh_cmd by default. - *netrw-p9* *netrw-ml_get* - P9. I'm browsing, changing directory, and bang! ml_get errors {{{2 + *netrw-p8* *netrw-ml_get* + P8. I'm browsing, changing directory, and bang! ml_get errors {{{2 appear and I have to kill vim. Any way around this? Normally netrw attempts to avoid writing swapfiles for @@ -3578,8 +3550,8 @@ Example: Clear netrw's marked file list via a mapping on gu > in your <.vimrc>: > let g:netrw_use_noswf= 0 < - *netrw-p10* - P10. I'm being pestered with "[something] is a directory" and {{{2 + *netrw-p9* + P9. I'm being pestered with "[something] is a directory" and {{{2 "Press ENTER or type command to continue" prompts... The "[something] is a directory" prompt is issued by Vim, @@ -3589,8 +3561,8 @@ Example: Clear netrw's marked file list via a mapping on gu > I also suggest that you set your |'cmdheight'| to 2 (or more) in your <.vimrc> file. - *netrw-p11* - P11. I want to have two windows; a thin one on the left and my {{{2 + *netrw-p10* + P10. I want to have two windows; a thin one on the left and my {{{2 editing window on the right. How may I accomplish this? You probably want netrw running as in a side window. If so, you @@ -3615,8 +3587,8 @@ Example: Clear netrw's marked file list via a mapping on gu > to select the file. - *netrw-p12* - P12. My directory isn't sorting correctly, or unwanted letters are {{{2 + *netrw-p11* + P11. My directory isn't sorting correctly, or unwanted letters are {{{2 appearing in the listed filenames, or things aren't lining up properly in the wide listing, ... @@ -3625,8 +3597,8 @@ Example: Clear netrw's marked file list via a mapping on gu > Multibyte encodings use two (or more) bytes per character. You may need to change |g:netrw_sepchr| and/or |g:netrw_xstrlen|. - *netrw-p13* - P13. I'm a Windows + putty + ssh user, and when I attempt to {{{2 + *netrw-p12* + P12. I'm a Windows + putty + ssh user, and when I attempt to {{{2 browse, the directories are missing trailing "/"s so netrw treats them as file transfers instead of as attempts to browse subdirectories. How may I fix this? @@ -3646,8 +3618,8 @@ Example: Clear netrw's marked file list via a mapping on gu > "let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe" "let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe" < - *netrw-p14* - P14. I would like to speed up writes using Nwrite and scp/ssh {{{2 + *netrw-p13* + P13. I would like to speed up writes using Nwrite and scp/ssh {{{2 style connections. How? (Thomer M. Gil) Try using ssh's ControlMaster and ControlPath (see the ssh_config @@ -3673,8 +3645,8 @@ Example: Clear netrw's marked file list via a mapping on gu > vim scp://host.domain.com//home/user/.bashrc < - *netrw-p15* - P15. How may I use a double-click instead of netrw's usual single {{{2 + *netrw-p14* + P14. How may I use a double-click instead of netrw's usual single {{{2 click to open a file or directory? (Ben Fritz) First, disable netrw's mapping with > @@ -3686,8 +3658,8 @@ Example: Clear netrw's marked file list via a mapping on gu > all netrw's mouse mappings, not just the one. (see |g:netrw_mousemaps|) - *netrw-p16* - P16. When editing remote files (ex. :e ftp://hostname/path/file), {{{2 + *netrw-p15* + P15. When editing remote files (ex. :e ftp://hostname/path/file), {{{2 under Windows I get an |E303| message complaining that its unable to open a swap file. @@ -3695,8 +3667,8 @@ Example: Clear netrw's marked file list via a mapping on gu > directory. Start netrw from your $HOME or other writable directory. - *netrw-p17* - P17. Netrw is closing buffers on its own. {{{2 + *netrw-p16* + P16. Netrw is closing buffers on its own. {{{2 What steps will reproduce the problem? 1. :Explore, navigate directories, open a file 2. :Explore, open another file @@ -3709,15 +3681,15 @@ Example: Clear netrw's marked file list via a mapping on gu > It appears that the buffers are not exactly closed; a ":ls!" will show them (although ":ls" does not). - *netrw-P18* - P18. How to locally edit a file that's only available via {{{2 + *netrw-P17* + P17. How to locally edit a file that's only available via {{{2 another server accessible via ssh? See http://stackoverflow.com/questions/12469645/ "Using Vim to Remotely Edit A File on ServerB Only Accessible From ServerA" - *netrw-P19* - P19. How do I get numbering on in directory listings? {{{2 + *netrw-P18* + P18. How do I get numbering on in directory listings? {{{2 With |g:netrw_bufsettings|, you can control netrw's buffer settings; try putting > let g:netrw_bufsettings="noma nomod nu nobl nowrap ro nornu" @@ -3725,8 +3697,8 @@ Example: Clear netrw's marked file list via a mapping on gu > instead, try > let g:netrw_bufsettings="noma nomod nonu nobl nowrap ro rnu" < - *netrw-P20* - P20. How may I have gvim start up showing a directory listing? {{{2 + *netrw-P19* + P19. How may I have gvim start up showing a directory listing? {{{2 Try putting the following code snippet into your .vimrc: > augroup VimStartup au! @@ -3738,8 +3710,8 @@ Example: Clear netrw's marked file list via a mapping on gu > This snippet assumes that you have client-server enabled (ie. a "huge" vim version). - *netrw-P21* - P21. I've made a directory (or file) with an accented character, {{{2 + *netrw-P20* + P20. I've made a directory (or file) with an accented character, {{{2 but netrw isn't letting me enter that directory/read that file: Its likely that the shell or o/s is using a different encoding @@ -3749,8 +3721,8 @@ Example: Clear netrw's marked file list via a mapping on gu > au FileType netrw set enc=latin1 < - *netrw-P22* - P22. I get an error message when I try to copy or move a file: {{{2 + *netrw-P21* + P21. I get an error message when I try to copy or move a file: {{{2 > **error** (netrw) tried using g:netrw_localcopycmd; it doesn't work! < -- cgit From c1a95d9653f39c5e118d030270e4b77ebd20139e Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Fri, 10 May 2024 13:47:30 +0100 Subject: fix(lsp): disable didChangeWatchedFiles on Linux Problem: The file watcher backends for Linux have too many limitations and doesn't work reliably. Solution: disable didChangeWatchedFiles on Linux Ref: #27807, #28058, #23291, #26520 --- runtime/doc/news.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 6bdb2d808e..111e69b0fe 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -435,10 +435,8 @@ The following changes to existing APIs or features add new behavior. • Enabled treesitter highlighting for Lua files. • The `workspace/didChangeWatchedFiles` LSP client capability is now enabled - by default. - • On Mac or Windows, `libuv.fs_watch` is used as the backend. - • On Linux, `fswatch` (recommended) is used as the backend if available, - otherwise `libuv.fs_event` is used on each subdirectory. + by default on Mac and Windows. Disabled on Linux since there currently isn't + a viable backend for watching files that scales well for large directories. • |LspRequest| autocmd callbacks now contain additional information about the LSP request status update that occurred. -- cgit From 7a03cd1dba0eeac361a518ee5d92ff81405c3690 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 11 May 2024 18:14:03 +0800 Subject: vim-patch:1c5728e0c4a9 (#28703) runtime(doc): update and remove some invalid links closes: vim/vim#14748 https://github.com/vim/vim/commit/1c5728e0c4a9df930879f9f0ca108092d5902194 Co-authored-by: Christian Brabandt --- runtime/doc/pi_netrw.txt | 6 +----- runtime/doc/pi_tar.txt | 3 ++- runtime/doc/syntax.txt | 9 +++++---- runtime/doc/usr_01.txt | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index 3014da2c5d..81acd9cf7e 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -2029,11 +2029,7 @@ passwords: better way to do that: I can use a regular ssh account which uses a password to access the material without the need to key-in the password each time. It's good for security and convenience. I tried ssh public key - authorization + ssh-agent, implementing this, and it works! Here are two - links with instructions: - - http://www.ibm.com/developerworks/library/l-keyc2/ - http://sial.org/howto/openssh/publickey-auth/ + authorization + ssh-agent, implementing this, and it works! Ssh hints: diff --git a/runtime/doc/pi_tar.txt b/runtime/doc/pi_tar.txt index dd1edb5707..c8570044e5 100644 --- a/runtime/doc/pi_tar.txt +++ b/runtime/doc/pi_tar.txt @@ -147,7 +147,8 @@ Copyright 2005-2017: *tar-copyright* v2 * converted to use Vim7's new autoload feature by Bram Moolenaar v1 (original) * Michael Toren - (see http://michael.toren.net/code/) + (see http://michael.toren.net/code/ + link seems dead) ============================================================================== vim:tw=78:ts=8:noet:ft=help diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index b93733b721..7893822a66 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1014,9 +1014,9 @@ Two syntax highlighting files exist for Euphoria. One for Euphoria version 3.1.1, which is the default syntax highlighting file, and one for Euphoria version 4.0.5 or later. -Euphoria version 3.1.1 (https://www.rapideuphoria.com/) is still necessary -for developing applications for the DOS platform, which Euphoria version 4 -(https://www.openeuphoria.org/) does not support. +Euphoria version 3.1.1 (https://www.rapideuphoria.com/ link seems dead) is +still necessary for developing applications for the DOS platform, which +Euphoria version 4 (https://www.openeuphoria.org/) does not support. The following file extensions are auto-detected as Euphoria file type: > @@ -1073,7 +1073,8 @@ Elixir. FLEXWIKI *flexwiki.vim* *ft-flexwiki-syntax* -FlexWiki is an ASP.NET-based wiki package available at https://www.flexwiki.com +FlexWiki is an ASP.NET-based wiki package available at +https://www.flexwiki.com NOTE: This site currently doesn't work, on Wikipedia is mentioned that development stopped in 2009. diff --git a/runtime/doc/usr_01.txt b/runtime/doc/usr_01.txt index 6b94806941..d285a35f26 100644 --- a/runtime/doc/usr_01.txt +++ b/runtime/doc/usr_01.txt @@ -85,7 +85,7 @@ The Vim user manual and reference manual are Copyright (c) 1988 by Bram Moolenaar. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later. The latest version is presently available at: - https://www.opencontent.org/openpub/ + https://opencontent.org/openpub/ People who contribute to the manuals must agree with the above copyright notice. -- cgit From 8f0a166da4cd919947ef1ed634d350ef602acc63 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 20 Apr 2024 23:21:08 +0200 Subject: refactor(api): rename nvim_win_remove_ns Problem: nvim_win_remove_ns does not follow `help dev-naming` API naming conventions. Solution: Rename it. --- runtime/doc/api.txt | 23 ++++++++------- runtime/doc/develop.txt | 77 ++++++++++++++++++++++++++++++++++++++++++------- runtime/doc/news.txt | 30 ++++++++----------- 3 files changed, 90 insertions(+), 40 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 86f4c3875c..f593f14929 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -2776,8 +2776,8 @@ nvim_buf_set_extmark({buffer}, {ns_id}, {line}, {col}, {opts}) • url: A URL to associate with this extmark. In the TUI, the OSC 8 control sequence is used to generate a clickable hyperlink to this URL. - • scoped: boolean that indicates that the extmark should - only be displayed in the namespace scope. (experimental) + • scoped: boolean (EXPERIMENTAL) enables "scoping" for the + extmark. See |nvim_win_add_ns()| Return: ~ Id of the created/updated extmark @@ -2860,33 +2860,34 @@ nvim_set_decoration_provider({ns_id}, {opts}) < nvim_win_add_ns({window}, {ns_id}) *nvim_win_add_ns()* - Adds the namespace scope to the window. + Scopes a namespace to the a window, so extmarks in the namespace will be + active only in the given window. Parameters: ~ • {window} Window handle, or 0 for current window - • {ns_id} the namespace to add + • {ns_id} Namespace Return: ~ true if the namespace was added, else false -nvim_win_get_ns({window}) *nvim_win_get_ns()* - Gets all the namespaces scopes associated with a window. +nvim_win_del_ns({window}, {ns_id}) *nvim_win_del_ns()* + Unscopes a namespace (un-binds it from the given scope). Parameters: ~ • {window} Window handle, or 0 for current window + • {ns_id} the namespace to remove Return: ~ - a list of namespaces ids + true if the namespace was removed, else false -nvim_win_remove_ns({window}, {ns_id}) *nvim_win_remove_ns()* - Removes the namespace scope from the window. +nvim_win_get_ns({window}) *nvim_win_get_ns()* + Gets the namespace scopes for a given window. Parameters: ~ • {window} Window handle, or 0 for current window - • {ns_id} the namespace to remove Return: ~ - true if the namespace was removed, else false + a list of namespaces ids ============================================================================== diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 7fc154441f..11c25362b6 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -383,7 +383,7 @@ Use existing common {verb} names (actions) if possible: - enable: Enables/disables functionality. Signature should be `enable(enable?:boolean, filter?:table)`. - eval: Evaluates an expression - - exec: Executes code + - exec: Executes code, may return a result - fmt: Formats - get: Gets things (often by a query) - inspect: Presents a high-level, often interactive, view @@ -405,8 +405,8 @@ Do NOT use these deprecated verbs: - show: Redundant with "print", "echo" - toggle: Prefer `enable(not is_enabled())`. -Use consistent names for {noun} (nouns) in API functions: buffer is called -"buf" everywhere, not "buffer" in some places and "buf" in others. +Use consistent names for {topic} in API functions: buffer is called "buf" +everywhere, not "buffer" in some places and "buf" in others. - buf: Buffer - chan: |channel| - cmd: Command @@ -419,10 +419,10 @@ Use consistent names for {noun} (nouns) in API functions: buffer is called - win: Window Do NOT use these deprecated nouns: - - buffer + - buffer Use "buf" instead - callback Use on_foo instead - - command - - window + - command Use "cmd" instead + - window Use "win" instead *dev-name-events* Use the "on_" prefix to name event-handling callbacks and also the interface for @@ -440,12 +440,15 @@ Example: > < *dev-name-api* Use this format to name new RPC |API| functions: > - nvim_{noun}_{verb}_{arbitrary-qualifiers} + nvim_{topic}_{verb}_{arbitrary-qualifiers} -If the function acts on an object then {noun} is the name of that object -(e.g. "buf" or "win"). If the function operates in a "global" context then -{noun} is usually omitted (but consider "namespacing" your global operations -with a {noun} that groups functions under a common concept). +Do not add new nvim_buf/nvim_win/nvim_tabpage APIs, unless you are certain the +concept will NEVER be applied to more than one "scope". That is, {topic} +should be the TOPIC ("ns", "extmark", "option", …) that acts on the scope(s) +(buf/win/tabpage/global), it should NOT be the scope. Instead the scope should +be a parameter (typically manifest as mutually-exclusive buf/win/… flags like +|nvim_get_option_value()|, or less commonly as a `scope: string` field like +|nvim_get_option_info2()|). - Example: `nvim_get_keymap('v')` operates in a global context (first parameter is not a Buffer). The "get" verb indicates that it gets anything @@ -455,6 +458,58 @@ with a {noun} that groups functions under a common concept). and uses the "del" {verb}. +INTERFACE PATTERNS *dev-patterns* + +Prefer adding a single `nvim_{topic}_{verb}_…` interface for a given topic. + +Example: > + + nvim_ns_add( + ns_id: int, + filter: { + handle: integer (buf/win/tabpage id) + scope: "global" | "win" | "buf" | "tabpage" + } + ): { ok: boolean } + + nvim_ns_get( + ns_id: int, + filter: { + handle: integer (buf/win/tabpage id) + scope: "global" | "win" | "buf" | "tabpage" + } + ): { ids: int[] } + + nvim_ns_del( + ns_id: int, + filter: { + handle: integer (buf/win/tabpage id) + scope: "global" | "win" | "buf" | "tabpage" + } + ): { ok: boolean } + + +Anti-Example: + +Creating separate `nvim_xx`, `nvim_buf_xx`, `nvim_win_xx`, and +`nvim_tabpage_xx`, functions all for the same `xx` topic, requires 4x the +amount of documentation, tests, boilerplate, and interfaces, which users must +comprehend, maintainers must maintain, etc. Thus the following is NOT +recommended (compare these 12(!) functions to the above 3 functions): > + + nvim_add_ns(…) + nvim_buf_add_ns(…) + nvim_win_add_ns(…) + nvim_tabpage_add_ns(…) + nvim_del_ns(…) + nvim_buf_del_ns(…) + nvim_win_del_ns(…) + nvim_tabpage_del_ns(…) + nvim_get_ns(…) + nvim_buf_get_ns(…) + nvim_win_get_ns(…) + nvim_tabpage_get_ns(…) + API-CLIENT *dev-api-client* *api-client* diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 111e69b0fe..b6add63595 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -206,7 +206,18 @@ The following new APIs and features were added. • |'smoothscroll'| option to scroll by screen line rather than by text line when |'wrap'| is set. -• |nvim_buf_set_extmark()| supports inline virtual text. +• API enhancements + • |nvim_buf_set_extmark()| supports inline virtual text. + • |nvim_win_text_height()| computes the number of screen lines occupied + by a range of text in a given window. + • New RPC client type `msgpack-rpc` is added for |nvim_set_client_info()| to + support fully MessagePack-RPC compliant clients. + • Floating windows can now be hidden by setting `hide` in |nvim_open_win()| or + |nvim_win_set_config()|. + • |nvim_input_mouse()| supports mouse buttons "x1" and "x2". + • Added |nvim_tabpage_set_win()| to set the current window of a tabpage. + • |nvim_win_add_ns()| can bind a |namespace| to a window-local scope(s). + • Extmarks opt-in to this scoping via the `scoped` flag of |nvim_buf_set_extmark()|. • 'foldtext' now supports virtual text format. |fold-foldtext| @@ -218,9 +229,6 @@ The following new APIs and features were added. • |vim.lpeg| and |vim.re| expose the bundled Lpeg expression grammar parser and its regex interface. -• |nvim_win_text_height()| computes the number of screen lines occupied - by a range of text in a given window. - • Mapping APIs now support abbreviations when mode short-name has suffix "a". • Better cmdline completion for string option value. |complete-set-option| @@ -321,15 +329,9 @@ The following new APIs and features were added. • Functions that take a severity as an optional parameter (e.g. |vim.diagnostic.get()|) now also accept a list of severities |vim.diagnostic.severity| -• New RPC client type `msgpack-rpc` is added for |nvim_set_client_info()| to - support fully MessagePack-RPC compliant clients. - • Floating windows can now show footer with new `footer` and `footer_pos` config fields. Uses |hl-FloatFooter| by default. -• Floating windows can now be hidden by setting `hide` in |nvim_open_win()| or - |nvim_win_set_config()|. - • |:terminal| command now accepts some |:command-modifiers| (specifically |:horizontal| and those that affect splitting a window). @@ -360,8 +362,6 @@ The following new APIs and features were added. • 'completeopt' option supports "popup" flag to show extra information in a floating window. -• |nvim_input_mouse()| supports mouse buttons "x1" and "x2". - • |v_Q-default| and |v_@-default| repeat a register for each line of a linewise visual selection. @@ -386,14 +386,8 @@ The following new APIs and features were added. using the OSC 8 control sequence, enabling clickable text in supporting terminals. -• Added |nvim_tabpage_set_win()| to set the current window of a tabpage. - • Clicking on a tabpage in the tabline with the middle mouse button closes it. -• |namespace| can now have window scopes. |nvim_win_add_ns()| - -• |extmarks| option `scoped`: only show the extmarks in its namespace's scope. - • Added built-in |commenting| support. • |vim.fs.root()| finds project root directories from a list of "root -- cgit From 97c7646501d5cd6f57c57ce30acca89c5b8573ff Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 12 May 2024 23:12:25 +0200 Subject: refactor(api): nvim_win_xx_ns are EXPERIMENTAL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: The nvim_win_xx_ns function family introduced in ba0370b1d718d473d0ef51c35d88b98ba220082b needs more bake-time. Currently it's narrowly defined for windows, but other scopes ("buffer") and features are likely in the future. Solution: - Rename the API with double-underscore to mark it as EXPERIMENTAL. TODO/FUTURE: - Rename and change the signature to support more than just "window" scope, and for other flexibility. - Open question: we could choose either: - "store scopes on namespaces", or - "store namespaces on scopes (w:/b:/…)" --- runtime/doc/api.txt | 14 ++++++++++---- runtime/doc/news.txt | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index f593f14929..13884e865d 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -2777,7 +2777,7 @@ nvim_buf_set_extmark({buffer}, {ns_id}, {line}, {col}, {opts}) OSC 8 control sequence is used to generate a clickable hyperlink to this URL. • scoped: boolean (EXPERIMENTAL) enables "scoping" for the - extmark. See |nvim_win_add_ns()| + extmark. See |nvim__win_add_ns()| Return: ~ Id of the created/updated extmark @@ -2859,7 +2859,9 @@ nvim_set_decoration_provider({ns_id}, {opts}) ["end", tick] < -nvim_win_add_ns({window}, {ns_id}) *nvim_win_add_ns()* +nvim__win_add_ns({window}, {ns_id}) *nvim__win_add_ns()* + EXPERIMENTAL: this API will change in the future. + Scopes a namespace to the a window, so extmarks in the namespace will be active only in the given window. @@ -2870,7 +2872,9 @@ nvim_win_add_ns({window}, {ns_id}) *nvim_win_add_ns()* Return: ~ true if the namespace was added, else false -nvim_win_del_ns({window}, {ns_id}) *nvim_win_del_ns()* +nvim__win_del_ns({window}, {ns_id}) *nvim__win_del_ns()* + EXPERIMENTAL: this API will change in the future. + Unscopes a namespace (un-binds it from the given scope). Parameters: ~ @@ -2880,7 +2884,9 @@ nvim_win_del_ns({window}, {ns_id}) *nvim_win_del_ns()* Return: ~ true if the namespace was removed, else false -nvim_win_get_ns({window}) *nvim_win_get_ns()* +nvim__win_get_ns({window}) *nvim__win_get_ns()* + EXPERIMENTAL: this API will change in the future. + Gets the namespace scopes for a given window. Parameters: ~ diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index b6add63595..42b6f4b14c 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -216,7 +216,7 @@ The following new APIs and features were added. |nvim_win_set_config()|. • |nvim_input_mouse()| supports mouse buttons "x1" and "x2". • Added |nvim_tabpage_set_win()| to set the current window of a tabpage. - • |nvim_win_add_ns()| can bind a |namespace| to a window-local scope(s). + • |nvim__win_add_ns()| can bind a |namespace| to a window-local scope(s). • Extmarks opt-in to this scoping via the `scoped` flag of |nvim_buf_set_extmark()|. • 'foldtext' now supports virtual text format. |fold-foldtext| -- cgit From 7acf39ddab8ebdb63ebf78ec980149d20783fd4b Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Wed, 15 May 2024 01:18:33 +0200 Subject: docs: misc (#28609) Closes https://github.com/neovim/neovim/issues/28484. Closes https://github.com/neovim/neovim/issues/28719. Co-authored-by: Chris Co-authored-by: Gregory Anders Co-authored-by: Jake B <16889000+jakethedev@users.noreply.github.com> Co-authored-by: Jonathan Raines Co-authored-by: Yi Ming Co-authored-by: Zane Dufour Co-authored-by: zeertzjq --- runtime/doc/change.txt | 4 ---- runtime/doc/editorconfig.txt | 10 +++++----- runtime/doc/faq.txt | 7 ------- runtime/doc/lsp.txt | 7 ++++--- runtime/doc/lua.txt | 7 ++++--- runtime/doc/news.txt | 1 + 6 files changed, 14 insertions(+), 22 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 42d6bcfae0..09db651614 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -281,10 +281,6 @@ gr{char} Replace the virtual characters under the cursor with that have a special meaning in Insert mode, such as most CTRL-keys, cannot be used. - *gr-default* - Mapped to |vim.lsp.buf.references()| by default. - |default-mappings| - *digraph-arg* The argument for Normal mode commands like |r| and |t| is a single character. When 'cpo' doesn't contain the 'D' flag, this character can also be entered diff --git a/runtime/doc/editorconfig.txt b/runtime/doc/editorconfig.txt index c7011cfbba..aa4e150862 100644 --- a/runtime/doc/editorconfig.txt +++ b/runtime/doc/editorconfig.txt @@ -6,11 +6,11 @@ ============================================================================== EditorConfig integration *editorconfig* -Nvim supports EditorConfig. When a file is opened, Nvim searches all parent -directories of that file for ".editorconfig" files, parses them, and applies -any properties that match the opened file. Think of it like 'modeline' for an -entire (recursive) directory. For more information see -https://editorconfig.org/. +Nvim supports EditorConfig. When a file is opened, after running |ftplugin|s +and |FileType| autocommands, Nvim searches all parent directories of that file +for ".editorconfig" files, parses them, and applies any properties that match +the opened file. Think of it like 'modeline' for an entire (recursive) +directory. For more information see https://editorconfig.org/. *g:editorconfig* *b:editorconfig* diff --git a/runtime/doc/faq.txt b/runtime/doc/faq.txt index 09bf829512..ca1429c0f5 100644 --- a/runtime/doc/faq.txt +++ b/runtime/doc/faq.txt @@ -29,13 +29,6 @@ Use the stable (release) https://github.com/neovim/neovim/releases/latest version for a more predictable experience. -CAN I USE RUBY-BASED VIM PLUGINS (E.G. LUSTYEXPLORER)? ~ - -Yes, starting with Nvim 0.1.5 PR #4980 -https://github.com/neovim/neovim/pull/4980 the legacy Vim `if_ruby` interface -is supported. - - CAN I USE LUA-BASED VIM PLUGINS (E.G. NEOCOMPLETE)? ~ No. Starting with Nvim 0.2 PR #4411 diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index e783b7e3de..584fef0ed2 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -694,8 +694,8 @@ buf_request_sync({bufnr}, {method}, {params}, {timeout_ms}) milliseconds to wait for a result. Return (multiple): ~ - (`table?`) result Map - of client_id:request_result. + (`table?`) result + Map of client_id:request_result. (`string?`) err On timeout, cancel, or error, `err` is a string describing the failure reason, and `result` is nil. @@ -1589,7 +1589,7 @@ save({lenses}, {bufnr}, {client_id}) *vim.lsp.codelens.save()* Lua module: vim.lsp.inlay_hint *lsp-inlay_hint* enable({enable}, {filter}) *vim.lsp.inlay_hint.enable()* - Enables or disables inlay hints for a buffer. + Enables or disables inlay hints for the {filter}ed scope. To "toggle", pass the inverse of `is_enabled()`: >lua vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) @@ -1636,6 +1636,7 @@ get({filter}) *vim.lsp.inlay_hint.get()* • {inlay_hint} (`lsp.InlayHint`) is_enabled({filter}) *vim.lsp.inlay_hint.is_enabled()* + Query whether inlay hint is enabled in the {filter}ed scope Note: ~ • This API is pre-release (unstable). diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index e24f5dfc7e..f227420c75 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2673,7 +2673,6 @@ vim.filetype.add({filetypes}) *vim.filetype.add()* vim.filetype.add { pattern = { ['.*'] = { - priority = -math.huge, function(path, bufnr) local content = vim.api.nvim_buf_get_lines(bufnr, 0, 1, false)[1] or '' if vim.regex([[^#!.*\\]]):match_str(content) ~= nil then @@ -2682,6 +2681,7 @@ vim.filetype.add({filetypes}) *vim.filetype.add()* return 'drawing' end end, + { priority = -math.huge }, }, }, } @@ -4005,7 +4005,8 @@ Iter:fold({init}, {f}) *Iter:fold()* -- Get the "maximum" item of an iterable. vim.iter({ -99, -4, 3, 42, 0, 0, 7 }) :fold({}, function(acc, v) - acc.max = math.max(v, acc.max or v) return acc + acc.max = math.max(v, acc.max or v) + return acc end) --> { max = 42 } < @@ -4346,7 +4347,7 @@ vim.snippet.jump({direction}) *vim.snippet.jump()* You can use this function to navigate a snippet as follows: >lua vim.keymap.set({ 'i', 's' }, '', function() - if vim.snippet.jumpable(1) then + if vim.snippet.active({ direction = 1 }) then return 'lua vim.snippet.jump(1)' else return '' diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 42b6f4b14c..6045acf935 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -417,6 +417,7 @@ The following changes to existing APIs or features add new behavior. • 'shortmess' includes the "C" flag. • 'grepprg' uses the -H and -I flags for grep by default, and defaults to using ripgrep if available. + • "]d" and "[d" in Normal mode map to |vim.diagnostic.goto_next()| and |vim.diagnostic.goto_prev()|, respectively. |]d-default| |[d-default| • d (and ) map to |vim.diagnostic.open_float()| |CTRL-W_d-default| -- cgit From ffb4b50e74657b3b15199972371e0cff84f9cd4a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 15 May 2024 19:39:35 +0800 Subject: docs(lua): restore missing indexing for vim.bo and vim.wo (#28751) --- runtime/doc/lua.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index f227420c75..20a53537bc 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -1412,7 +1412,7 @@ Option:remove({value}) *vim.opt:remove()* Parameters: ~ • {value} (`string`) Value to remove -vim.bo *vim.bo* +vim.bo[{bufnr}] *vim.bo* Get or set buffer-scoped |options| for the buffer with number {bufnr}. If {bufnr} is omitted then the current buffer is used. Invalid {bufnr} or key is an error. @@ -1462,7 +1462,7 @@ vim.o *vim.o* print(vim.o.foo) -- error: invalid key < -vim.wo *vim.wo* +vim.wo[{winid}][{bufnr}] *vim.wo* Get or set window-scoped |options| for the window with handle {winid} and buffer with number {bufnr}. Like `:setlocal` if setting a |global-local| option or if {bufnr} is provided, like `:set` otherwise. If {winid} is -- cgit From 01b6bff7e9bc751be20ce7bb68e7ebe3037441de Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 2 May 2024 15:57:21 +0200 Subject: docs: news Set dev_xx.txt help files to use "flow" layout. --- runtime/doc/deprecated.txt | 28 +- runtime/doc/dev_style.txt | 2 +- runtime/doc/dev_theme.txt | 28 +- runtime/doc/develop.txt | 69 +++-- runtime/doc/lsp.txt | 3 +- runtime/doc/lua.txt | 49 +-- runtime/doc/news-0.9.txt | 2 +- runtime/doc/news.txt | 742 ++++++++++++++++++++------------------------- runtime/doc/treesitter.txt | 6 +- 9 files changed, 429 insertions(+), 500 deletions(-) (limited to 'runtime/doc') 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 `` to jump while a snippet is active: >lua vim.keymap.set({ 'i', 's' }, '', function() if vim.snippet.active({ direction = 1 }) then return 'lua vim.snippet.jump(1)' 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 calling |vim.lsp.protocol.make_client_capabilities()|. + • |LspRequest| and LspProgressUpdate (renamed to |LspProgress|) autocmds + were promoted from a |User| autocmd to first class citizen. + +• Lua: + • |-l| ensures output ends with a newline if the script prints messages and + doesn't cause Nvim to exit. + • 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()`. + • |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()|. + • Renamed `vim.treesitter.playground` to `vim.treesitter.dev`. + +• Options + • 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. + • |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. + +• Plugins: + • |:TOhtml| has been rewritten in Lua to support Neovim-specific + decorations, and many options have been removed. -• Changed |event-data| table for |LspProgress|: renamed `result` to `params`. +• Treesitter + • 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|. + +• TUI + • 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 + set guicursor+=n-v-c:blinkon500-blinkoff500 +< ============================================================================== NEW FEATURES *news-features* -The following new APIs and features were added. +The following new features were added. -• Performance: - • 'diffopt' "linematch" scoring algorithm now favours larger and less groups - https://github.com/neovim/neovim/pull/23611 - • Treesitter highlighting now parses injections incrementally during - screen redraws only for the line range being rendered. This significantly - improves performance in large files with many injections. - • 'breakindent' performance is significantly improved for wrapped lines. - • Cursor movement, insertion with [count] and |screenpos()| are now faster. - -• |'winfixbuf'| keeps a window focused onto a specific buffer - -• |vim.iter()| provides a generic iterator interface for tables and Lua - iterators |for-in|. - -• |vim.ringbuf()| creates ring buffers. - -• |vim.keycode()| translates keycodes in a string. - -• |'smoothscroll'| option to scroll by screen line rather than by text line - when |'wrap'| is set. - -• API enhancements +• API + • Passing 0 to |nvim_get_chan_info()| gets info about the current channel. • |nvim_buf_set_extmark()| supports inline virtual text. • |nvim_win_text_height()| computes the number of screen lines occupied by a range of text in a given window. @@ -215,34 +154,81 @@ The following new APIs and features were added. • Floating windows can now be hidden by setting `hide` in |nvim_open_win()| or |nvim_win_set_config()|. • |nvim_input_mouse()| supports mouse buttons "x1" and "x2". + • Added "force_crlf" option field in |nvim_open_term()|. • Added |nvim_tabpage_set_win()| to set the current window of a tabpage. • |nvim__win_add_ns()| can bind a |namespace| to a window-local scope(s). • Extmarks opt-in to this scoping via the `scoped` flag of |nvim_buf_set_extmark()|. + • Mapping APIs now support abbreviations when mode short-name has suffix "a". + • Floating windows can now show footer with new `footer` and `footer_pos` + config fields. Uses |hl-FloatFooter| by default. + • |extmarks| can set a "url" highlight attribute, so the text region can + become a clickable hyperlink (assuming UI support). The TUI renders URLs + using the OSC 8 control sequence, enabling clickable text in supporting + terminals. + • |nvim_open_win()| and |nvim_win_set_config()| now support opening normal + (split) windows, moving floating windows into split windows, and opening + windows in non-current tabpages. + • Flags added to |nvim_buf_set_extmark()|: + - "undo_restore": opt-out extmarks of precise undo tracking. + - "invalidate": automatically hide or delete extmarks. + - "virt_text_repeat_linebreak": repeat virtual text on wrapped lines. + • 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()| + API function already allowed you to define such ranges, but highlight + regions were not rendered consistently for a range that covers more than + one line break. This has now been fixed. Signs defined as part of + a multi-line extmark also apply to every line in the range, not just the + first. In addition, |nvim_buf_get_extmarks()| has gained an "overlap" + option to return such ranges even if they started before the specified + position. -• 'foldtext' now supports virtual text format. |fold-foldtext| - -• |'foldtext'| can be set to an empty string to disable and render the line: - as normal with regular highlighting and no line wrapping. - -• |vim.system()| for running system commands. - -• |vim.lpeg| and |vim.re| expose the bundled Lpeg expression grammar parser - and its regex interface. - -• Mapping APIs now support abbreviations when mode short-name has suffix "a". - -• Better cmdline completion for string option value. |complete-set-option| - -• Builtin TUI can now recognize "super" (|d (and ) map to |vim.diagnostic.open_float()| + |CTRL-W_d-default| + • |vim.lsp.start()| sets the following default keymaps (assuming server + support): + • |K| in Normal mode maps to |vim.lsp.buf.hover()|, unless 'keywordprg' + was customized before calling |vim.lsp.start()|. + • Automatic linting of treesitter query files (see |ft-query-plugin|). + Can be disabled via: >lua + vim.g.query_lint_on = {} +< + • Enabled treesitter highlighting for: + • treesitter query files + • Vim help files + • Lua files • Editor + • Better cmdline completion for string option value. |complete-set-option| + • Try it with `:set listchars=` • By default, the swapfile "ATTENTION" |E325| dialog is skipped if the swapfile is owned by a running Nvim process, instead of prompting. If you always want the swapfile dialog, delete the default SwapExists handler: `autocmd! nvim_swapfile`. |default-autocmds| • Navigating the |jumplist| with CTRL+O, CTRL+I behaves more intuitively when deleting buffers, and avoids "invalid buffer" cases. #25461 + • |:fclose| command. + • |v_Q-default| and |v_@-default| repeat a register for each line of + a linewise visual selection. + • 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 + |:vertical|, |:horizontal| and |:botright|. + +• Events + • |vim.on_key()| callbacks receive a second argument for keys typed before + mappings are applied. • LSP • LSP method names are available in |vim.lsp.protocol.Methods|. @@ -280,11 +266,100 @@ The following new APIs and features were added. |vim.lsp.buf.type_definition()|, and |vim.lsp.buf.implementation()| now support the `loclist` field of |vim.lsp.ListOpts|. +• Lua: + • |:lua| with a |[range]| executes that range as Lua code, in any buffer. + • |:source| without arguments treats a buffer with 'filetype' of "lua" as + Lua code regardless of its extension. + • Vimscript function |exists()| supports checking |v:lua| functions. + • |vim.iter()| is a generic interface for all |iterable| objects (tables, + |iterator|s). + • |vim.snippet| provides a mode for expanding and navigating snippets. + • |vim.ringbuf()| is a generic ring buffer (data structure). + • |vim.deepcopy()| gained a `noref` argument to avoid hashing table values. + • |vim.keycode()| translates keycodes in a string. + • |vim.system()| runs commands / starts processes. + • |vim.lpeg| and |vim.re| expose the bundled Lpeg expression grammar parser + and its regex interface. + • |vim.base64.encode()| and |vim.base64.decode()| encode and decode strings + using Base64 encoding. + • |vim.text.hexencode()| and |vim.text.hexdecode()| convert strings to and + from byte representations. + • |vim.ui.open()| opens URIs using the system default handler (macOS `open`, + Windows `explorer`, Linux `xdg-open`, etc.) + • |vim.wo| can now be double indexed for |:setlocal| behaviour. Currently + only `0` for the buffer index is supported. + • Improved messages for type errors in `vim.api.*` calls (including `opts` params). + • Lua type annotations for: + • `vim.*` + • `vim.fn.*` + • `vim.api.*` + • `vim.v.*` + • Functions that take a severity as an optional parameter (e.g. + |vim.diagnostic.get()|) now also accept a list of severities |vim.diagnostic.severity| + • |vim.diagnostic.count()| returns the number of diagnostics for a given + buffer and/or namespace, by severity. This is a faster alternative to + |vim.diagnostic.get()| when only the number of diagnostics is needed, but + not the diagnostics themselves. + • |vim.diagnostic.is_enabled()| + • |vim.version.le()|, |vim.version.ge()| + • |vim.fs.root()| finds project root directories from a list of "root + markers". + • |vim.tbl_contains()| now works for general tables and allows specifying + a predicate function that is checked for each value. (Use + |vim.list_contains()| for checking list-like tables (integer keys without + gaps) for literal values.) + • |vim.region()| can use a string accepted by |getpos()| as position. + +• Options + • 'winfixbuf' keeps a window focused onto a specific buffer + • 'smoothscroll' option to scroll by screen line rather than by text line + when 'wrap' is set. + • 'foldtext' now supports virtual text format. |fold-foldtext| + • 'foldtext' can be set to an empty string to disable and render the line: + as normal with regular highlighting and no line wrapping. + • 'complete' option supports "f" flag for completing buffer names. + • 'completeopt' option supports "popup" flag to show extra information in + a floating window. + • 'errorfile' (|-q|) accepts `-` as an alias for stdin. + +• Performance: + • 'diffopt' "linematch" scoring algorithm now favours larger and less groups + https://github.com/neovim/neovim/pull/23611 + • Treesitter highlighting now parses injections incrementally during + screen redraws only for the line range being rendered. This significantly + improves performance in large files with many injections. + • 'breakindent' performance is significantly improved for wrapped lines. + • Cursor movement, insertion with [count] and |screenpos()| are now faster. + +• Plugins: + • Nvim now includes |commenting| support. + • |:Man| supports the `:hide` modifier to open page in the current window. + • |:Man| respects 'wrapmargin' + +• Startup: + • |$NVIM_APPNAME| can be set to a relative path instead of only a name. + • |--startuptime| reports the startup times for both processes (TUI + + server) as separate sections. + +• Terminal + • |:terminal| accepts some |:command-modifiers| (specifically |:horizontal| + and those that affect splitting a window). + • Terminal buffers emit a |TermRequest| autocommand event when the child + process emits an OSC or DCS control sequence. + • Terminal buffers respond to OSC background and foreground requests. + |default-autocmds| + • Treesitter • Bundled parsers and queries (highlight, folds) for Markdown, Python, and Bash. - • |vim.treesitter.query.omnifunc()| for treesitter query files (set by - default). + • |:InspectTree| shows root nodes + • |:InspectTree| now supports |folding| + • |:InspectTree| shows node ranges in 0-based instead of 1-based indexing. + • |vim.treesitter.foldexpr()| now recognizes folds captured using a + quantified query pattern. + • |vim.treesitter.query.omnifunc()| provides completion in treesitter query + files (set by default). + • |vim.treesitter.query.edit()| provides live editing of treesitter queries. • |Query:iter_matches()| now has the ability to set the maximum start depth for matches. • `@injection.language` now has smarter resolution and will fall back to @@ -294,230 +369,75 @@ The following new APIs and features were added. • `@injection.filename` will try to match the node text via |vim.filetype.match()| and treat the result as a language name in the same way as `@injection.language`. - • The `#set!` directive now supports `injection.self` and `injection.parent` - for injecting either the current node's language or the parent + • The `#set!` directive supports `injection.self` and `injection.parent` for + injecting either the current node's language or the parent |LanguageTree|'s language, respectively. - • |vim.treesitter.query.edit()| allows live editing of treesitter - queries. - • Improved error messages for query parsing. - • |:InspectTree| shows node ranges in 0-based indexing instead of 1-based - indexing. - • |:InspectTree| shows root nodes - • |:InspectTree| now supports |folding| • The `#set!` directive can set the "url" property of a node to have the node emit a hyperlink. Hyperlinks are UI specific: in the TUI, the OSC 8 control sequence is used. - • |vim.treesitter.foldexpr()| now recognizes folds captured using a - quantified query pattern. - -• |:Man| now supports `:hide` modifier to open page in the current window. - -• |vim.ui.open()| opens URIs using the system default handler (macOS `open`, - Windows `explorer`, Linux `xdg-open`, etc.) - -• |vim.wo| can now be double indexed for |:setlocal| behaviour. Currently only - `0` for the buffer index is currently supported. - -• Lua type annotations for: - • `vim.*` - • `vim.fn.*` - • `vim.api.*` - • `vim.v.*` - -• Improved messages for type errors in `vim.api.*` calls (including `opts` params) - -• Functions that take a severity as an optional parameter (e.g. - |vim.diagnostic.get()|) now also accept a list of severities |vim.diagnostic.severity| - -• Floating windows can now show footer with new `footer` and `footer_pos` - config fields. Uses |hl-FloatFooter| by default. - -• |:terminal| command now accepts some |:command-modifiers| (specifically - |:horizontal| and those that affect splitting a window). - -• |$NVIM_APPNAME| can be set to a relative path instead of only a name. - -• |:fclose| command. - -• |vim.snippet| handles expansion of snippets in LSP format. - -• 'complete' option supports "f" flag for completing buffer names. - -• |vim.base64.encode()| and |vim.base64.decode()| encode and decode strings - using Base64 encoding. - -• The |TermResponse| autocommand event can be used with |v:termresponse| to - read escape sequence responses from the terminal. - -• 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 - certain conditions. |clipboard-osc52| - -• 'termsync' option asks the terminal emulator to buffer screen updates until - the redraw cycle is complete. Requires support from the terminal. - -• |vim.text.hexencode()| and |vim.text.hexdecode()| convert strings to and - from byte representations. - -• 'completeopt' option supports "popup" flag to show extra information in a - floating window. - -• |v_Q-default| and |v_@-default| repeat a register for each line of a linewise - visual selection. - -• |vim.diagnostic.count()| returns the number of diagnostics for a given - buffer and/or namespace, by severity. This is a faster alternative to - |vim.diagnostic.get()| when only the number of diagnostics is needed, but - not the diagnostics themselves. - -• Introduced |vim.diagnostic.is_enabled()| - -• |vim.deepcopy()| has a `noref` argument to avoid hashing table values. - -• Terminal buffers emit a |TermRequest| autocommand event when the child - process emits an OSC or DCS control sequence. - -• Terminal buffers respond to OSC background and foreground requests. |default-autocmds| - -• |vim.version.le()| and |vim.version.ge()| are added to |vim.version|. - -• |extmarks| can set a "url" highlight attribute, so the text region can - become a clickable hyperlink (assuming UI support). The TUI renders URLs - using the OSC 8 control sequence, enabling clickable text in supporting - terminals. - -• Clicking on a tabpage in the tabline with the middle mouse button closes it. + • Improved error messages for query parsing. -• Added built-in |commenting| support. +• TUI + • Builtin TUI can now recognize "super" (|d (and ) map to |vim.diagnostic.open_float()| - |CTRL-W_d-default| - • Automatic linting of treesitter query files (see |ft-query-plugin|). - Can be disabled via: >lua - vim.g.query_lint_on = {} -< - • Enabled treesitter highlighting for treesitter query files. - • Enabled treesitter highlighting for help files. - • Enabled treesitter highlighting for Lua files. - -• The `workspace/didChangeWatchedFiles` LSP client capability is now enabled - by default on Mac and Windows. Disabled on Linux since there currently isn't - a viable backend for watching files that scales well for large directories. - -• |LspRequest| autocmd callbacks now contain additional information about the LSP - request status update that occurred. - -• |:source| without arguments treats a buffer with its 'filetype' set to "lua" - as Lua code regardless of its extension. - -• |:lua| with a |[range]| executes that range in the current buffer as Lua code - regardless of its extension. - -• |:Man| now respects 'wrapmargin' - -• |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 - - :call netrw#BrowseX(expand(exists("g:netrw_gx")? g:netrw_gx : ''), netrw#CheckIfRemote()) +These existing features changed their behavior. -• |vim.lsp.start()| now creates the following default keymaps (assuming the - server supports the feature): - - |K| in Normal mode maps to |vim.lsp.buf.hover()|, unless |'keywordprg'| - was customized before calling |vim.lsp.start()|. +• API: + • |nvim_buf_call()| and |nvim_win_call()| now preserve any return value (NB: + not multiple return values) -• Terminal buffers started with no arguments (and use 'shell') close - automatically if the job exited without error, eliminating the (often - unwanted) "[Process exited 0]" message. - -• |vim.diagnostic.config()| now accepts virtual text relevant options to - |nvim_buf_set_extmark()| (e.g. "virt_text_pos" and "hl_mode") in its - "virtual_text" table, which gives users more control over how diagnostic - virtual text is displayed. - -• |vim.diagnostic.get()| and |vim.diagnostic.count()| accept multiple - namespaces rather than just a single namespace. - -• |vim.diagnostic.enable()| gained new parameters, and the old signature is - deprecated. - -• 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()| - API function already allowed you to define such ranges, but highlight regions - were not rendered consistently for a range that covers more than one line break. - This has now been fixed. Signs defined as part of a multi-line extmark also - apply to every line in the range, not just the first. - In addition, |nvim_buf_get_extmarks()| has gained an "overlap" option to - return such ranges even if they started before the specified position. - -• The following flags were added to |nvim_buf_set_extmark()|: - - "undo_restore": opt-out extmarks of precise undo tracking. - - "invalidate": automatically hide or delete extmarks. - - "virt_text_repeat_linebreak": repeat virtual text on wrapped lines. - -• LSP hover and signature help now use Treesitter for highlighting of Markdown - content. - Note that syntax highlighting of code examples requires a matching parser - and may be affected by custom queries. - -• Support for rendering multibyte characters using composing characters has been - enhanced. The maximum limit have been increased from 1+6 codepoints to - 31 bytes, which is guaranteed to fit all chars from before but often more. - - NOTE: the regexp engine still has a hard-coded limit of considering - 6 composing chars only. - -• |vim.wait()| is no longer allowed to be called in |api-fast|. - -• Vimscript function |exists()| supports checking |v:lua| functions. - -• Added "force_crlf" option field in |nvim_open_term()|. - -• Attempting to set an invalid keycode option (e.g. `set t_foo=123`) no longer - gives an error. - -• Passing 0 to |nvim_get_chan_info()| gets info about the current channel. - -• |:checkhealth| buffer can now be opened in a split window using modifiers like - |:vertical|, |:horizontal| and |:botright|. - -• |nvim_open_win()| and |nvim_win_set_config()| now support opening normal (split) - windows, moving floating windows into split windows, and opening windows in - non-current tabpages. - -• 'errorfile' (|-q|) accepts `-` as an alias for stdin. - -• |--startuptime| reports the startup times for both processes (TUI + server) as separate sections. - -• |nvim_buf_call()| and |nvim_win_call()| now preserves any return value (NB: not multiple return values) +• Editor + • |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 + :call netrw#BrowseX(expand(exists("g:netrw_gx")? g:netrw_gx : ''), netrw#CheckIfRemote()) + +• LSP: + • LSP hover and signature help now use Treesitter for highlighting of + Markdown content. Note that highlighting of code examples requires + a matching parser and may be affected by custom queries. + • |LspRequest| autocmd callbacks contain more information about the LSP + request status update that occurred. + +• Lua: + • |vim.wait()| cannot be called in |api-fast|. + • |vim.diagnostic.config()| now accepts virtual text relevant options to + |nvim_buf_set_extmark()| (e.g. "virt_text_pos" and "hl_mode") in its + "virtual_text" table, which gives users more control over how diagnostic + virtual text is displayed. + • |vim.diagnostic.get()| and |vim.diagnostic.count()| accept multiple + namespaces rather than just a single namespace. + • |vim.diagnostic.enable()| gained new parameters, and the old signature is + deprecated. + • |vim.diagnostic.config()| now accepts a function for the virtual_text.prefix + option, which allows for rendering e.g., diagnostic severities differently. + +• Options + • Attempting to set an invalid keycode option (e.g. `set t_foo=123`) no + longer gives an error. + +• Terminal + • Terminal buffers started with no arguments (and use 'shell') close + automatically if the job exited without error, eliminating the (often + unwanted) "[Process exited 0]" message. • Treesitter • |Query:iter_matches()|, |vim.treesitter.query.add_predicate()|, and @@ -534,7 +454,7 @@ The following changes to existing APIs or features add new behavior. ============================================================================== REMOVED FEATURES *news-removed* -The following deprecated functions or APIs were removed. +These deprecated features were removed. • Vimball support - :Vimuntar command diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 7ee3769bbd..e105d06ebb 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -1321,7 +1321,11 @@ LanguageTree:included_regions() *LanguageTree:included_regions()* (`table`) LanguageTree:invalidate({reload}) *LanguageTree:invalidate()* - Invalidates this parser and all its children + Invalidates this parser and its children. + + Should only be called when the tracked state of the LanguageTree is not + valid against the parse tree in treesitter. Doesn't clear filesystem + cache. Called often, so needs to be fast. Parameters: ~ • {reload} (`boolean?`) -- cgit From 007adde1994da7f25eaa0e6a4f402587afbc508d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 16 May 2024 06:07:17 +0800 Subject: vim-patch:fed01960d2b0 (#28764) runtime(doc): add missing entries for the keys CTRL-W g and fixes: vim/vim#14777 https://github.com/vim/vim/commit/fed01960d2b0280339bba29183b1c3859366e805 Co-authored-by: Christian Brabandt --- runtime/doc/tabpage.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index 649af628d6..2f50e31ee5 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -216,8 +216,8 @@ gT Go to the previous tab page. Wraps around from the first one :tabl[ast] Go to the last tab page. *CTRL-* ** -CTRL-W g *g* *CTRL-W_g* -g Go to the last accessed tab page. +g *g* *CTRL-W_g* +CTRL-W g Go to the last accessed tab page. Other commands: *:tabs* -- cgit From 618e34ca095739935ac436fec58bb2a223ea3dc1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 16 May 2024 14:29:56 +0800 Subject: vim-patch:5faeb60480c6 (#28768) runtime(doc): clarify {special} argument for shellescape() closes: vim/vim#14770 https://github.com/vim/vim/commit/5faeb60480c6efba5c0468c01275120b6ace5a09 N/A patch: vim-patch:c0e038b59f84 Co-authored-by: Enno --- runtime/doc/builtin.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 031d2d6fcd..bbbabea2a4 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -6962,10 +6962,11 @@ shellescape({string} [, {special}]) *shellescape()* Otherwise encloses {string} in single-quotes and replaces all "'" with "'\''". - If {special} is a |non-zero-arg|: - - Special items such as "!", "%", "#" and "" will be - preceded by a backslash. The backslash will be removed again - by the |:!| command. + The {special} argument adds additional escaping of keywords + used in Vim commands. If it is a |non-zero-arg|: + - Special items such as "!", "%", "#" and "" (as listed + in |expand()|) will be preceded by a backslash. + The backslash will be removed again by the |:!| command. - The character is escaped. If 'shell' contains "csh" in the tail: -- cgit From 668b5fc155af0289c21eabb304c711634472dea8 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 16 May 2024 01:53:33 -0700 Subject: docs: nvim.appdata.xml, set faq to "flow" layout #28769 --- runtime/doc/faq.txt | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/faq.txt b/runtime/doc/faq.txt index ca1429c0f5..7d2774c191 100644 --- a/runtime/doc/faq.txt +++ b/runtime/doc/faq.txt @@ -281,19 +281,17 @@ Run the following from the command line: >bash locale | grep -E '(LANG|LC_CTYPE|LC_ALL)=(.*\.)?(UTF|utf)-?8' < -If there's no results, then you might not be using a UTF-8 locale. See the -following issues: -#1601 https://github.com/neovim/neovim/issues/1601 -#1858 https://github.com/neovim/neovim/issues/1858 -#2386 https://github.com/neovim/neovim/issues/2386 +If there's no results, you might not be using a UTF-8 locale. See these issues: +- https://github.com/neovim/neovim/issues/1601 +- https://github.com/neovim/neovim/issues/1858 +- https://github.com/neovim/neovim/issues/2386 ESC IN TMUX OR GNU SCREEN IS DELAYED ~ This is a common problem https://www.google.com/?q=tmux%20vim%20escape%20delay in `tmux` / `screen` -(see also tmux/#131 -https://github.com/tmux/tmux/issues/131#issuecomment-145853211). The +(see also https://github.com/tmux/tmux/issues/131#issuecomment-145853211). The corresponding timeout needs to be tweaked to a low value (10-20ms). `.tmux.conf`: @@ -310,11 +308,11 @@ corresponding timeout needs to be tweaked to a low value (10-20ms). "WHY DOESN'T THIS HAPPEN IN VIM?" It does happen (try `vim -N -u NONE`), but if you hit a key quickly after -ESC_ then Vim interprets the ESC as ESC instead of ALT (META). You won't +ESC then Vim interprets the ESC as ESC instead of ALT (META). You won't notice the delay unless you closely observe the cursor. The tradeoff is that Vim won't understand ALT (META) key-chords, so for example `nnoremap ` -won't work. ALT (META) key-chords always work in Nvim. See also `:help -xterm-cursor-keys` in Vim. +won't work. ALT (META) key-chords always work in Nvim. +See also `:help xterm-cursor-keys` in Vim. Nvim 0.3 mimics the Vim behavior while still fully supporting ALT mappings. See |i_ALT|. @@ -322,7 +320,7 @@ Nvim 0.3 mimics the Vim behavior while still fully supporting ALT mappings. See ESC IN GNU SCREEN IS LOST WHEN MOUSE MODE IS ENABLED ~ -This happens because of a bug in screen https://savannah.gnu.org/bugs/?60196: +This happens because of a bug in screen https://savannah.gnu.org/bugs/?60196 : in mouse mode, screen assumes that `ESC` is part of a mouse sequence and will wait an unlimited time for the rest of the sequence, regardless of `maptimeout`. Until it's fixed in screen, there's no known workaround for @@ -332,10 +330,11 @@ passed through to Nvim. CALLING INPUTLIST(), ECHOMSG, ... IN FILETYPE PLUGINS AND AUTOCMD DOES NOT WORK ~ -#10008 https://github.com/neovim/neovim/issues/10008, -#10116 https://github.com/neovim/neovim/issues/10116, -#12288 https://github.com/neovim/neovim/issues/12288, -# vim/vim#4379 https://github.com/vim/vim/issues/4379. +- https://github.com/neovim/neovim/issues/10008 +- https://github.com/neovim/neovim/issues/10116 +- https://github.com/neovim/neovim/issues/12288 +- https://github.com/vim/vim/issues/4379 + This is because Nvim sets `shortmess+=F` by default. Vim behaves the same way with `set shortmes+=F`. There are plans to improve this, but meanwhile as a workaround, use `set shortmess-=F` or use `unsilent` as follows. @@ -393,8 +392,8 @@ CMAKE ERRORS ~ `configure_file Problem configuring file` This is probably a permissions issue, which can happen if you run `make` as the -root user, then later run an unprivileged `make`. To fix this, run `rm -rf -build` and try again. +root user, then later run an unprivileged `make`. To fix this, run +`rm -rf build` and try again. GENERATING HELPTAGS FAILED ~ @@ -427,7 +426,7 @@ WHY EMBED LUA INSTEAD OF X? ~ - Nvim also uses Lua internally as an alternative to C. Extra performance is useful there, as opposed to a slow language like Python or Vim9script. - LuaJIT is one of the fastest runtimes on the planet, 10x faster than Python - and "Vim9script" https://vimhelp.org/vim9.txt.html, 100x faster than + and "Vim9script" https://vimhelp.org/vim9.txt.html , 100x faster than Vimscript. - Python/JS cost more than Lua in terms of size and portability, and there are already numerous Python/JS-based editors. So Python/JS would make Nvim -- cgit From b5c3687b6ddae8952510bdbbfa8be577de7edf05 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Thu, 16 May 2024 11:37:46 +0200 Subject: docs: misc (#28761) Co-authored-by: Florian Zeitz --- runtime/doc/news.txt | 96 +++++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 49 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 3ffc844344..6889ce32fd 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -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 the host terminal emulator supports 24-bit color. -• Editor +• Editor: • 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. • "#" followed by a digit no longer stands for a function key at the start 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: line number -> priority -> sign id -> recently placed • `: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 < - - 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 < - -• Events +• Events: • Returning any truthy value from a callback passed to |nvim_create_autocmd()| (rather than just `true`) will delete the autocommand. -• LSP +• 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 })`. @@ -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 removed when calling |vim.lsp.protocol.make_client_capabilities()|. • |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: • |-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()|. • Renamed `vim.treesitter.playground` to `vim.treesitter.dev`. -• Options +• Options: • Removed some Vim 5.0<= option compatibilities: • 'backspace' no longer supports number values. Instead: • 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. • Plugins: - • |:TOhtml| has been rewritten in Lua to support Neovim-specific - decorations, and many options have been removed. + • |:TOhtml| has been rewritten in Lua to support Nvim-specific decorations, + and many options have been removed. -• Treesitter +• Treesitter: • 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|. -• TUI +• TUI: • 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 @@ -144,7 +143,7 @@ NEW FEATURES *news-features* The following new features were added. -• API +• API: • Passing 0 to |nvim_get_chan_info()| gets info about the current channel. • |nvim_buf_set_extmark()| supports inline virtual text. • |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 windows in non-current tabpages. • Flags added to |nvim_buf_set_extmark()|: - - "undo_restore": opt-out extmarks of precise undo tracking. - - "invalidate": automatically hide or delete extmarks. - - "virt_text_repeat_linebreak": repeat virtual text on wrapped lines. + • "undo_restore": opt-out extmarks of precise undo tracking. + • "invalidate": automatically hide or delete extmarks. + • "virt_text_repeat_linebreak": repeat virtual text on wrapped lines. • 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()| 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 = {} < • Enabled treesitter highlighting for: - • treesitter query files + • Treesitter query files • Vim help files • Lua files -• Editor +• Editor: • Better cmdline completion for string option value. |complete-set-option| - • Try it with `:set listchars=` + • Try it with `:set listchars=` • By default, the swapfile "ATTENTION" |E325| dialog is skipped if the swapfile is owned by a running Nvim process, instead of prompting. If you 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 when deleting buffers, and avoids "invalid buffer" cases. #25461 • |:fclose| command. - • |v_Q-default| and |v_@-default| repeat a register for each line of - a linewise visual selection. + • |v_Q-default| and |v_@-default| repeat a register for each line of a linewise + visual selection. • 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 |:vertical|, |:horizontal| and |:botright|. -• Events +• Events: • |vim.on_key()| callbacks receive a second argument for keys typed before mappings are applied. -• LSP +• LSP: • LSP method names are available in |vim.lsp.protocol.Methods|. • Implemented LSP inlay hints: |lsp-inlay_hint| 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 the original LSP `Location` or `LocationLink`. • 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 computing completion items where properties often share the same value (e.g. `commitCharacters`). Note that this might affect plugins and @@ -310,7 +309,7 @@ The following new features were added. gaps) for literal values.) • |vim.region()| can use a string accepted by |getpos()| as position. -• Options +• Options: • 'winfixbuf' keeps a window focused onto a specific buffer • 'smoothscroll' option to scroll by screen line rather than by text line when 'wrap' is set. @@ -338,10 +337,10 @@ The following new features were added. • Startup: • |$NVIM_APPNAME| can be set to a relative path instead of only a name. - • |--startuptime| reports the startup times for both processes (TUI - + server) as separate sections. + • |--startuptime| reports startup times for both processes (TUI + server) as + separate sections. -• Terminal +• Terminal: • |:terminal| accepts some |:command-modifiers| (specifically |:horizontal| and those that affect splitting a window). • 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. |default-autocmds| -• Treesitter +• Treesitter: • Bundled parsers and queries (highlight, folds) for Markdown, Python, and Bash. - • |:InspectTree| shows root nodes - • |:InspectTree| now supports |folding| + • |:InspectTree| shows root nodes. + • |:InspectTree| now supports |folding|. • |:InspectTree| shows node ranges in 0-based instead of 1-based indexing. • |vim.treesitter.foldexpr()| now recognizes folds captured using a quantified query pattern. @@ -377,7 +376,7 @@ The following new features were added. control sequence is used. • Improved error messages for query parsing. -• TUI +• TUI: • Builtin TUI can now recognize "super" (|vim - :call netrw#BrowseX(expand(exists("g:netrw_gx")? g:netrw_gx : ''), netrw#CheckIfRemote()) + :call netrw#BrowseX(expand(exists("g:netrw_gx") ? g:netrw_gx : ''), netrw#CheckIfRemote()) • LSP: • 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 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 longer gives an error. -• Terminal +• Terminal: • Terminal buffers started with no arguments (and use 'shell') close 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 |vim.treesitter.query.add_directive()| accept a new `all` option which ensures that all matching nodes are returned as a table. The default option `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. • |vim.treesitter.query.add_predicate()| and |vim.treesitter.query.add_directive()| now accept an options table rather @@ -456,16 +455,15 @@ REMOVED FEATURES *news-removed* These deprecated features were removed. -• Vimball support - - :Vimuntar command +• Vimball support, including `:Vimuntar` command • Support for legacy treesitter injection queries • 'shortmess' flags: - - |shm-f|. Always uses "(3 of 5)", never "(file 3 of 5)" - - |shm-i|. Always use "[noeol]". - - |shm-x|. Always use "[dos]", "[unix]" and "[mac]" - - |shm-n|. Always use "[New]". + • |shm-f|. Always use "(3 of 5)", never "(file 3 of 5)". + • |shm-i|. Always use "[noeol]". + • |shm-x|. Always use "[dos]", "[unix]" and "[mac]". + • |shm-n|. Always use "[New]". ============================================================================== DEPRECATIONS *news-deprecations* -- cgit From 27fb62988e922c2739035f477f93cc052a4fee1e Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 16 May 2024 14:34:32 +0200 Subject: NVIM v0.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For notable changes, see runtime/doc/news.txt (or `:help news` in Nvim). Following is a list of fixes/features commits. BREAKING -------------------------------------------------------------------------------- - 649dd00fe2e5 remove deprecated functions - 0370e4def0c0 remove neovim qt - 880f7d12fea3 remove vimballs (#22402) - c48b1421af28 rename "playground" => "dev" #23919 - 2f85bbe61513 rewrite TOhtml in lua - abe39f2b243d api: change return type of nvim_win_text_height to Dict (#24365) - 7180ef690180 api: nvim_open_win: noautocmd blocks all autocmds #28192 - 700cab00680f events: trigger CursorMoved later on switching window (#23711) - e4a136f71375 ex_cmds: remove :behave - e5e0bda41b64 lsp: add vim.lsp.status, client.progress and promote LspProgressUpdate (#23958) - 5a363ccac8ff lsp: deprecate trim_empty_lines - 5a2536de0c4b lsp: move changetracking to separate file (#26577) - 58618d208acd lsp: promote LspRequest to a full autocmd and enrich with additional data (#23694) - 1b9ccd38a12f lsp: rename vim.lsp.get_active_clients to get_clients (#24113) - eb1f0e8fcca7 lsp: replace snippet parser by lpeg grammar - 448907f65d67 lsp: vim.lsp.inlay_hint.get(), enable(), is_enabled() #25512 - 7caf0eafd83b lua: add stricter vim.tbl_islist() and rename old one to vim.tbl_isarray() (#16440) - 747264320c6d mappings: remove #n as a notation for a function key (#17318) - f7da47225706 options: graduate shortmess+=f flag - c3d1d9445c70 options: graduate some more shortmess flags - 5df4fdf253f9 options: make OptionSet `v:` values use typval - 881d17a11393 options: remove compatible behaviours for vim 5.0 and earlier - e19cc9c9b715 options: unify `set_option` and `set_string_option` - db590e96d593 startup: "nvim -l" message does not end with newline #24215 - 2ca076e45fb3 treesitter: incremental injection parsing - f5dc45310941 treesitter: new standard capture names - fc0ee871de2f treesitter: remove deprecated legacy injection format - 6debb1852355 treesitter: remove duplicated diagnostic code (#24976) - 18da6964cc61 vim.iter: remove vim.iter.map/filter/totable #26138 - 9b028bd64f42 vim.iter: rename xxback() => rxx() #28503 - 8d4a53fe6e20 vim.json: remove global options, "null", "array_mt" #24070 - 40ce8577977f vim.ui: change open() to return `result|nil, errmsg|nil` #28612 - e0d92b9cc20b vim.ui: change open() to return pcall-like values #28502 FEATURES -------------------------------------------------------------------------------- - a66b0fdfaa35 NVIM_APPNAME supports relative paths #25233 - c0beb8173fe2 add .luarc.json (#24592) - 14b7ffcf89bc add __call typing for vim.inspect() - ca7e488cfeb1 add link in issue template to minimal config template - 4bf47222c973 add vim.text module (#26069) - 0ebc4de0ff93 allow opting in to builtin clipboard providers (#28083) - e8d3c4cccb9d generate types and docs for v variables - 29fe883aa916 ignore swapfile for running Nvim processes #25336 - 28d1640dd604 improve return type annotations for vim.api.* - 199a990c9e4e report "build" in vim.version() #23925 - e68879325393 tostring(vim.version()) - c559ab0ae6be update unicode tables (#27317) - ecdb6465e272 vim.version() returns a Version object - 4b60267f82ef :source: source current ft=lua buffer as Lua code (#23802) - 428edcde7068 api: add forward and back mouse buttons - 037ea6e786b5 api: add nvim__redraw for more granular redrawing - ca9f6f56949d api: add nvim_tabpage_set_win (#27222) - db8fe63a9398 api: add nvim_win_text_height (#24236) - 16513b303375 api: allow floats to be opened in non-current tabpage (#28480) - 6b4970f6e0ac api: allow open_win/win_set_buf in the cmdwin in some cases - 5d921e28c1cc api: allow win_close in cmdwin to close wins except previous - 472271199e48 api: allow win_hide to close cmdwin or non-previous windows - 6bba4becedae api: make nvim_open_win support non-floating windows (#25550) - b162adbb7ca4 api: pass 0 to nvim_get_chan_info for current channel (#27321) - 42bbc4fabcf9 api: support abbreviations in nvim_set_keymap - 98a4ed0a1106 api: support getting abbreviations (#26868) - d3d7d763f3e1 builtin: improve types - 748bc4d22d35 clipboard: add OSC 52 clipboard support - db57df04b6af clipboard: enable OSC 52 clipboard provider by default (#26064) - 734848dc1a9e colorscheme: add semantic tokens modifiers to builtin color scheme - 1e0996b57230 colorscheme: update treesitter groups - 73de98256cf3 comment: add built-in commenting - ae4ca4edf89e complete: support f flag for complete buffer part - 01c51a491330 completion: support completing more string options - ae3685798dea decoration: allow conceal_char to be a composing char - 30a5c28c8740 decoration_provider: log errors as error messages - 9711370c2645 defaults: add :Inspect to right-click menu (#28181) - 2613ba5000d4 defaults: enable 'termguicolors' by default when supported by terminal - 513fc461957f defaults: improve :grep defaults #28545 - c26dc1f77c79 defaults: map Q and @x to repeat in Visual mode (#26495) - 8758c6fb875f defaults: set g:netrw_use_errorwindow = 0 #24179 - 1d81d7a268f5 defaults: treat "•" as a list item prefix #24623 - 20b38677c22b defaults: use ripgrep (rg) for 'grepprg' if available - 61063653b06b defaults: visual CTRL-R for LSP mappings #28537 - 4ee656e4f357 diagnostic: add `vim.diagnostic.count()` (#26807) - 73034611c25d diagnostic: add default mappings for diagnostics (#16230) - fc6d713dd806 diagnostic: add support for many namespaces filtering in GetOpts (#28045) - 5ed9916a28b9 diagnostic: enable(…, opts) - e7801775060e diagnostic: filter diagnostics by specific severities (#24736) - b13e63db1dbc diagnostic: goto functions jump to highest severity (#28490) - 26765e8461c1 diagnostic: is_enabled, enable(…, enable:boolean) - 9cb7e00b9748 diagnostic: provide more control over virtual text display (#24724) - ee41153a9458 diagnostic: revert default behaviour of goto_next/prev() - 07b60efd8058 diagnostic: specify diagnostic virtual text prefix as a function - a3b39784744f diagnostics: support numhl and linehl for diagnostic signs - 0381f5af5bdc diff: grouping optimization for linematch algorithm - 42333ea98dfc docs: generate builtin.txt (#24493) - 9beb40a4db56 docs: replace lua2dox.lua - 1d4a5cd18537 eval: exists() function supports checking v:lua functions (#26485) - 4a1ad676ce0b ex_cmds: no error on :lua with {range} and {code} (#27290) - c2433589dca0 ex_cmds: ranged :lua #27167 - b04286a187d5 extmark: support proper multiline ranges - 1c032ad703a1 extmark: window scoped extmark - 68cb4a7405ea extmarks: add "undo_restore" flag to opt out of undo-restoring - 4e6f559b8c5f extmarks: add 'invalidate' property to extmarks - c249058758af extmarks: add sign name to extmark "details" array - bbd5c6363c25 extmarks: add virt_text_repeat_linebreak flag (#26625) - 15e77a56b711 extmarks: subpriorities (relative to declaration order) (#27131) - f0884f21fa0c extmarks: support hl_mode "combine" for inline virt_text (#24099) - 372aa2eb3db3 float: add fclose command - 35570e4a11be float: implement footer - 4200a0f1678c float: support toggle show float window - 1233ac467de7 fold: transparent foldtext - 71530cc97257 folds: support virtual text format for 'foldtext' (#25209) - 38b9c322c97b fs: add vim.fs.root (#28477) - e3e6fadfd828 fs: expose join_paths as `vim.fs.joinpath` (#23685) - bc67cf3ccdf9 gen_help_html: add anchors to help tags #25112 - b0cf9c5feeae gen_help_html: ignore pi_netrw.txt errors - 81d8fce8f9e1 gen_help_html: non-default vimdoc.so parser - da09f9b551ba gen_lsp.lua: protocol.Methods #24504 - f41496ce74fb gen_lsp.lua: sort by name, handle failure #24504 - 3692fd4c873a gen_lsp.lua: validate CLI args #26514 - 2ff2785c396e health: checkhealth buffer can show in a split window (#26714) - 4382d2ed564b health: fold successful healthchecks #22866 - d1bc6fca7123 health: list attached buffers in LSP report #23561 - 2877672d70e7 health: make :checkhealth support more split modifiers (#26731) - ddda5e0a488b help: hide filename of "gO" outline using conceal #27547 - e72c0cd92090 highlight: Allow hyphens (-) in highlight group names (#24714) - 986bf7e78d09 highlight: add `FloatFooter` highlight group - 574519d9d68f highlight: tweak default color scheme - 64a14026d76b highlight: update default color scheme - a79694a08ede issue_template: instruct not to include a package manager - 69ffbb76c237 iter: add `Iter.take` (#26525) - cebc00603ea3 l10n: update Turkish translations #24246 - fec51229c4a0 l10n: update Ukrainian translations (#24882) - 996dd36c7732 lsp: add actionable advice to lsp client quit error msg (#24510) - 4ff3217bbd87 lsp: add fswatch watchfunc backend - 643546b82b4b lsp: add handlers for inlay hints (#23736) - 317c80f460a7 lsp: add method filter to get_active_clients (#24319) - 688860741589 lsp: add more LSP defaults (#28500) - 0fe86f7e2403 lsp: add opts paramater to vim.lsp.codelens.refresh - 131a1ee82d15 lsp: add original LSP Location as item's user_data in locations_to_items (#23743) - f1775da07fe4 lsp: add snippet API (#25301) - db0ec84fb46b lsp: add type annotations for lsp.util.locations_to_items (#26694) - f190f758ac58 lsp: add vim.lsp.buf.subtypes(), vim.lsp.buf.supertypes() (#28388) - 451bc50d40ee lsp: deprecate severity_limit - e9b85acfbb8d lsp: enable workspace/didChangeWatchedFiles by default (#23190) - 4a09c178a190 lsp: fallback to code-action command on resolve failure (#25464) - 2f22ed6a00db lsp: handle multiple clients in omnifunc (#24381) - 63b340855156 lsp: implement textDocument/diagnostic (#24128) - 5e3cf9fb4bc7 lsp: improve control over placement of floating windows (#24494) - 15641f38cf4b lsp: include positionEncodings in default client capabilities - ddd92a70d2aa lsp: initial support for dynamic capabilities (#23681) - ca5de9306c00 lsp: inlay hints #23984 - 350d81856473 lsp: inlay_hint.is_enabled({filter}) #28523 - 33e1a8cd7042 lsp: map K to hover by default #24331 - 97bea3163a3f lsp: more annotations - 37079fca58f3 lsp: move inlay_hint() to vim.lsp (#24130) - 12c2c16acf70 lsp: opt-in to dynamicRegistration for inlay hints (#24102) - a49924a31852 lsp: remove notify from vim.lsp.buf_detach_client (#25140) - 8149bd089e15 lsp: report fswatch errors - fb54e6980ea6 lsp: set client offset_encoding if server supports positionEncoding - 96e19533f60a lsp: set kind in select call for codelens #23889 - 9af355964306 lsp: set workDoneToken in initialize request (#28182) - f736b075d371 lsp: snippet parsing using lpeg - 134b9ec48361 lsp: soft deprecate vim.lsp.for_each_buffer_client (#24104) - 63f9c2da9aab lsp: support completion itemDefaults - 3f788e73b345 lsp: support connect via named pipes/unix domain sockets (#26032) - 7e36c8e972f0 lsp: support for choice snippet nodes - 5c40f3e86a81 lsp: support vim.lsp.ListOpts.loclist in location_handler() - abd2352bd8b8 lsp: update LSP protocol 3.18 typings to date (#28730) - cfd4a9dfaf5f lsp: use treesitter for stylize markdown - d5063f4b290e lsp: vim.lsp.inlay_hint.enable(nil) applies to all buffers #28543 - c0952e62fd0e lua: add `vim.system()` - 9248dd77ac58 lua: add hl priority opts on yank (#23509) - 642586977158 lua: add meta file for vim submodules (#24525) - 3734519e3b4b lua: add noref to deepcopy - 7c661207cc43 lua: add ringbuffer (#22894) - 877d04d0fb83 lua: add vim.func._memoize - ab1edecfb7c7 lua: add vim.iter (#23029) - d675bd01b1e7 lua: allow vim.F.if_nil to take multiple arguments (#22903) - c379d72c4905 lua: allow vim.wo to be double indexed (#20288) - e52c25b7617a lua: deprecate vim.tbl_add_reverse_lookup - f1dfe32bf555 lua: enable(enable:boolean, filter:table) #28374 - 5b40a1c09dda lua: implement Iter:join() (#26416) - c01e624b0762 lua: more specific error messages for vim.api type checking - e1ff2c51cad7 lua: pass keys before mapping to vim.on_key() callback (#28098) - 2db719f6c2b6 lua: rename vim.loop -> vim.uv (#22846) - 6c0812d92e0c lua: specific error messages for type checking `opts` params - fd089c8e50c2 lua: typing for vim.fn.* (#24473) - 302d3cfb96d7 lua: use callable table as iterator in vim.iter (#23957) - 51c754b62e79 lua: use keyset type information - 8e5c48b08dad lua: vim.fs.normalize() resolves ".", ".." #28203 - 7e70ca0b4808 lua: vim.keycode (#22960) - 9e86f473e0f4 lua: vim.region accepts getpos() arg (#22635) - 4d04feb6629c lua: vim.tbl_contains supports general tables and predicates (#23040) - 48d533272e57 lua-types: types for vim.api.* (#24523) - 25e729970712 man: allow opening pages in current window (#27861) - 08db61b19b8f man: respect 'wrapmargin' when wrapping man pages (#24091) - f9944a78bcd3 meta: add types for vim.lpeg - deb6fd670479 msgpack-rpc: show actual request id in error message - 01fe6b9e6a84 msgpack_rpc: support out-of-order responses on `msgpack-rpc` - 619407eb548c nvim_open_term: convert LF => CRLF (#26384) - e98decf9a68e quickfix: support -q - to read 'errorfile' from stdin (#27303) - 7b0123dd6a06 remote: avoid --remote-ui infinite loop (#24465) - cca6c4c6986a rpc: allow empty string key in msgpack => Vim conversion - d0d4160dd13f runtime: highlight hl groups in syntax.txt (#25050) - 5f4895200a49 scripts: add lsp_types.lua (#23750) - 4e6096a67fe9 server: allow embed with listen (#25709) - 170c890dca8f shortmess: "q" flag fully hides recording message (#27415) - d3582e102b7b statuscolumn: re-evaluate for every screen line (#25885) - 224f303ee54c stdlib: add vim.base64 module (#25843) - fa131de9adb7 tabline: middle mouse button now closes tab (#27522) - c855eee919f2 term: enable reflow by default (#21124) - cd1b14f027f3 termdebug: improve `:Evaluate` floating window (#26621) - cffdf102d4f0 terminal: allow :terminal to take modifiers (#15427) - 0c89854da189 terminal: close shell terminals automatically - 7589336120a2 terminal: respond to OSC background and foreground request (#17197) - beca827212b1 terminal: trigger TermRequest autocommand events (#22159) - c6ec7fa8d741 treesitter: add 'injection.self' and 'injection.parent' - 6cfca21bac6b treesitter: add `@injection.filename` - 5d8ab32f3871 treesitter: add a query editor (#24703) - cb0a1a10b224 treesitter: add bash parser and queries - bb15fa035610 treesitter: add folding for `InspectTree` (#27518) - 9ce1623837a8 treesitter: add foldtext with treesitter highlighting (#25391) - 31c4ed26bc27 treesitter: add injection language fallback (#24659) - 28f54a787823 treesitter: add lang parameter to the query editor (#25181) - 88c8803aa167 treesitter: add python parser and queries - c194acbfc479 treesitter: add query_linter from nvim-treesitter/playground (#22784) - af040c3a079f treesitter: add support for setting query depths - 11844dde81c4 treesitter: bundle markdown parser and queries (#22481) - 5e6240ffc24e treesitter: handle quantified fold captures - f69658bc355e treesitter: highlight Lua files by default (#26824) - 988b472d902e treesitter: highlight help files by default (#26347) - 845d5b8b6419 treesitter: improve query error message - 189fb6203262 treesitter: improved logging (#23638) - c0b99bb1de8d treesitter: show root nodes in :InspectTree (#26944) - cb46f6e46726 treesitter: support URLs (#27132) - ff6092b4ee3c treesitter: update Bash parser and queries to v0.21.0 - 8dda630ae942 treesitter: update C parser and queries to v0.21.0 - 3836eeb90182 treesitter: update C queries from upstream - aca4ad430bdc treesitter: update Lua parser and queries to v0.1.0 - 5e875ae8d07d treesitter: update Markdown parsers and queries to v0.2.1 - 8a3385dde75f treesitter: update Python parser and queries to v0.21.0 - 20dcbaaaf880 treesitter: update Vim parser and queries to v0.4.0 - 987dff6713af treesitter: update Vimdoc parser and queries to v2.4.0 - 1384bebd5aa3 treesitter: update query parser to v0.2.0 - 668f16bac779 treesitter: upstream query omnifunc from playground (#23394) - a478bf936b2a treesitter: use 0-based indexing to show ranges in `:InspectTree` - ac8ed77afb35 tui: add 'termsync' option (#25871) - 4ee9e58056a9 tui: query extended underline support using DECRQSS (#28052) - b4b7ca2d548a tui: support DCS responses in TermResponse event (#26061) - 622ae2f53e77 tui: support Super and Meta modifiers (#24357) - a14267036076 tui: support undercurl in WezTerm (#28037) - 56627ca2423e tui: use TermResponse event for OSC responses (#25868) - 32b49448b227 tutor: add Japanese tutor #27268 - 9c2270b83459 types: add `test/.luarc.json` - d3a8e9217f39 ui: add chdir UI event (#27093) - 6ea6b3fee27d ui: add support for OSC 8 hyperlinks (#27109) - b72931e70407 ui: allow non-zero 'cmdheight' with ext_messages - 2615ed879e66 ui: allow to get the highlight namespace - e38027ef69f7 ui: completeopt support popup like vim - 2e4e12756a69 ui: indicate margins for the area used by win_viewport - efa9b299a7cb ui: inline virtual text - dacd34364ff3 ui-ext: make 'mousehide' into proper ui_option (#25532) - 43ded8d35844 version: unverbose ":version", ":verbose version" #24195 - 0a598c13b186 vim.deprecate: only issue warning if neovim version is high enough - a767c046f4e6 vim.iter: add Iter:flatten (#26786) - af6e6ccf3dee vim.ui: vim.ui.open, "gx" without netrw - fa4b02fa67e5 vim.version: add `vim.version.le` and `vim.version.ge` - 27a566f3f8e0 vimdoc: support Markdown code blocks (#25127) FIXES -------------------------------------------------------------------------------- - f5573fba3d46 Remove nested for_each_tree in TSTreeView (#26328) - ae28ef327e02 adjust error message for error in UI event callback (#28200) - ebe489d8f0ed allow multiline message for echoerr (#25380) - 592bc831ce4b avoid ui_grid_cursor_goto when drawing window separators - d6483793e1c3 buffer overrun in lmpack_session_receive - 3bbb0aa3993f checkhealth warning even if init.lua exists #25306 - 5cb906e91cb5 correct versions in deprecation warnings - 118fd8367c39 deduplicate gen_cflags - eb4676c67f5d disallow removing extmarks in on_lines callbacks (#23219) - 6e9b204afbe5 doc errors - 77d3526a3d08 explain that user should run nvim with -V1 to see more information - fd791db0eceb fix ASAN errors on clang 17 (#25469) - bb38c066a965 fix compiler warning from clang - 478273a4233d fix iter_matches call in query linter (#27496) - bb7324292cda flush UI state before blocking in vim.wait (#25938) - 44d4ae448d0a function was renamed (#23772) - 1dd700a8d927 gf fails on "foo/bar.txt:1:2" on Windows - 6e703f778fe7 handle argv not present in nvim_get_chan_info - 56dc8b9212ef heap-buffer-overflow in file_name_in_line - 74b2f6c3d956 ignore non-existent properties during header generation - f5a09f1b0352 invoke changed_bytes when rewriting char #25125 - b8273c9a3396 lua annotations - 69d49727d776 luacheck - 4ce3159e24e1 missing case in setxattr error handling (#26176) - 41fb98d6fab5 move fswatch linux check inside of vim.schedule (#27824) - ba58c6f8a44c only attempt to close timer if not already closing (#26047) - b400b947f368 prevent child processes from inheriting ui channel file descriptors - 99b8a343e197 quick update, squash later - 83b51b36aa46 raise TS min version - a090d43d61b5 splitting of big UI messages - 2424c3e6967e support UNC paths in vim.fs.normalize - 43e76cc3462b tostring(vim.version()) fails if build is NIL #24097 - 8c7a8be27437 transposed xcalloc arguments (#28695) - 35f453f65df2 type warnings in shared.lua - f112ac73bd34 unreliable "checkhealth completions" test - b32b5b2711ed use BEL to terminate OSC 11 request (#26335) - d95e3a4c9c8f use no_ff instead of ffdos as condition - a1bec02c1e10 use snprintf instead of sprintf - ca887b80a911 version-range < and <= #23539 - c1ee187f8214 vim.loop in luv threads (#23924) - fe4583127f0a vim.validate() order is not deterministic #28377 - be8b15200d70 windows timeouts have exit code 1 - 1f8fb7c00048 :let: fix error when applying operator to boolean option (#24030) - 5a3752889c5b NVIM_APPNAME: show error message if $NVIM_APPNAME is invalid - c4ad15ae324f PVS/V009: add top-level message - 128e194f64b0 PVS/V1001: variable is assigned but is not used - 1bbbca267d05 PVS/V547: expression is always true/false - 592e4472da5f PVS/V564: the '|' operator is applied to bool type value - 30d311ebcf94 PVS/V592: expression is enclosed by parentheses twice - 3ecd45ded044 api: allow negative column arguments for nvim_buf_set_text (#23501) - 3ac952d4e27f api: avoid assertion when autocmd group id is 0 (#23210) - b2a8a9314798 api: avoid immediate TextChanged with nvim_create_buf (#25492) - ef7ae66eef4e api: avoid integer truncation - b1e24f240bae api: avoid open_win UAF if target buf deleted by autocmds - 0a81ec14a4c0 api: better topline adjustments in nvim_buf_set_lines - c18f3cfcdb8f api: crash after nvim_win_set_config title/footer validation error (#26606) - aa4e47f704c5 api: disallow some more functions during textlock - 22d9338afcea api: disallow win_set_buf from changing cmdwin's old curbuf (#24745) - da979ae04b7a api: do not re-apply win_config.style when missing - 344906a08f09 api: do not update grid position in nvim_win_set_cursor (#28235) - 22205f36a621 api: don't change title when setting buffer in a window (#23492) - 711a2f5ff67d api: don't leak memory with nvim_win_get_ns (#27570) - 1cf51a07a6bf api: don't set coladd of mark (#26648) - 5fd1bac65ed0 api: don't use stl 'fillchar' for "use_statuscol_lnum" (#27501) - a3751f5de22f api: dont change curwin for nvim_win_set_height - 1ff4562502e1 api: dont change curwin for nvim_win_set_width - 59fed8bb6457 api: extmark highlight groups not always included in details (#23179) - 9b9030ff2ca8 api: fix inconsistent behavior of topline touched in recent refactor - fc2a56fe61a9 api: fix set_lines viewport adjustment, but this time good - b7763d7f6b7f api: get virtual text with multiple hl properly (#25307) - b3be7b741386 api: handle NUL in nvim_err_write() and nvim_out_write() (#25354) - 132bbd1cbd49 api: handle clearing out last line of non-current buffer - d942c2b9432d api: handle win_split_ins failure properly - 5cfdaaaeac0f api: ignore 'autochdir' when renaming other buf (#28376) - 2fc234372883 api: ignore 'autochdir' when setting buf in other win (#28371) - 7367838359bf api: limit depth of nvim_cmd (#27225) - 0da27e9bdec1 api: load buffer first on nvim_buf_set_lines (#25823) - 4e5c633ed487 api: make getting explicit empty hl in virtual text work (#28697) - d05d63a18ff8 api: make nvim_get_hl not return non-existing groups - a70eae57bd44 api: make open_win block only enter/leave events if !enter && !noautocmd - 5d58136cccc7 api: make open_win/win_set_config check if splitting allowed - 4ec8fd43bfdf api: make width/height for split by nvim_open_win work (#28341) - b1577d371a6d api: make win_set_config with "win" for splits need "split/vertical" - 0330dd9e69de api: mark nvim__complete_set as experimental #28579 - d22172f36bbe api: more intuitive cursor updates in nvim_buf_set_text - b051b131f5ce api: nvim_buf_get_offset in a new buffer with zero or one lines - e0453d7f5743 api: nvim_cmd{cmd="win_getid"} parsed as :winsize #24181 - 6091df6b7a06 api: nvim_create_buf assert fails if autocmds set &swapfile - d5c23d72a5e4 api: nvim_create_buf leaks memory if buffer is loaded early - b7708eac24c2 api: nvim_get_hl should return default flag - a741c7fd0465 api: nvim_parse_cmd error message in pcall() #23297 - e55a502ed413 api: open_win fire Buf* events when !enter && !noautocmd if entered early - a873f33993ef api: open_win fire BufWinEnter for other buffer when !enter && !noautocmd - e7c262f5553c api: patch some cmdwin/textlock holes - a9968912b741 api: redundant error when using `nvim_cmd` (#24010) - dbcba26bf1e4 api: revert unintended change of optional bool params - b25753381c60 api: set script context when using nvim_set_hl (#28123) - d3ea9a04bc73 api: update "w_scwidth" in nvim_eval_statusline() - c971f538ab87 api: update grid cursor in nvim_win_set_cursor() - 130cb4815a5c api: use a conditional stack for nvim_cmd (#26341) - cf9f002f31c8 api: use correct buffer for "range" in nvim__redraw (#28614) - 77118d0da8ba api: use text_locked() to check textlock - bcb70eeac480 api: win_set_config autocmds crash when moving win to other tabpage - 233649bc7577 api: win_set_config fires unnecessary autocmds - b52d15853e89 api: win_set_config set tp_curwin of win moved from other tabpage - 54022a2946ac api: win_set_config update statuslines after removing splits - a9cd8467cbd5 api: wrong nvim_buf_set_extmark error for invalid hl_mode - 4d3a38ac074f api, lua: handle setting v: variables properly (#25325) - 92760a7f42a9 api, lua: make blank lines in a message work properly (#24244) - 08fc1ebbaa49 api/buffer: fix handling of viewport of non-current buffer - 24e3ee9d07e1 api/options: validate buf and win - 139e6f68f937 autocmd: API functions accept garbage after event name #25523 - 02d00cf3eed6 backup: E1509 when writing extended attr to symlink (#28014) - 746a153bc1a1 base64: only check padding if leftover index is set (#25854) - 533e01a75b71 base64: properly handle embedded NULLs when decoding (#28349) - 095bd8d0f834 buffer: do not filter help buffer - e5d9b15044d5 buffer_updates: correct buffer updates when splitting empty line - 11865dbe3917 build: better deps for doc - ffaf74f1477d build: distinguish vim.mpack from global require'mpack' - f9416470b15b build: include FindPackageHandleStandardArgs - ade42d531bcc build: teach cmake about vvars - da7178cbbf4e builtin: fix incorrect optional fields for fn.sign_define - 6fa0f303d7f0 builtin: parameter mismatch between winsaveview and winrestview - 3159a2c28f5e change: update fold after on_bytes (#26364) - 342c7da4bd2c channel: use os_write() instead of fwrite() for stderr (#26689) - cd6458123fb4 charset: fix wrong display of 0xffff (#24158) - 603f3b36a4d5 checkhealth: error in node.js check #28348 - b0978fca6b82 checkhealth: fix crash due to incorrect argument type - 7f94a032e1cf checkhealth: shell_error and cpanm module - bfdec5b0e719 clang: null pointer dereference in parse_msgpack #25389 - 1027ccac6d0a clangd: check size of array before applying qsort on it - cdd801746943 clangd: set block pointer to null in case map is empty - 6851b265ba1d clipboard: don't pass --foreground to wl-copy (#25481) - c3de6524a53d clipboard: ignore exit caused by signal #23378 - 3128cff6b198 clipboard: increase OSC 52 wait timeout (#25936) - 46ceefb52be6 clipboard: make getreg() accurate for clipboard registers (#26740) - d2983dcdb1ca clipboard: make osc52 work with PUC Lua (#26014) - e51e52417550 cmake: restore previously undocumented workround, now documented - 3688735c2b63 cmdline: don't redraw 'tabline' in Ex mode (#24123) - c72d877c3374 cmdline: wrong 'incsearch' highlighting after :redraw (#27947) - bc67bbe4469b codelens: add buffer and line checks before displaying codelens (#23887) - 2b1a6e759709 colorscheme: add missing LSP groups - 0c850add3ece colorscheme: default statusline groups usability #26921 - 8b2365369503 colorscheme: link LSP semantic tokens to treesitter groups - 62e0e0349c00 colorscheme: try .lua files in 'rtp' before .vim files in 'pp' (#23727) - eca72def1f08 colorscheme: typo - d4bd6b1eaab3 colorscheme: use explicit normal foreground in syntax groups - 3c724fe1f3ef column: 'statuscolumn' not drawn after virt_lines with "n" in 'cpo' (#22967) - cdc028e97d98 column: add truncated width during estimation for 'statuscolumn' - e89071522cb0 column: always set b_signcols.max - c126a3756a09 column: apply numhl signs when 'signcolumn' is "no" (#26167) - 2ded2e75f4a6 column: avoid exceeding configured 'signcolumn' width - b50fdcba4a1d column: clear "b_signcols" before moving saved marks - 13d50c3b13fb column: clear "b_signcols" when marktree is cleared - ec7453804421 column: correct width after truncated 'statuscolumn' error (#26737) - 2bdef6dd2a75 column: don't overflow sign column with extmark signs (#23854) - bab4bcdefbda column: don't reset 'statuscolumn' width after it has been drawn - c509f4907bf7 column: fill 'statuscolumn' clickdefs with evaluated width (#26891) - 25e62697c32e column: fix wrong cursor with 'statuscolumn' and cpo+=n (#24268) - dbf6be296df6 column: full redraw with 'stc, 'rnu' and inserted lines (#27712) - 7d0a23973b7d column: handle unprintable chars in 'statuscolumn' (#24198) - 0db6946b39fd column: handle w_redr_statuscol at end filler lines (#27365) - 97122eaa1cbe column: ignore empty signcols range (#28177) - 967c7abde3c6 column: keep track of number of lines with number of signs - f871fee8b699 column: pass kFalse when initializing "b_signcols.count" - 44d4f0357341 column: rebuild status column when sign column is invalid - c6864b0d146f column: redraw 'statuscolumn' on wrapped lines with 'relativenumber' - 35cec0de4acd column: redraw and update signcols for paired extmark - d88814ef68b3 column: remove sign from line it was previously on with undo - df399ea0d20e column: reset decor state before starting from top - 5a4e0b837f90 column: use a single path for sign sorting (#27431) - a878e02d5de7 column: use maxwidth to allocate/fill 'statuscolumn' click defs #24190 - 783b0aba4116 completion: check that healthcheck name is string (#28458) - fbeef0d4ef1a completion: don't add backslashes to runtime pattern (#24296) - cdc8bacc7945 completion: filter results with complete+=f (#26029) - af8500af6457 completion: improve popup window position (#26739) - d1b2a5cf5fa5 completion: make sure the buffer name is valid (#25975) - e9b9a86cd5a5 context: don't crash on invalid arg to nvim_get_context (#25977) - fdaf6bc5573f context: don't leak memory on multiple invalid objects (#25979) - 55be4a4e26ea coverity: dead code #25562 - 6d698c86d0bd coverity: unhandled retval for marktree_itr_get_overlap() #26518 - 6f49ed58c3d8 coverity/348240: memory leak in put_view() - 9d48266bed96 coverity/471380: null dereference in get_local_additions() - ae48d965d70c coverity/477623,477624: guard null pointer dereference in kv_concat_len (#27022) - 2b0acacb3c2c decor: allow adding providers during redraw - 5ca330859cf2 decor: check decor kind before accessing union field (#27205) - 60d320dea3fe decoration_provider: don't leak memory on error (#24410) - 65738202f8be decorations: better approximation of botline #24794 - 2accf2480530 decorations: crash with revised mark with changed decoration flags - a0e9ef09d7af decorations: do not apply sign highlight id as range attr id - fba17d5b882e decorations: fix imbalanced sign count - 444f37fe510f decorations: incompletely displayed line should also get decorations - dc48a98f9ac6 decorations: validate botline for on_win - 328a2373514a defaults: auto-close terminal for &shell with args (#28276) - 5aa1ba3efe05 defaults: background detection in tmux (#26557) - 5e98439f6d8c defaults: diagnostic mappings descriptions #28646 - ccb5a76e5a2c defaults: don't use nvim_feedkeys in default mappings (#24520) - 85cb0b0ddc59 defaults: make terminal autoclose not block other events (#27581) - aa1d0ac095dc defaults: only repeat macro for each selected line if linewise (#28289) - eef2aedff631 defaults: remove tmux background detection passthrough (#27571) - 5b45efbee6eb defaults: set 'fsync' #26034 - 8df374237814 defaults: use augroup for default autocommands (#26933) - a8e4ee2f2b43 defaults: validate 'channel' before responding to OSC request (#27594) - 6318edadc32a defaults: visual hash (#) on text with "?" - abd380e28d48 defaults: visual mode star (*,#) is fragile - b9a0e762f1d7 defaults: visual star (*) on text with "?" - 9b4b23493d69 defaults: wait until VimEnter to set background (#26284) - 72e3d8c3f949 deps: bump luv to 1.48.0-2 - 87db6d894ad2 deps: make sure --force-config takes effect - 7aad4643f9a6 deps: remove stray conflict marker - 8a6716682e6e deps: restore functionality of USE_EXISTING_SRC_DIR - d4dc884012e8 deps: restore functionality of USE_EXISTING_SRC_DIR - d27214331815 diagnostic: always return copies of diagnostic items (#25010) - 29d5ff6ac4ea diagnostic: check for sign namespace instead of sign group - 3d8f0cb695a5 diagnostic: check if delete failed in `qf_fill_buffer()` (#25932) - 89ffdebd20fd diagnostic: fix typing on field |diagnostic-severity| - 83635e4e3db9 diagnostic: get border from config (#28531) - 96f59e1b9902 diagnostic: invalid col number compare in next_diagnostic (#28397) - ad76b050eb2c diagnostic: open_float on multi-line diagnostics #28301 - 37011bc45ef3 diagnostic: rename buffer → bufnr in type annotation (#23042) - 50284d07b6f0 diagnostic: typing - a4fc3bb0e68c diagnostic: vim.diagnostic.get(…,{lnum=…}) on multi-line diagnostic #28273 - add1b10b7901 diagnostic: virtual_text prefix function should have index and total (#25801) - 35f475d0a51a diagnostics: if buffer not loaded, skip handlers that set extmark (#25628) - 5a25dcc5a4c7 diff: filler lines for hunks bigger than linematch limit (#24676) - 2f9ee9b6cfc6 doc: improve doc generation of types using lpeg - c4417ae70c03 doc: prevent doxygen confusion - 67f53323446d docs: clean up non-docstring comments for vimdoc gen - ae7020c667b5 docs: fix TSNode incorrect signatures - ab65a98adba4 docs: ignore_invalid #24174 - f40df63bdca3 docs: make lines not overflow in vim docs - 0a90e4b05ad3 docs: match DocSearch style with site theme - 0d149bb18639 docs: the runtimepath is not the runtime path - 957d05d16bc8 docs: too much whitespace around
 blocks #24151
- d931b829e926 docs: vimdoc syntax errors
- 036da0d07921 docs: vimdoc syntax errors
- 17c59e417f81 docs: vimdoc syntax errors
- 34b57508a78b drawline: check filler_todo in place of removed draw_state (#27889)
- 455bca1ba86a drawline: combine extmark highligh with area hl correctly
- 329979715063 drawline: consider position in linebuf for foldcolumn (#26803)
- 889f81c65fa4 drawline: don't invoke on_line for filler line (#28219)
- 2b9d3869f8f3 drawline: don't use temporary "v" variable when not needed (#26777)
- 06694203e51e drawline: fix missing Visual hl on double-width fold char (#24308)
- d5488633f68f drawline: initialize linebuf_attr to 0 instead of -1 (#27840)
- e9280a68f7ea drawline: initialize variable
- 2819718873a3 drawline: initialize variable
- 36941942d609 drawline: inline virt_text hl_mode inside syntax/extmark hl (#24273)
- 37b73cf14b11 drawline: make cursorlineopt=screenline work with resized grid
- be1d09c42722 drawline: missing NUL termination when drawing TAB (#27307)
- 5b3144781137 drawline: update prev_ptr after getting syntax attrs (#27072)
- 14839c5d18c2 edit: backspace adds extra spaces for inline virtual text (#28005)
- 267e90f31d18 edit: don't go to Terminal mode when stopping Insert mode (#27033)
- b2e8c0df2062 edit: fix K_EVENT interfering with 'digraph' (#24258)
- 143a17833280 editorconfig: add missing root validation (#23462)
- cbbda3bcd775 editorconfig: check that buffer is valid (#23922)
- abb8c2c453d1 editorconfig: do not set 'endofline'
- df2f5e39127e editorconfig: highlight properties with dashes (#24407)
- dc45fb4655f5 editorconfig: only warn once on errors
- cdbc3e3f3e95 editorconfig: syntax error regression
- bf0c69e50410 eval: correct failure return value for readfile/blob (#27722)
- 5b312cd5f676 eval: make has('pythonx') work properly (#27739)
- 0e4086b74189 eval: prevent double-free in garbage collection (#22990)
- 12d123959f56 eval: properly support checking v:lua function in exists() (#27124)
- b8c34efe3399 eval: skip over v:lua properly (#27517)
- ad2fad9a3b07 event-loop: flush UI when no input is available (#25728)
- 672556525893 event-loop: process input before events (#27358)
- 58a1ef8e6a93 events: avoid unnecessary CursorMoved (#24675)
- bf9e92c81c3c events: check for WinResized/WinScrolled in terminal mode (#27226)
- dd24ea819507 events: don't expand non-file as file name
- 774a32e5fe73 events: null dereference in autocmd functions
- a8cfdf43bc62 events: trigger VimResume on next UI request (#24426)
- a114a21eff58 ex_getln: initialize pointer with NULL
- 9e7c4fe57915 exception: remember whether message is multiline (#25351)
- 4a098b97e535 excmd: append original command to error message
- 75d9c413d492 excmd: make :def unknown rather than unimplemented (#23150)
- f1dd75c2af40 exitfree: don't use ex commands to close windows in free_all_mem()
- 79a558277b1b extmark: fix crash when stepping out from internal node
- a78fd18ed92d extmark: fix cursor position with both left and right gravity inline text
- 320e9c1c2181 extmark: only invalidate unpaired marks on deleted rows
- 8e97edb93f01 extmark: restore extmarks when completing original text
- 2d33a766a17b extmarks: `U` changed_bytes after extmark_splice (#26501)
- 23c21e763074 extmarks: account for rightleft when drawing virt text (#25262)
- d54156ed08b8 extmarks: blending space shouldn't overwrite wide char (#26960)
- 54225bdb021e extmarks: crash with sign after many marks
- 65b1fd00a7aa extmarks: do not remove decor from invalid old marks
- 437d35dbf7d9 extmarks: do not remove invalid marks from decor upon deletion
- a05bbc60eaf2 extmarks: don't position overlay virt_text halfway a char (#24027)
- 4dd43e31db8f extmarks: don't show virt lines for end mark (#23792)
- dfa8b582a64a extmarks: draw TAB in virt_text properly with 'rl' (#25381)
- a6e4793bafa0 extmarks: draw virt_text below diff filler lines properly (#25170)
- 958cc22836f1 extmarks: empty inline virt_text interfering with DiffText (#24101)
- 0534ad8ca57b extmarks: empty inline virt_text interfering with Visual highlight
- 31a51acdc353 extmarks: fix heap buffer overflow caused by inline virtual text (#23851)
- 9c41a81dec15 extmarks: fix virt_text_hide off-by-one hiding (#23795)
- a6dd67f5b66c extmarks: fix virt_text_hide with 'nowrap' and multibyte (#23757)
- 818d7f6daf30 extmarks: fix win_col virt_text drawn on wrong screen line (#25264)
- c4df2f08b689 extmarks: fix wrong highlight after "combine" virt_text (#24281)
- b65cd7ff1a0a extmarks: fix wrong virt_text position after wrapped TAB (#25168)
- 4c7cec4e2934 extmarks: handle inline virt_text with empty chunk (#24005)
- ee3d4f6b90d0 extmarks: handle overwriting right half of wide char (#26951)
- f4f1ce1d167c extmarks: hide inline virt_text properly with 'smoothscroll' (#24106)
- 34a786bc4959 extmarks: inline virt_text support multiple hl groups (#25303)
- 5a6c7c805b8b extmarks: make empty "conceal" respect &conceallevel = 1 (#24785)
- 510e1f131b56 extmarks: make right_align and win_col work on wrapped line (#23759)
- 215244f74950 extmarks: missing "spell" and "conceal" in details (#27116)
- 35e50d79c630 extmarks: overlay virt_text position after 'showbreak' (#25175)
- a0790558c309 extmarks: priority order of inline and non-inline virt_text (#27532)
- b52bd8a2dea8 extmarks: properly handle virt_text on next screen line (#25166)
- a376d979bda1 extmarks: redraw line on adding/removing conceal (#27463)
- 2d9e063a63f8 extmarks: redraw pre-undo position (#27437)
- 2137edbd4f15 extmarks: redraw properly with scoped inline virt_text (#27569)
- 1cc358aed6fd extmarks: restore old position before revalidating
- 0818d655288e extmarks: skip virt_text if it is out of window (#25658)
- 19d63563e1cc extmarks: splice earlier when opening new line (#28108)
- 362df0f7938a extmarks: wrong display when changing text with virt_lines (#24879)
- d5a85d737aa2 f_wait: flush UI before blocking (#25962)
- 81f67b79e8a3 file_search: path with spaces in finddir() and findfile() (#25493)
- a69c72063994 fileio: fix off-by-one in rename_with_tmp (#27780)
- c6c21db82b31 filetype: add typing and dry (#24573)
- 020d1f626a3f filetype: call on_detect before setting buffer filetype
- fdf5013e218c filetype: correctly detect bash-fc-{id} files as "sh"
- d6f406db4527 filetype: don't use fnamemodify() with :e for extension (#27976)
- 670c7609c855 filetype: make sure buffer is valid before call nvim_buf_call (#24922)
- af38b46a2574 filetype: return on_detect function when matching by file contents
- 2955c921ceaf filetype: use unexpanded file name (#27931)
- e32af31ee89c flake: clang-tools moved to nativeBuildInputs (#26955)
- fd08fd3de302 float: add fixd option
- 884470124db3 float: allow floating window in cmdline area
- 9ecb43b6372f float: apply 'winblend' to title/footer highlight (#25999)
- 898371fc9fae float: don't relative flaot win itself
- fcdfbb430377 float: fix some other crashes with :unhide or :all (#25328)
- 3ea124a8d9f0 float: improve error message when reconfig failed (#25076)
- c5abf487f19e float: make "fixed" work with relative=win (#25243)
- 03e8b5fc91f9 float: make bufpos work properly with resized parent grid
- 437ed3cee2d2 float: trigger winnew event when float window create
- f5953edbac14 float: update position of anchored windows first (#25133)
- 9de157bce4b6 float: win_get_bordertext_col returning negative column number (#25752)
- 5f18dd301375 float: wrong position when bufpos is set
- 0e01e815520e folds: allow overlay virtual text on folded line (#23892)
- ee986ee0449b folds: combined Folded and Visual highlights (#23752)
- ded01a819ab0 folds: don't show search or match highlighting on fold (#24084)
- 811140e276a6 folds: fix missing virt_lines above when fold is hidden (#24274)
- 678548a2b446 folds: show Folded highlight in Visual selection (#23741)
- 58f94861442d folds: update folds in Insert mode with fdm=indent (#24402)
- 38e38d1b401e fs: allow backslash characters in unix paths
- 8a7e3353eb5b fs: make `normalize()` work with '/' path (#24047)
- ae5095cac9b2 fs: use generics for better typing
- e4da418ba838 fs.lua: normalize slash truncation (#23753)
- 06fcf71bd095 fswatch: --latency is locale dependent
- 502a7a0558b0 ftplugin: respect runtimepath ordering
- 03a2c5b77200 ftplugin: source Lua files after Vimscript files per directory (#23801)
- be5cf3383622 gen_help_html: type warnings, spell_ignore_files #27254
- 6c35fb421e88 gen_lsp.lua: improve type name, and fix wrong type inheritance
- 214b12513277 gen_lsp.lua: no notifications in lsp.Methods #24530
- 765729a145d3 gen_vimdoc: INCLUDE_DEPRECATED not generating docs for deprecateds
- ccf328172bac gen_vimfn_types: don't include tag before signature's line (#24492)
- 86c9d8b53cd9 gen_vimvim: correctly add aliases to vimAutoEvent (#23429)
- 240c41e1af55 genvimvim: add special abbreviations of :delete (#23172)
- 51ea753747c7 genvimvim: generate prefixed boolean options properly (#27487)
- 9f32deba56ea grid: add start column when getting char on line (#25627)
- 4ed1c2a8afc7 grid: don't draw beyond max column (#26172)
- 9c202b9392f3 grid: handle clearing half a double-width char (#27023)
- 6a486c44e66f gx: move to to _init_default_mappings #24420
- 67b2ed1004ae gx: visual selection, expand env vars
- e39b6d0c5241 health: "attempt to concatenate nil"
- 7ffe450173d2 health: check for _host_prog variables properly (#23014)
- 50cd5ed360ee health: check more "old" files
- f6dcc464f220 health: check unmatching python_glob as empty table (#28215)
- 6818ba271cb4 health: clients may not support watchfiles #28710
- 03a021f378e8 health: combine python and virtualenv healthchecks (#23004)
- c67efe3a9c5b health: correctly expand and resolve PYENV_ROOT (#26953)
- 88eb0ad149d3 health: fix tmux RGB capability detection (#26886)
- cde4892b4955 health: fix typo in function name
- 63a17322dd83 health: improve python executable check error handling (#26954)
- ba88fd886ae8 health: malformed call to warn() #26217
- 8c6f97bef89d health: properly use the value of $PYENV_VERSION (#23109)
- c8ebb04e92c9 health: replace healthFoo with DiagnosticFoo (#23475)
- 843c1bed95d3 health: stop job properly on timeout (#23877)
- 96d0c709b66e healthcheck: expand vimrc variable (#28379)
- 4229bbe514b7 helptags: make multibyte help tags work properly (#23975)
- 7b6d041baed7 heredoc: allow missing end marker for scripts
- a2f17e97ec2d highlight: add `FloatFooter` to 'highlight_defs.h' (#25577)
- 837f26809373 highlight: add `Nvim{Light,Dark}Gray{1,2,3,4}` colors
- 8afb3a49c076 highlight: add create param in nvim_get_hl
- f8ea49cfe1f4 highlight: add force in nvim_set_hl
- 4ce0ada0d4c8 highlight: add missing g: prefix for colors_name (#22952)
- 03ca36d1f8d0 highlight: apply 'winblend' to NormalNC (#23555)
- 6c3e170e5668 highlight: apply 'winblend' to float border (#25981)
- d4872377fef7 highlight: attr set all when normal attr changed
- dcaf2073369c highlight: combine ColorColumn with low-priority CursorLine (#23017)
- 66925f14de81 highlight: consistently spell "Goldenrod"
- 51836517738b highlight: correct hi command output
- ca7dd33fa783 highlight: don't show CursorColumn on current line (#27848)
- 59289fb987bd highlight: make CurSearch work properly with 'winhl' (#24448)
- b11a8c1b5d39 highlight: remove unnecessary assignment to char_attr for 'spell' (#23713)
- 9a2c98087b90 highlight: update `IncSearch` to link to `CurSearch`
- ab9257575387 highlight: winhl receive wrong argument
- b60a2ab4cb7b inccommand: block errors when parsing command line again (#24374)
- bc5b0da84ec4 inccommand: don't crash with "split" and 'n' flag
- 382ea4d40282 inccommand: don't preview in Ex mode (#26587)
- c1c2a1b5dd1d inccommand: don't save information of a buffer twice (#24501)
- ef44e597294e inccommand: don't set an invalid 'undolevels' value (#24575)
- ba9f86a9cee5 inccommand: improve preview buffer number handling (#27087)
- 643bea31b867 inccommand: restrict cmdpreview undo calls (#24289)
- 1dba570e63ed inccommand: save and restore '[ and '] marks (#26442)
- 35ffe58ea4a3 inccommand: update topline after moving cursor (#27341)
- a14c7809181c input: set termkey buffer size to read stream capacity
- b61575ba70f8 intro: clear intro if new buffer is shown in focused float
- 9530a2301680 intro: link showing intro to state at start
- 0570a19c8a84 intro: make intro explicitly stateful
- d1a30221fcb1 intro: redrawing intro exposing pseudo-randomness
- 21360523cd3d intro: still show intro message with floating window
- 6b96122453fd iter: add tag to packed table
- 2ee8ace217b8 iter: make pipeline termination conditions consistent (#24614)
- 94894068794d iter: remove special case totable for map-like tables
- 57ccd8241735 job-control: fix use after free (#25223)
- 1c71c32b2910 job-control: make jobwait() flush UI after hiding cursor (#25927)
- e057b38e7037 json: allow objects with empty keys #25564
- af6537bc66e2 jumplist: Ctrl+o, Ctrl+i weird behavior when deleting buffers #25461
- 017ff93b020e keycodes: recognize  as a key (#24700)
- 6709f7f8f130 keycodes: simplify S- properly when D- is present (#27316)
- 4447cefa4815 l10n: update Japanese translations (#27856)
- 7d17ab5b6f07 l10n: update Ukrainian translations (#26819)
- 908843df61fc languagetree: apply `resolve_lang` to `metadata['injection.language']`
- e353c869cea4 languagetree: don't treat unparsed nodes as occupying full range
- 6b5f44817e93 languagetree: remove double recursion in LanguageTree:parse
- f5530bf566f6 linematch: initialize array
- 766f4978d6cb lint: lint warnings #24226
- 5465adcbab29 lint: use tbl_contains
- 0804034c07ad loader: cache path ambiguity #24491
- 89135cff030b loader: remove cyclic dependency on vim.fs (when --luamod-dev)
- 66c66d8db8ab loader: reset hashes when running the loader
- ec80e4cb4d31 log: increase size of buffer for nvim instance name
- 4d0f4c3de9cb lsp: E403 if doc contains multiple codeblocks #24458
- 20c331915f4e lsp: SignatureHelp docstring is not escaped #16702
- 01691c5447d9 lsp: abort callHierarchy on no result (#28102)
- 9abced6ad95f lsp: account for border height in max floating popup height (#25539)
- 3e016fa8d4f7 lsp: actually send diagnostic-tags back to the server
- 37d8e5045936 lsp: add "silent" option to vim.lsp.start (#28478)
- 2e1f5055acde lsp: add assertion for explicit bufnr in apply_text_edits (#27614)
- 542c910a1d3f lsp: add missing LSP semantic token highlight links
- be5e36115410 lsp: add param assert in client_is_stopped (#23857)
- ac0e8323dc82 lsp: add parentheses to generated union array types (#27560)
- 0fcbda59871e lsp: add snippet regression test (#27618)
- e42fdaad21a8 lsp: add spacing for inlay hints separately #24079
- 48bcc7b9710d lsp: advertise workspace.didChangeConfiguration capability (#26028)
- c07dceba335c lsp: allow Lua pattern chars in code action filter (#24041)
- 3bf887f6e08f lsp: always return boolean in lsp.buf_client_attach (#24077)
- 966eb8e0b3be lsp: announce publishDiagnostics.dataSupport (#24442)
- 39fc340276a4 lsp: avoid assertion when `client_hints` do not exist (#28461)
- 47dbda97d2f4 lsp: buffer messages until connected to server (#28507)
- adbe7f368397 lsp: call `on_list()` even for single location (#25830)
- 15983cf2c64c lsp: cancel session when leaving snippet region (#25762)
- 816b56f878f0 lsp: cancel watchers when closing a client
- 9b8a0755390b lsp: change `silent` in lsp.start.Opts to optional (#28524)
- d3e035257473 lsp: check if inlay hints are enabled for a buffer before disabling (#24074)
- fa9a85ae468b lsp: clean up duplicate and unused meta type annotations
- 8bd6f7c20b40 lsp: clear codelens on LspDetach (#24903)
- 97c0a52416b8 lsp: correct deprecation message #28403
- aa62898ae329 lsp: correct the error message's cmd on spawning (#27632)
- 77a9f3395bd1 lsp: create codelens request parameters for each buffer (#27699)
- 9281edb334a3 lsp: create per client params in lsp.buf.code_action
- 39cc38a87b29 lsp: defer writing error msgs (#27688)
- 1b679ac19287 lsp: define LspInlayHint highlight group #24073
- dc8c086c7e73 lsp: directly rename the existing buffers when renaming (#27690)
- c1a95d9653f3 lsp: disable didChangeWatchedFiles on Linux
- 2fde6295df8c lsp: display initialization errors (#25409)
- 94127cb5df0a lsp: do not add extra indentation
- cc87dda31a5b lsp: do not assume client capability exists in watchfiles check (#24550)
- 0fe0cf5adaab lsp: do not cancel snippet when selecting placeholder (#25835)
- 073035a030f5 lsp: don't register didChangeWatchedFiles when capability not set (#23689)
- 5eee633c9705 lsp: don't start additional client if attach failed (#28744)
- 21fa19f3e8c1 lsp: don't use hl_mode = combine for inlay hints #24276
- 96b94f8d7777 lsp: duplicate on_detach, on_reload callbacks #24067
- b95b6ed9753d lsp: empty commands should not be considered executable (#28216)
- c3c673cdeca2 lsp: enable() does not activate inlay hints on open buffers #28629
- b2c26a875b9d lsp: ensure buffer is not attached more than once
- fa0a25dcb3a4 lsp: error in reset_timer on second detach #24117
- 72e64a1afef0 lsp: extra "." when completing with tsserver #24646
- 031088fc0aff lsp: filetype matching to documentSelector in dynamic capabilities (#25425)
- d191bdf9d5e5 lsp: fix attempt to call non existent function (#24212)
- dd3fa6457355 lsp: fix dynamic registration of code actions (#23826)
- ce4ea638c703 lsp: fix incorrect typing and doc for `vim.lsp.rpc`
- f487e5af019c lsp: fix infinite loop on vim.lsp.tagfunc
- 74bd4aba57d2 lsp: fix multi client handling workspace_folder methods (#18839)
- 5e5f5174e3fa lsp: fix off-by-one error for omnifunc word boundary
- ba6761eafe61 lsp: fix omnicomplete in middle of the line (#25787)
- 075a72d5ff9d lsp: fix relative patterns for `workspace/didChangeWatchedFiles` (#23548)
- 840e1864c2de lsp: handle NUL bytes in popup text (#25612)
- 345bd91db28e lsp: handle absence of a trailing newline #25194
- 0e9a33572dc7 lsp: handle adjacent snippet tabstops
- 853f647da618 lsp: handle reverse lookup in capabilities
- 91f67fabe69f lsp: handle stale bufnr on LspRequest autocmd trigger (#24013)
- 849d82b80b85 lsp: handle stale bufnr on LspRequest autocmd trigger (#27981)
- 2eecb1b85dbb lsp: highlight active parameter in signature help #25663
- e55e80d51ca5 lsp: inlay hints: "Failed to delete autocmd" when closing buffer #24469
- 7968322e7a20 lsp: inlay_hint nil reference error #24202
- ba8f19ebb67c lsp: lint warnings, default offset_encoding #24046
- 330444994616 lsp: log unknown diagnostic tags instead of showing a warning (#25705)
- 251ca45ac948 lsp: markdown code fence should allow space before info string #24364
- add7e106d59b lsp: noisy warning about offset_encodings #24441
- c235959fd909 lsp: only disable inlay hints / diagnostics if no other clients are connected (#24535)
- 1dacf2ecee36 lsp: prevent code-lens refresh from becoming a permanent  no-op (#28228)
- 597ecf751603 lsp: re-add client.commands and mark private
- 94a904b453e5 lsp: reapplying already-applied hints #24114
- 4ecc71f6fc73 lsp: reduce diagnostics and add more types (#23948)
- bc7f86209d39 lsp: redundant vim.snippet.jumpable #28560
- ee156ca60ede lsp: refactor escaping snippet text (#25611)
- 2ecba65b4ba7 lsp: remove unknown LSP protocol property (#24345)
- 7311958e1238 lsp: remove unnecessary file load/write when renaming (#27621)
- e14e75099883 lsp: rename LspProgress data.result => data.params #28632
- f0e61e6d92b5 lsp: rename fails on missing parent directory #27291
- b413f5d048ab lsp: rename undofile when renaming (#27684)
- d09957e0a06f lsp: rename: load and list new buffer if attached to window (#27408)
- 7668f89d5be6 lsp: replace @private with @nodoc for public client functions (#24415)
- 52823616bc4d lsp: replace bug-prone ternary operation #28627
- 5282d3299c9b lsp: restore marks after apply_text_edits() #14630
- cf5f1492d702 lsp: revert change to buf.clear_references() #24238
- 917172dd9680 lsp: semantic token defer loading
- 3be2536ca039 lsp: send back diagnostic tags to the server
- a37d568082ad lsp: send empty "added" list when removing workspace folder #24440
- 3c6d971e5488 lsp: set extra info only when it has a value (#23868)
- 5785c32f1115 lsp: set fallback client name properly
- 370232dbefb9 lsp: track snippet deletion
- ca26ec34386d lsp: use only utf-16 in default client positionEncodings (#23903)
- b302da9ad220 lsp: use percentage format on lsp.status (#23971)
- 2c8f36a3b0b6 lsp: use plain loop for non-list-like table of protocol values
- 8addd27504e6 lsp: when renaming directory, check path prefix of buffer names (#27603)
- 597355deae2e lsp: wrong iterator in registerCapability handler (#24971)
- b2d471ab337e lua: allow nil values in serialized Lua arrays (#26329)
- 68f12e7fcb1f lua: annotate that TSNode functions can return nil (#24621)
- 4ffc20c95152 lua: avoid internal error when :luado deletes lines (#27262)
- 319803822420 lua: correct return value for on_key with no arguments (#25911)
- 84bbe4b0ca93 lua: disallow vim.wait() in fast contexts
- 22eb2ba18336 lua: do not schedule events if Nvim is exiting
- 7d279a09e0fb lua: handle array with holes in luaeval() (#26630)
- c43c745a14dc lua: improve annotations for stricter luals diagnostics (#24609)
- 2f779b94e7fe lua: inspect_pos respect bufnr when get syntax info (#23098)
- e2e63bd04549 lua: make highlight.on_yank use win-local highlight (#27349)
- b40170f7a3ca lua: memory leak when using invalid syntax with exists() (#26530)
- 4ab9c5fa4684 lua: not using global value in vim.opt_global (#25196)
- 20ec4c776a07 lua: only disable vim.schedule() when closing main loop (#26090)
- f150b62423d5 lua: only free luarefs when returning from API (#28373)
- 019077171324 lua: remove uri fragment from file paths (#27647)
- 5aa14e1231b7 lua: return after assert returns assert message (#27064)
- 5331d5772ffb lua: show error message when failing to set variable (#25321)
- 1294e221a205 lua: vim.fn.has('nvim-0.10') in fast context, used by vim.deprecate
- 37c58226a8fd lua: vim.fs typing (#24608)
- 5db076c7ccfe lua: vim.region on linewise selection #25467
- 622b1ae38a36 lua: vim.split may trim inner empty items
- a7df0415ab6a lua2dox: filter out the entire `---@alias` block
- 32e69bd3971c luarc.json: ignore test directory to save memory
- 6f936c9d85a0 man: make :Man with a range work (#25922)
- 59aadf33efc2 man: pass modifiers also to :tag (#27878)
- a9b4dc9614a0 man: set the nested flag for the BufReadCmd autocommand (#26285)
- c8d1d8b2546c man.lua: don't continue on command error (#23009)
- a4c4b39d55db man.lua: hardwrapped manpage is not resized #25646
- 209ed16f57a7 man.lua: return support of all sections
- 3a7c30dc93b9 man.vim: q quits after jump to different tag in MANPAGER modified (#28495)
- 3c667d3e0fe4 mappings: fix mapset() not replacing map with backslash (#26719)
- 0451391ec514 mark: properly init mark views (#22996)
- d432bba4e46c marks: handle switching buffer properly (#25763)
- 62306a29add2 marktree: correct qsort usage
- 585549625d8a marktree: off-by-one error in `marktree_move`
- 34be915f6b93 marktree: preserve ordering in `marktree_move`
- b97d5038f16b marktree: some marks counted twice when checking for overlap
- ad5a155b1f4b mbyte: fix bugs in utf_cp_*_off() functions
- b02823399171 memline: more curbuf stuff
- 91ef26dece6d messages: :map output with ext_messages (#26126)
- eabf9de1dc8c messages: allow more prompt in headless mode with UI (#27905)
- 60fb8a6a8bd9 messages: avoid crash with :intro and ch=0 (#28343)
- 61a0aa6c51fb messages: avoid passing negative length to strnlen() (#28753)
- ca258db15668 messages: clear new lines when increasing 'cmdheight' (#27421)
- c9f47fca8b89 messages: ensure msg_grid is at top at more prompt (#23584)
- 2f17ef1fc4b9 messages: use "Vimscript" instead of "VimL" #24111
- 55dbf5c3798c messages: validate msg_grid before using msg_grid_pos (#26189)
- 4db77017fb7a meta: add nil return types to lpeg functions
- 5198a2555de4 meta: cleanup lpeg operators
- dae6770b761a meta: include vim.json
- d31f7648ecaf mkspell: prevent Unicode character overflow (#23760)
- a8a93e517f9e mouse: avoid dragging after click label popupmenu callback (#26187)
- 6a2a37b1e102 mouse: avoid dragging when clicking next to popupmenu (#26201)
- 091eb4c8c720 mouse: click after eol with conceal and virtual text (#27897)
- 2b475cb5cc21 mouse: click on 'statuscolumn' with 'rightleft' (#25090)
- e25cf47ad3e1 mouse: click on empty line with 'foldcolumn'
- 84a4319545ad mouse: cmdline click registered as statuscolumn (#23163)
- bf52fb7193ca mouse: copy the line before syntax matching (#24320)
- 5fb4c397a1da mouse: drag vsep of window with 'statuscolumn' (#24462)
- dc394b9641f9 mouse: fix popup menu position check with winbar (#23456)
- 7c1921e9d69e mouse: fix popup_setpos position check with ext_multigrid (#23436)
- a3fba5cafcf1 mouse: handle folded lines with virt_lines attached to line above (#23912)
- 64aa0f7d0b70 move: check for filler lines properly (#28307)
- 366d0c7887f7 move: check the correct buffer (#25698)
- 780509aedf5c move: fix using the wrong window (#28312)
- 60d1e3e4718a msgpack: store grid line event as a value
- c52dfb6e8408 normal: don't check conceal when pressing 'r' (#27892)
- 088cdf69e3fa normal: make "g$" work properly with resized grid
- a1ded1b113d2 oldtest: always use a 64-bit int for swapfile block number
- 92c59c39c3d9 ops.c: remove duplicate u_save_cursor()
- 9d01385c6ca6 options: `'modified'` showing incorrect value for scratch buffers
- c3e176f6e24e options: correct condition for calling did_set_option() (#25026)
- 9af03bcd4712 options: do not change inccommand during preview (#25462)
- 796df966f3cb options: don't update curswant for 'winhl' or 'winbl' (#27515)
- d956bc63795f options: setting 'scroll' with resized grid (#26628)
- c8a27bae3fae options: use a union for def_val (#27169)
- 804c828e681e optionstr.c: incorrect use of curbuf/curwin
- a9df0c5ce6ca osc52: do not use 'vim.iter' (#27218)
- 5d75d9aef2b6 osc52: enable OSC 52 by default in tmux sessions (#26072)
- 86c2213b5e45 osc52: use `p` for primary selection instead of `s` (#26076)
- 104565909798 osc52: use nvim_chan_send() to stderr for copying (#26690)
- e3bd04f2aff7 pager: handle consecutive newlines properly (#27913)
- 1e7e9ee91f73 path: accept special characters on Windows (#25424)
- f064e72b9b9c path: check return value of append_path() (#28309)
- f5eabaa9407a path: restore space separation in 'path' (#25571)
- 908f247c224d plines: count 'showbreak' for virtual text at eol
- a0cbf1d8d5a6 plines: cursor position with 'showbreak' and resized grid (#28067)
- 317038e7cb11 plines: don't return very large height on very long line (#24260)
- 7955c90621bb plines: folded lines with virt_lines attached to line above
- 35c3275b4896 plines: handle inline virtual text after last char (#24241)
- cbadb39d16c1 plines.c: initialize cts_max_head_vcol (#24855)
- fc14928719df printf: make positional %zd and %zu work (#24722)
- d0b3c8721921 process: avoid potential data race on exit (#27769)
- 3e569d440b8e process: close handles and timer in pty_process_close() (#27760)
- 268066e01400 process: start pty process eof timer on main thread (#27625)
- 49983387ffd5 prompt: emit change event for prompt newline (#28260)
- 7bd6bd1ef721 provider: cannot detect python3.12 #25316
- 61ecb3e16c22 provider/pythonx: import the correct module (#25342)
- 540941ef8320 pum: don't position too far with resized parent grid (#23442)
- f186224dfcf8 pum: fix missing rightmost column with 'rightleft' (#23445)
- 8bc973c6f59c pum: fix missing scrollbar with 'rightleft' (#23448)
- a7550a20e0c3 pum: handle right-click menu repositioning with multigrid (#26975)
- fbaa27877361 pum: make :popup position correctly with float border
- a3dfe1bc89a5 pum: position properly with ext_multigrid (#23336)
- c1331a65dd12 pum: show right-click menu above cmdline area (#23298)
- dd0e77d48a84 query_error: multiline bug
- 5ac2e47acc99 redo: make redo of Lua mappings in op-pending mode work (#23566)
- 60f69014a801 redraw: multibyte characters are wrapped at the end of a line (#23696)
- cb34d0ddd086 redraw: overwrite double-width char with virt_text properly (#23708)
- d184933cdc70 redraw: update Visual selection properly with splits (#27343)
- 54044e6dce2f release.sh: ze version is too big
- cce9460524aa remote: make --remote-expr print to stdout (#23980)
- bde59e81473f remote: restore previous --remote-expr output formatting (#23988)
- 468292dcb743 rpc: "grid_line" event parsing crashes (#25581)
- 4d4092ac9e98 rpc: assertion failure due to invalid msgpack input
- 8921d56053bb rpc: do not crash when no input is consumed
- c422722b2e94 rpc: fix hang with channel closed while waiting for response
- adb225834540 rplugin: dont create data dir if it's a broken symlink #25726
- 65dd3c1180ce ruler: show ruler of curwin with no statusline in cmdline
- f5231d61a541 runtime: add commentstring for C# ftplugin (#23039)
- 3387dc4a463c runtime: add commentstring for D ftplugin (#25362)
- 615b48aca6bd runtime: add more Nvim-only highlight groups to Vim syntax
- aee6f08ce12a runtime: do not allow breakcheck inside runtime path calculation
- df297e3c2bd7 runtime: don't set gx mapping if already mapped (#24262)
- 9176b5e10a6b runtime: respect 'fileignorecase' when sourcing (#24344)
- dbb840da01c7 runtime: respect 'rtp' order for all runtime files (#24335)
- 70a00492962d runtime: source c ftplugins in correct order (#27377)
- d431a4d410f0 runtime: source old color scheme in bundled color schemes (#26641)
- 3ab6f60dc80d runtime: update 'vim' color scheme to use new tree-sitter groups
- 67fba9affa14 runtime/tutor: don't try to close fold when there is none (#24953)
- ee56daebb646 shada: update deleted marks (#24936)
- 517dfdf0fcf5 shada: update marks when using delmarks! (#24978)
- 4d52b0cf6705 showcmd: clear the rest properly (#28420)
- fcd9905291c0 sign: avoid deleting from sign map while looping over it (#27158)
- a84b454ebe66 sign: do not error when defining sign without attributes (#26106)
- a5ade3c63d88 snippet: correct indent with newline
- 4625394a767f snippet: do not add extra indent on newlines (#28538)
- a1bdf2852d6d snippet: remove misleading comment about TM_FILENAME_BASE (#26465)
- 8c044f0862f4 spell: always accept ':' as filename char in 'spellfile' (#27172)
- a803bff89c89 spell: extmark with spell=false should disable spell (#23400)
- eceb2dffce39 spell: splice extmarks on :spellrepall (#23929)
- aa65bd478a98 startup: "nvim -l foo.lua" may not set arg0 #24161
- 628f6cce80de startup: don't truncate when printing with -l (#24216)
- c0fa721adeab startup: make recovery mode work without --headless (#24477)
- 8e739af064de startup: multiprocess startuptime #26790
- 8f10362cdc58 startup: only send one default_colors_set event during startup
- 559c4cfd52e3 startup: run embedded Nvim with real path (#24282)
- b21d96011934 startup: set full_screen when in ex_mode
- 9637b7dae417 startup: stop TUI properly when quitting at swap dialog (#25337)
- d7359a87425d startup: trigger UIEnter for the correct channel (#25860)
- 01e273c340b5 statuscolumn: don't update clicks if current width is 0 (#24459)
- afd0c648a89f statuscolumn: force full redraw when signcolumn is invalid (#24859)
- dc6c11394b73 statuscolumn: update number hl for each screen line (#25277)
- a4b240080435 statusline: also allow right click when 'mousemodel' is "popup*" (#23258)
- 4ecf6fdfd857 statusline: bail out properly on negative row (#23535)
- 70da793c5eda statusline: corrupted screen with minwid sign item in 'statuscolumn' (#23823)
- d7bb19e0138c statusline: fill for double-width char after moving items (#24207)
- 54f560203897 statusline: fix uninitialized variable and possible overflow
- 9f15a18fa57f statusline: missing offset when showing 'keymap' (#27270)
- 7b973c71ea84 statusline: redraw when VIsual_mode changes (#23933)
- dbc0fa9bd683 stdpath: remove duplicate directories (#26653)
- 1907abb4c278 stream: do not close handle if it is already closing (#26537)
- 9dd48f7832f4 substitute: properly check if preview is needed (#23809)
- 9753cda591e2 syntax: use correct diagnostic group for checkhealth (#23538)
- 400b7842a983 termcap: escape escapes in passthrough sequence (#26301)
- e52784221118 termcap: only call callback for requested capabilities (#26546)
- ffeb31c2f962 termcap: set 'nested' on TermResponse autocommand
- b7831c7f996b termcap: use tmux passthrough sequence when running in tmux (#26281)
- e6d3f87dfd71 termdebug: handle partial lines passed to callback (#22950)
- c413b42c456b termdebug: prompt mode breaks with &splitbelow set
- 8aad4b84250a termdebug: send SIGINT when interrupting prompt mode
- af78060b1882 termdebug: trim suffixed "\r" in CommOutput
- 684e93054b82 terminal: assign channel to terminal earlier (#25771)
- 82b1a389ba98 terminal: avoid Insert mode in Terminal buffer (#25820)
- 99288ecc77e4 terminal: block input when there is pending TermRequest (#27589)
- f2ce31d3dc1c terminal: call validate_cursor() before screen update (#24425)
- e09adfdcffe8 terminal: check if mouse on statusline/tabline/winbar/vsep (#26892)
- e11573246579 terminal: check terminal size at end of screen update (#25480)
- 120c4ec855bc terminal: disable reflow again
- c881092ffe9d terminal: don't lose focus on  (#25845)
- 16a416cb3c17 terminal: don't pass incomplete UTF-8 sequence to libvterm (#27922)
- d0d132fbd055 terminal: don't send unknown special keys to terminal (#24378)
- 74776dfb2ac4 terminal: fix duplicate recording with mouse click (#28103)
- 21d466c1b985 terminal: forward horizontal mouse scrolling (#24552)
- d401b33314a4 terminal: handle horizontal scrolling in another window (#24828)
- 5e78fd778450 terminal: ignore $VIM and $VIMRUNTIME in pty jobs
- 0a7fda6fa006 terminal: include modifiers when forwarding mouse (#24549)
- d4c2fc6ff6c5 terminal: keep focus when scrolling number column of another window (#25848)
- 5ca6c9e04629 terminal: make backslashes in 'shell' work on Windows
- aba954b662cc terminal: never propagate $COLORTERM from outer env (#26440)
- b74262a336d3 terminal: send Shift-Home Shift-End Ctrl-Home Ctrl-End (#24418)
- 0fd8eb8aae10 terminal: set $COLORTERM unconditionally in :terminal (#24763)
- fa17a5ab49df terminal: use terminal buffer for TermRequest autocommand (#26974)
- 5999214c242d termkey: accept BEL (0x07) as OSC terminator
- ce2f770aaa23 termkey: do not sign extend mode value
- 50f5864dd245 termkey: include IO header on Windows
- 52e6059415ba test: call separate_arguments() correctly to honor $BUSTED_ARGS (#26905)
- c5528e7fd852 test: clean up inline virtual text tests a little
- 380b634ac951 test: fix "indeterminism" warnings in UI tests
- f4c97da26242 test: fix strings_spec.lua for AArch64
- 477458f7bf8d test: more tests for marktree
- d8e330bcec91 test: remove test/compat.lua
- a7bbda121d03 test: typing
- 8861ad83fd7f test/tui_spec: pass the expected NULL-sentinel to execl()
- f859d16aea0d tests: set SHELL=sh #24941
- 3d44340cea08 tests: use more global highlight definitions
- e9bfbe99cd71 textformat: remove unnecessary changed_bytes() (#26027)
- 255e547e18e1 timer: allow timer_info() to get info about current timer
- a8131aee9ecc tohtml: replace hex escape with digit escape (#27728)
- 0246f1a897f4 tohtml: set filetype of generated HTML to `html`
- ccc0980f86c6 treesitter: Use the correct replacement args for #gsub! directive (#23015)
- 71d9b7d15c9b treesitter: _trees may not be list-like
- a4743487b71b treesitter: `language.add` - only register parser if it exists
- 4a8bf24ac690 treesitter: adjust indentation in inspector highlights (#26302)
- ef64e225f6f6 treesitter: allow foldexpr without highlights (#23672)
- 6a264e08974b treesitter: allow optional directive captures (#28664)
- cf612c64b0fc treesitter: allow passing lang to vim.treesitter.get_node() now correctly takes opts.lang (#26360)
- 32849d56671c treesitter: avoid # of nil in _query_linter
- 3fd7449d5abe treesitter: check that buf is loaded in autocommands (#25679)
- e7f50f43c822 treesitter: clip end row early
- 6b19170d44ca treesitter: correctly calculate bytes for text sources (#23655)
- bd5008de07d2 treesitter: correctly handle query quantifiers (#24738)
- fba18a3b6231 treesitter: do not calc folds on unloaded buffers
- c30ebb17f6b9 treesitter: document more standard highlight groups
- 040369e1e4b8 treesitter: don't forcefully open folds
- 72ed99319dd6 treesitter: don't invalidate parser when discovering injections
- 4607807f9fcb treesitter: don't update fold if tree is unchanged
- 26b5405d181e treesitter: enforce lowercase language names (#28546)
- 3a8265266e0c treesitter: escape "\" in :InspectTree #28613
- 369f58797dbd treesitter: escape quotes in :InspectTree view #24582
- 6e45567b498c treesitter: fix TSNode:tree() double free (#24796)
- 50a03c0e9975 treesitter: fix another TSNode:tree() double free
- 7c6f9690f74e treesitter: fix indexing in foldexpr
- 01b91deec7b6 treesitter: fix parens stacking in inspector display (#26304)
- f40a109716d7 treesitter: fix trim predicate
- 1f551e068f72 treesitter: fixup for InspectTree
- 26cc946226d9 treesitter: foldexpr tweaks
- e85e7fc7bccc treesitter: handle empty region when logging (#24173)
- 12faaf40f487 treesitter: highlight injections properly
- 6f75facb9d75 treesitter: improve vim.treesitter.foldexpr
- 6c8387067d4e treesitter: inspect-tree remember opts on buf change
- 8179d68dc1a9 treesitter: logger memory leak
- b6e339eb90e1 treesitter: make InspectTree correctly handle nested injections (#26085)
- 3af59a415c98 treesitter: make Visual hl work consistently with foldtext (#25484)
- c7e7f1d4b4b6 treesitter: make foldexpr work without highlighting (#24167)
- 0211f889b953 treesitter: make sure injections don't return empty ranges (#24595)
- 0df681a91d6b treesitter: make tests for memoize more robust
- 7fa292c52d7b treesitter: outdated highlight due to tree with outdated region
- 617d1b28d6d3 treesitter: prefix treesitter types with vim
- 90a12d4a1643 treesitter: prepare highlight states for [s, ]s
- 7e5ce42977d7 treesitter: properly combine injection.combined regions
- 19a793545f15 treesitter: redraw added/removed injections properly (#23287)
- 7a76fb854754 treesitter: remove more double recursion
- e124672ce9a8 treesitter: reset cursor max_start_depth
- 7d9715008470 treesitter: return correct match table in iter_captures()
- 3b29b39e6deb treesitter: revert to using iter_captures in highlighter
- 315c711700a8 treesitter: set cursor position when opening inspector
- 48085e40bb0e treesitter: stop() should treat 0 as current buffer #24450
- 32dc484ec9ec treesitter: support subfiletypes in get_lang (#23605)
- b6fdde522425 treesitter: text alignment in checkhealth vim.treesitter
- 0f85aeb478a6 treesitter: treecursor regression
- 26143d7a5c90 treesitter: update @markup default links
- 9ff59517cbf3 treesitter: update c queries
- c44d819ae1f2 treesitter: update folds in all relevant windows (#24230)
- ffb340bf63af treesitter: update folds only once on InsertLeave
- edf9a897f089 treesitter: update highlights for query (#23699)
- b697c0cd4fb2 treesitter: update lua parser and queries (#24148)
- ad95b3698569 treesitter: update markdown parser and queries (#24429)
- 39a0e6bf3c04 treesitter: update parsers and queries
- 3d4eb9d544cb treesitter: update queries
- c97de026e357 treesitter: update vimdoc and vimscript queries
- dc7ccd6bca81 treesitter: use 0 as initial value for computing maximum (#27837)
- 7bc5ee7f9327 treesitter: use proper query syntax for inspector (#26274)
- 00e6651880c3 treesitter: use tree range instead of tree root node range
- 8c9dab3e0d78 treesitter: use vim.highlight.priorities instead of hardcoded 100 (#24052)
- 674f2513d4d4 treesitter: validate language alias for injections
- 2bf3e82676d5 treesitter: validate window before updating preview highlights
- ab2811746eb7 treesitter playground: fix the wrong range of a node displayed i… (#23209)
- f85aa2e67f3e treesitter.c: improve comments on fenv usage
- c5b9fb2f2565 treesitter.foldexpr: check for all insert submodes
- b3bda2f0438d tui: `space_buf` overflow when clearing screen (#27352)
- cb2b5e2780a6 tui: disable DECRQM and DECRQSS queries for Terminal.app (#28453)
- 405bad5e085f tui: do not toggle cursor visibility when flushing the buffer (#26055)
- b76cc974b9a5 tui: don't forget to update cursor visibility (#26523)
- 911f3d962358 tui: don't overwrite an assertion faliure message on exit
- 168e69ae0156 tui: don't set cursor color when there is none (#28236)
- 5a08b5be3c34 tui: don't set tty background if &bg was set before VimEnter (#23701)
- 00b7428b3bf5 tui: don't use DECRQSS in screen or tmux (#28086)
- 846714ca3e70 tui: don't use tui->params[] for 'termsync' (#26565)
- 197827321a39 tui: grid_clear properly clears the screen
- 884a83049b2c tui: grow termkey's internal buffer for large escape sequences (#26309)
- ad867fee26c8 tui: handle cursor visibility properly (#26091)
- fd50185492c7 tui: initialize clear attrs with current terminal background
- c26b39a9aa56 tui: make :cquit work properly with remote TUI (#25313)
- 3ae62c470634 tui: make disabling title restore old title from stack (#23585)
- 4c31a1b807f1 tui: make setcellwidths() work for non-ambiwidth chars (#28322)
- 4f235e3cafba tui: position cursor at bottom-left before stopping (#23369)
- 0f1b511f2302 tui: redraw on SIGWINCH even if size didn't change
- 8e6971695383 tui: restore title before exiting alternate screen (#23776)
- 999e167a521a tui: start flush earlier (#26463)
- 367e52cc79a7 tui: use buflen to calculate remaining buffer size (#26942)
- 3198598e6974 tui: use uv_timer_t instead of TimeWatcher for input (#26435)
- 0ce065a332cb tui: v:argv does not report the original argv[0] #24015
- bc6fc0123d2f tutor: Tutor steps don't work on Windows #25251
- bf5703042b50 tutor: don't use concealed text in expected lines #24316
- e34c23b7016a tutor: set a value for ":syntax iskeyword" (#27833)
- 04232a19ccf0 type: remove incorrect arguments from vim.rpc*
- 21152f7905b5 types: add more annotations to eval.lua
- b7d5b55f74fd types: add some return/parameter type annotations (#24867)
- e6947bb1e80a types: make filetype.add parameters optional
- 191cca2566a8 types: move type annotation for `IterMod`
- 813dd36b7297 types: rename win_get_config return type to win_config
- b3342171d533 typing: vim.fn.execute
- 1355861b926a typval: don't treat v:null as truthy (#23281)
- 0592fd5e17dc ui: "resize -1" with cmdheight=0 #24758
- ab1c2220f0c7 ui: activating all ext capabilities without remote UI #28555
- 5b111a8f00f8 ui: adjust 'smoothscroll' for inner dimensions
- 389f5ca39d27 ui: adjust the cursor when inserting virtual text
- 046c9a83f7ed ui: always use stl/stlnc fillchars when drawing statusline (#25267)
- 0c86828ac574 ui: avoid ambiguity about chunk that clears part of line (#24982)
- e778e0116198 ui: avoid recursiveness and invalid memory access #28578
- 0ce39108684e ui: cursor pos with left gravity inline virt_text at eol (#24329)
- 91a4938edfd3 ui: data corruption in remote_ui_raw_line
- 1de82e16c121 ui: delay win_viewport until screen update #24182
- a91652357413 ui: doesn't trigger au event when enter is false
- b5a38530ba18 ui: don't force 'cmdheight' to zero with ext_messages
- fdc8e966a918 ui: don't send empty grid_line with redrawdebug=compositor (#23899)
- 13f55750e9be ui: empty line before the next message after :silent command
- d41b8d47587b ui: ext_cmdline should not move cursor to curwin
- a38d7f99845d ui: fix cursor position with multiple inline virtual text
- e0707d352959 ui: fix edge case around flushing
- 75f350aac6cd ui: fix incorrect highlighting when virtual text next to match
- 332b70d2ed31 ui: fix incorrect highlighting when virtual text wraps with number
- 0c7fa3bdcc37 ui: fix multi-byte characters highlight in virtual text
- a37c99048359 ui: fix overflowing nowrap virtual text not displaying if tab follows
- 5d7afb2e9f22 ui: fix tabs not being spaced properly after virtual text with no wrap
- 34d862942c33 ui: fix virtual text not displaying when two overlapping inlines (nowrap)
- c5bf838f8aa5 ui: fix visual and search highlighting interfering with virtual text
- 1936285d98f6 ui: fixes incorrect rendering when virtual text is not visable and nowrap
- 64e8a3c4d19e ui: handle virtual text with multiple hl in more cases (#25304)
- 981acc2922ce ui: propagate line wrapping state on grid_line events
- b8c1b36061f4 ui: set 'cmdheight' to zero for all open tabpages
- a8522f02e9a2 ui: startup intro message should be visible with ext_multigrid
- 1cd7824dd69e ui: trigger TabNewEntered after split new tab
- 7626f431d84f ui: update ext_ui widgets when attaching non-remote UI
- 128091a256d6 ui: wrong cursor position with left gravity inline virt text at eol
- a9418ef8cfc0 ui: wrong display with 0-width inline virt_text at eol (#24854)
- e8b3ed74bca4 ui-ext: "scroll_delta" handle topfill and skipcol (#24249)
- 43d66c0ebbe4 ui-ext: send title to newly-attached UI
- 519b9929e94c ui.open: some URLs fail on Windows
- 4d654472e65e ui_client: check return code of dup()
- 633bf61d3b03 ui_client: check return value of channel_job_start (#27729)
- 71ad771ea4b7 ui_compositor: only reset skipstart at first column (#24776)
- 840749d6c971 undo: fix crash caused by checking undolevels in wrong buffer
- c0a29931e29b unhide: close floating windows first (#25318)
- 9afbfb4d646c unittests: ignore __s128 and __u128 types in ffi
- 9e79f7433eb0 usercmd: Fix buffer overflow in uc_list() (#23225)
- 9802de933484 userfunc: fix possible out of bound access
- 5a8fe0769cc9 vim.deprecate: show deprecation warning in devel versions as well
- ca6dbf3558ce vim.iter: use correct cmp function when truncating tail in `take` (#27998)
- e15991c8116c vim.json: properly treat luanil options as booleans (#28622)
- fec5e3ab247b vim.region: handle multibyte inclusive selection properly (#26129)
- 2afb04758c34 vim.system: close check handle (#24270)
- 9b7cf4f0beb3 vim.system: don't process non-fast events during wait() (#27300)
- a44521f46e6f vim.system: let on_exit handle cleanup after kill
- 6d5f12efd286 vim.system: make timeout work properly
- 57adf8c6e01d vim.ui: open() may wait indefinitely #28325
- e644e7ce0b36 vim.ui.open: return (don't show) error message
- fd085d908201 vim.ui.open: try wslview before explorer.exe #28424
- 5e4a5f1aaa15 vim.ui.open: use explorer.exe instead of wslview #26947
- 6cc76011ca28 watchfiles: skip Created events when poll starts (#23139)
- 9bd4a2807960 window: :close crash if WinClosed from float closes window (#27794)
- 731e7f51ee40 window: :close crash with autocmd, floats and tabpage (#27793)
- 33dfb5a383d7 window: :close may cause Nvim to quit with autocmd and float
- 2cbfa4b9af78 window: don't go to unfocusable float when closing (#28455)
- a47be0b2d90b window: prevent win_size_restore from changing cmdheight
- 4bfc7802f056 windows: set stdout to binary mode for --api-info

PERFORMANCE
--------------------------------------------------------------------------------
- a9c551e5e38f cache breakindent/showbreak width in win_lbr_chartabsize
- b5653984e5de don't decode utf8 character multiple times in getvcol()
- cca8a78ea2ac improve utf_char2cells() performance (#27353)
- 2f2f12122f38 remove loop for computing last position in getvcol()
- 32a4c9f4f92d remove redundant strlen in skipwhite (#26177)
- cdf848a314bf reuse fast character size calculation algorithm from getvcol()
- 2289ca273cda column: avoid counting when max signs are removed from a range
- 4a34da82c18e column: keep track of number of lines that hold up the 'signcolumn'
- f4001d27efae column: only invalidate lines affected by added sign
- 7f084770c238 diagnostic: avoid table copies to filter by severity (#28491)
- 1cb60405548e events: store autocommands in flat vectors (#23256)
- 9af2be292db3 extmarks: add metadata for efficient filtering of special decorations
- 929e1b7f1c35 extmarks: avoid unnecessary invalidations for virt_text (#27435)
- 19fb573ad992 extmarks: avoid unnecessary marktree traversal with folds (#24306)
- d44ed3a885e1 extmarks: better track whether namespace has extmarks (#28615)
- ef94fb69c65b extmarks: don't handle inline virt_text if there is none (#24322)
- 8bb67d64e20d fs: normalize path only once in fs.dir
- 40db56901447 iter: make ListIter.totable more efficient (#23714)
- ef1801cc7c3d iter: reduce number of table allocations
- dcdefd042840 loader: use a quicker version of vim.fs.normalize
- 648f777931d4 lsp: load buffer contents once when processing semantic tokens responses (#23484)
- 2f4792943aa9 lsp: only joinpath for dirs in watchdirs
- edf05b005f34 lsp: process semantic tokens response in a coroutine that yields every 5ms (#23375)
- 79a5b89d66db lsp: reduce polling handles for workspace/didChangeWatchedFiles (#23500)
- 4d3a04279d32 lsp: remove grouping logic from lsp.status (#24096)
- de28a0f84c57 lsp: replace file polling on linux with per dir watcher  (#26108)
- 7e97c773e3ba lsp: use async fs_stat for file watching on linux (#26123)
- cdd87222c86c lua: avoid spairs in vim.validate happy path
- c5af5c0b9ab8 lua: faster vim.deprecate() #28470
- c5990f2cdca5 os/env: os_getenv() allocation when there is no env var set
- 18e62c1bdbbb redraw: only redraw Visual area when cursor has moved (#27340)
- 94085cfce821 redraw: reduce redraw with undo and extmarks or 'spell' (#27442)
- 516b173780e3 rtp: reduce rtp scans (#24191)
- 0e11bf0e1af5 substitute: don't reallocate new_start every time (#24997)
- 4fd852b8cb88 treesitter: cache fold query (#24222)
- 07080f67fe7e treesitter: do not scan past given line for predicate match
- c0cb1e8e9437 treesitter: filter out trees outside the visible range early
- 2b6c9bbe7f7a treesitter: incremental foldupdate
- 3ba930844c30 treesitter: insert/remove items efficiently (#23443)
- a76b689b479e ui-ext: approximate scroll_delta when scrolling too much (#24234)
- 0d1bc795f89c ui_client: skip some initialization not necessary for ui client
- 14a5813c2077 vim.fs.normalize: use iterator

BUILD
--------------------------------------------------------------------------------
- c1ff21666862 actually export symbols on mac
- 664f2749e688 add "ci" configure preset to reduce verbosity
- 1094d0c0dbd0 add CMAKE_C_FLAGS to --version output
- 129012172258 add CMakePresets for deps build to reduce verbosity
- ce6075f82a2a add check to clint to prevent non-defs header includes
- 624de849de39 add function add_target
- 82bb7bbc4816 add luajit runtime files when installing (#23514)
- 831d662ac675 add sub-targets to the doc target
- 1bf29a0ae1ff add system lua include dir for lpeg
- 4cc69f45b4a5 add ubsan default options
- 488038580934 adjust clang-tidy warning exclusion logic
- b80a8e2c16b6 adjust how find order is prioritized
- d561830a5242 align .clang-format rules with uncrustify config
- c18d7941effa allow sccache as compiler cache
- cd097ab8ccfd allow using system rocks
- 54d357dce0e1 bump lpeg to 1.1.0 (#25016)
- 7840760776cf bump minimum cmake version to 3.13
- 7a5effb0f95e bump required minimum libvterm version to 0.3.3
- 2835b0daad43 bump uncrustify to version 0.77
- 77c0d5415b4f bump uncrustify to version 0.78.1
- 87a45ad9b98e bump uncrustify to version 0.79.0 (#28756)
- 1798a4b5e9f0 bump uncrustify version
- 826b95203ac9 bundle uncrustify
- 37bc73e9bc2d change dependency URLs to cache variables
- 108601647783 cmake cleanup
- 404fdb0f3683 cmake fixes
- f8310beeed04 create BINARY_LIB_DIR directory before adding parser
- 9909668111f5 create a text file for specifying dependency information
- 5a7280ba687f create helper function for simplifying luarocks installation
- f936a962d04f create separate targets for nvim with and without runtime files
- bcaff309b607 disable UnusedIncludes from clangd
- 7a80e169c5b1 disable all compiler warnings from dependencies
- 8fdc84d0aaec disable conversion warnings for GCC
- 310fb2efc36c disable conversion warnings for older GCC versions
- a1c2da56ecef do not use GIT_REPOSITORY for local dependencies
- da2130934b95 don't allow Xcode as generator
- 543e0256c19f don't define FUNC_ATTR_* as empty in headers (#26317)
- 24b60b0f71e0 don't format deleted files
- c2e47e7bec03 don't print installed files locally
- f30844008bdd download busted from own neovim/deps repository
- 5abba97d77f2 download dependencies with unreliable mirrors from deps repo
- 71384129f754 download libiconv and gettext from `deps` repository
- 801ac2accb6a drop diff.exe from windows builds
- f0eb3ca9163a eliminate semicolons from --version string
- 397b92e02dbe enable ASAN for MSVC
- 40139738eb47 enable IWYU on mac
- 25cfe3fd432d enable formatting during rebase
- 517f0cc634b9 enable lintlua for scripts/ dir #26391
- 45fe4d11add9 enable lintlua for src/ dir #26395
- 59d117ec99b6 enable lintlua for test/ dir
- c3836e40a2bf enable lintlua for test/unit/ dir #26396
- 03c3f7887dbc enforce PREFER_LUA
- 7cb29a572b36 ensure `make clean` doesn't remove source files
- 0a3645a72307 find system luv on ubuntu
- 5bb17958c569 fix "make iwyu" not working (#24873)
- 12ccea596746 fix --luamod-dev not working properly (#24519)
- 75b80516d513 fix link error for `_BitScanForward64` (#28173)
- 3f188bc533bc fix parser installation location
- 4fb1739e6f1f fix uncrustify
- 896b400bff5c fix universal mac builds
- 01e4a70d668d improve git-cliff CHANGELOG output
- ef92b5a9948f include all dependency directories when generating headers
- 187ae6773592 introduce variable DEPS_IGNORE_SHA for skipping dependency hash check
- 30a0299bc6d1 make dependency URL variables non-cached (#23577)
- b4da4783f988 make genappimage.sh work with existing CMAKE_INSTALL_PREFIX
- 9f9cef1b569e make lpeg an imported library
- c1a05f61122d make the vimdoc generation depend on the nvim target (#25876)
- 8b8e60728486 move luarocks and rocks installation to main build
- d1bb9bffd5e8 remove BUSTED_PRG dead code (#23340)
- 8206954a67b9 remove LOG_DEBUG option
- c48f94d1f300 remove LOG_LIST_ACTIONS option and related code
- 353a4be7e84f remove PVS
- 88366641ad8a remove USE_BUNDLED_BUSTED option
- ca243f06dd05 remove `lintdoc` from `lint` target
- 675522af18f5 remove clint checks and style text covered by uncrustify
- 8be24fed8ffa remove config-specific find_package search for libuv
- c40872acbddb remove duplicate include directories in --version output
- ebb10d624825 remove functionaltest-lua target
- 8ae39eb58488 remove git requirement
- 9f8f287c6139 remove luarocks
- 339011f59c25 remove uninstall target
- c8fd82b26d4f reorder compiler option setting
- 78239f0bbcb2 reorganize cmake files
- 55793bcfa17c revert accidental permission changes (#23319)
- f31f260f0c64 rework --version generation
- a827003e3052 rework IWYU mapping files
- e5d7003b02c9 rework formatting to use add_glob_target
- 1997ef134a9a set char to always be signed
- a75ef40f4cde set deps default build type to Release (#27495)
- a1550dbf0ac2 silence new clang-tidy warnings
- 383018dbb8e0 simplify policy-setting for dependencies
- 4788abf2da6b stop installing parser.h from treesitter
- 26033eee1d3b suppress bugprone-reserved-identifier warnings
- 34509bbea3e8 sync IWYU and clint to ignore the same headers (#26228)
- 0a8e66898d73 update builtin terminfo (#27272)
- a388c852c406 update libtermkey commit
- 706f871014b4 update uncrustify to 0.76
- f4136c9d42f7 use -O3 optimization for release builds
- 2c1e8f7e9692 use `GIT_REPOSITORY` for local URLs
- e0d97d264f83 use built nvim artifact to generate eval files (#25875)
- 3d3717de4e51 use libvterm commit with generated *.inc files
- 4f526b9fd864 use neovim/libtermkey instead of neovim/deps for libtermkey
- 8405649f92a8 use neovim/libvterm instead of neovim/deps for libvterm
- 2a57613b9b42 use stylua with add_glob_target
- ae3eed53d610 various build improvements
- c8667c8756a2 various cmake fixes
- 5cefec734961 various cmake fixes
- bec2ebebdacd various cmake fixes
- c50951a4d0cf various fixes
- 4c9119461108 various fixes
- bf0be0f63e71 various improvements
- 404043e74c52 vendor libtermkey
- e38a05369293 IWYU: export generated headers
- 71141e8cf5df IWYU: fix headers for arabic.h
- 8b428ca8b79e IWYU: fix includes for func_attr.h
- f4aedbae4cb1 IWYU: fix includes for undo_defs.h
- 17d81ac2abc4 IWYU: map everything in the C99 specification
- c2a5105e8875 IWYU: remove arabic_defs.h (#26235)
- 38a20dd89f91 IWYU: replace most private mappings with pragmas (#26247)
- 09541d514dd1 IWYU: replace public-to-public mappings with pragmas (#26237)
- 39771b223847 Makefile: add nvim to oldtest phony target
- 6823fdb20b13 PVS: exclude build directory
- 5d387c338828 ci: ensure correct headers are used on macOS
- dcb11c109141 clint: don't allow INIT() in non-header files (#27407)
- c98ef2d7c629 clint: fix deprecation and linter warnings
- 7e2387f41be7 clint: more precise check for "defs" headers (#26236)
- cf8b2c0e74fd iwyu: add a few more _defs.h mappings (#25435)
- 5f03a1eaabfc lint: remove unnecessary clint.py rules
- eecddd24164c lint: use stylua without add_glob_target
- 25e51d393a42 lua: vendor coxpcall
- 4dc86477b674 luarc.json: disable luadoc-miss-see-name #24108
- fd9ac5aa8e1c makefile: remove a phony target uninstall (#24349)
- 978962f9a00c release.sh: regenerate docs after changing NVIM_API_PRERELEASE (#28229)
- 9ca81b025990 release.sh: set VIMRUNTIME when regenerating docs (#28765)
- 4399c4932d7b release.sh: use git cliff, drop old script
- d0ae52986159 scripts: allow a git ref for lsp_types #24377
- bfb81e1a8516 snap: remove obsolete snapcraft.yaml
- 981301d11f83 terminfo: include user capabilities in comments (#28066)
- 6801befcc5c0 uninstall: don't build if installation manifest not found
- 345dcba629c7 windows: set longPathAware in manifest #28389
---
 runtime/doc/diagnostic.txt | 3 ---
 runtime/doc/lsp.txt        | 9 ---------
 2 files changed, 12 deletions(-)

(limited to 'runtime/doc')

diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt
index ac10b4ea39..36616b9a0d 100644
--- a/runtime/doc/diagnostic.txt
+++ b/runtime/doc/diagnostic.txt
@@ -743,9 +743,6 @@ hide({namespace}, {bufnr})                             *vim.diagnostic.hide()*
 is_enabled({filter})                             *vim.diagnostic.is_enabled()*
     Check whether diagnostics are enabled.
 
-    Note: ~
-      • This API is pre-release (unstable).
-
     Parameters: ~
       • {filter}  (`table?`) Optional filters |kwargs|, or `nil` for all.
                   • {ns_id}? (`integer`) Diagnostic namespace, or `nil` for
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index 7f6a2e3b73..ab09ba4252 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -1595,9 +1595,6 @@ enable({enable}, {filter})                       *vim.lsp.inlay_hint.enable()*
         vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
 <
 
-    Note: ~
-      • This API is pre-release (unstable).
-
     Parameters: ~
       • {enable}  (`boolean?`) true/nil to enable, false to disable
       • {filter}  (`table?`) Optional filters |kwargs|, or `nil` for all.
@@ -1622,9 +1619,6 @@ get({filter})                                       *vim.lsp.inlay_hint.get()*
         })
 <
 
-    Note: ~
-      • This API is pre-release (unstable).
-
     Parameters: ~
       • {filter}  (`table?`) Optional filters |kwargs|:
                   • {bufnr} (`integer?`)
@@ -1639,9 +1633,6 @@ get({filter})                                       *vim.lsp.inlay_hint.get()*
 is_enabled({filter})                         *vim.lsp.inlay_hint.is_enabled()*
     Query whether inlay hint is enabled in the {filter}ed scope
 
-    Note: ~
-      • This API is pre-release (unstable).
-
     Parameters: ~
       • {filter}  (`table`) Optional filters |kwargs|, or `nil` for all.
                   • {bufnr} (`integer?`) Buffer number, or 0 for current
-- 
cgit 


From 31dc6279693886a628119cd6c779e580faab32fd Mon Sep 17 00:00:00 2001
From: "Justin M. Keyes" 
Date: Thu, 16 May 2024 06:28:27 -0700
Subject: docs: news #28773

---
 runtime/doc/deprecated.txt |   4 +
 runtime/doc/news-0.10.txt  | 473 +++++++++++++++++++++++++++++++++++++++
 runtime/doc/news.txt       | 540 +++++++++------------------------------------
 3 files changed, 584 insertions(+), 433 deletions(-)
 create mode 100644 runtime/doc/news-0.10.txt

(limited to 'runtime/doc')

diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt
index 06f8319453..3fc2d872f6 100644
--- a/runtime/doc/deprecated.txt
+++ b/runtime/doc/deprecated.txt
@@ -12,6 +12,10 @@ They should not be used in new scripts, and old scripts should be updated.
 ==============================================================================
 Deprecated features
 
+DEPRECATED IN 0.11 *deprecated-0.11*
+
+• N/A
+
 DEPRECATED IN 0.10 *deprecated-0.10*
 
 • Configuring |diagnostic-signs| using |:sign-define| or |sign_define()|. Use
diff --git a/runtime/doc/news-0.10.txt b/runtime/doc/news-0.10.txt
new file mode 100644
index 0000000000..8a0e7e92e7
--- /dev/null
+++ b/runtime/doc/news-0.10.txt
@@ -0,0 +1,473 @@
+*news-10.txt*    Nvim
+
+
+                            NVIM REFERENCE MANUAL
+
+
+Notable changes since Nvim 0.9                                  *news-0.10*
+
+For changes in the previous release, see |news-0.9|.
+
+                                       Type |gO| to see the table of contents.
+
+==============================================================================
+BREAKING CHANGES
+
+These changes may require adaptations in your config or plugins.
+
+• 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.
+
+• 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.
+
+• Editor:
+  • When switching windows, |CursorMoved| autocommands trigger when Nvim is
+    back on 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
+
+      set selection=exclusive
+      set selectmode=mouse,key
+      set mousemodel=popup
+      set keymodel=startsel,stopsel
+<
+• Events:
+  • Returning any truthy value from a callback passed to
+    |nvim_create_autocmd()| (rather than just `true`) will delete the
+    autocommand.
+
+• 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 calling |vim.lsp.protocol.make_client_capabilities()|.
+  • |LspRequest| and LspProgressUpdate (renamed to |LspProgress|) autocmds
+    were promoted from |User| autocmds to first class citizens.
+
+• Lua:
+  • |-l| ensures output ends with a newline if the script prints messages and
+    doesn't cause Nvim to exit.
+  • 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()`.
+  • |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()|.
+  • Renamed `vim.treesitter.playground` to `vim.treesitter.dev`.
+
+• Options:
+  • 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.
+  • |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.
+
+• Plugins:
+  • |:TOhtml| has been rewritten in Lua to support Nvim-specific decorations,
+    and many options have been removed.
+
+• Treesitter:
+  • 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|.
+
+• TUI:
+  • 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
+      set guicursor+=n-v-c:blinkon500-blinkoff500
+<
+
+==============================================================================
+NEW FEATURES
+
+The following new features were added.
+
+• API:
+  • Passing 0 to |nvim_get_chan_info()| gets info about the current channel.
+  • |nvim_buf_set_extmark()| supports inline virtual text.
+  • |nvim_win_text_height()| computes the number of screen lines occupied
+    by a range of text in a given window.
+  • New RPC client type `msgpack-rpc` is added for |nvim_set_client_info()| to
+    support fully MessagePack-RPC compliant clients.
+  • Floating windows can now be hidden by setting `hide` in |nvim_open_win()| or
+    |nvim_win_set_config()|.
+  • |nvim_input_mouse()| supports mouse buttons "x1" and "x2".
+  • Added "force_crlf" option field in |nvim_open_term()|.
+  • Added |nvim_tabpage_set_win()| to set the current window of a tabpage.
+  • |nvim__win_add_ns()| can bind a |namespace| to a window-local scope(s).
+    • Extmarks opt-in to this scoping via the `scoped` flag of |nvim_buf_set_extmark()|.
+  • Mapping APIs now support abbreviations when mode short-name has suffix "a".
+  • Floating windows can now show footer with new `footer` and `footer_pos`
+    config fields. Uses |hl-FloatFooter| by default.
+  • |extmarks| can set a "url" highlight attribute, so the text region can
+    become a clickable hyperlink (assuming UI support). The TUI renders URLs
+    using the OSC 8 control sequence, enabling clickable text in supporting
+    terminals.
+  • |nvim_open_win()| and |nvim_win_set_config()| now support opening normal
+    (split) windows, moving floating windows into split windows, and opening
+    windows in non-current tabpages.
+  • Flags added to |nvim_buf_set_extmark()|:
+    • "undo_restore": opt-out extmarks of precise undo tracking.
+    • "invalidate": automatically hide or delete extmarks.
+    • "virt_text_repeat_linebreak": repeat virtual text on wrapped lines.
+  • 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()|
+    API function already allowed you to define such ranges, but highlight
+    regions were not rendered consistently for a range that covers more than
+    one line break. This has now been fixed. Signs defined as part of
+    a multi-line extmark also apply to every line in the range, not just the
+    first. In addition, |nvim_buf_get_extmarks()| has gained an "overlap"
+    option to return such ranges even if they started before the specified
+    position.
+
+• Defaults:
+  • The `workspace/didChangeWatchedFiles` LSP client capability is now enabled
+    by default on Mac and Windows. Disabled on Linux since there currently
+    isn't a viable backend for watching files that scales well for large
+    directories.
+  • On Windows 'isfname' does not include ":". Drive letters are handled
+    correctly without it. (Use |gF| for filepaths suffixed with ":line:col").
+  • 'comments' includes "fb:•".
+  • 'shortmess' includes the "C" flag.
+  • 'grepprg' uses the -H and -I flags for grep by default,
+    and defaults to using ripgrep if available.
+  • "]d" and "[d" in Normal mode map to |vim.diagnostic.goto_next()| and
+    |vim.diagnostic.goto_prev()|, respectively. |]d-default| |[d-default|
+  • d (and ) map to |vim.diagnostic.open_float()|
+    |CTRL-W_d-default|
+  • |vim.lsp.start()| sets the following default keymaps (assuming server
+    support):
+    • |K| in Normal mode maps to |vim.lsp.buf.hover()|, unless 'keywordprg'
+      was customized before calling |vim.lsp.start()|.
+  • Automatic linting of treesitter query files (see |ft-query-plugin|).
+    Can be disabled via: >lua
+      vim.g.query_lint_on = {}
+<
+  • Enabled treesitter highlighting for:
+    • Treesitter query files
+    • Vim help files
+    • Lua files
+
+• Editor:
+  • Better cmdline completion for string option value. |complete-set-option|
+    • Try it with `:set listchars=`
+  • By default, the swapfile "ATTENTION" |E325| dialog is skipped if the
+    swapfile is owned by a running Nvim process, instead of prompting. If you
+    always want the swapfile dialog, delete the default SwapExists handler:
+    `autocmd! nvim_swapfile`. |default-autocmds|
+  • Navigating the |jumplist| with CTRL+O, CTRL+I behaves more intuitively
+    when deleting buffers, and avoids "invalid buffer" cases. #25461
+  • |:fclose| command.
+  • |v_Q-default| and |v_@-default| repeat a register for each line of a linewise
+    visual selection.
+  • 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
+    |:vertical|, |:horizontal| and |:botright|.
+
+• Events:
+  • |vim.on_key()| callbacks receive a second argument for keys typed before
+    mappings are applied.
+
+• LSP:
+  • LSP method names are available in |vim.lsp.protocol.Methods|.
+  • Implemented LSP inlay hints: |lsp-inlay_hint|
+    https://microsoft.github.io/language-server-protocol/specification/#textDocument_inlayHint
+  • Implemented pull diagnostic textDocument/diagnostic: |vim.lsp.diagnostic.on_diagnostic()|
+    https://microsoft.github.io/language-server-protocol/specification/#textDocument_diagnostic
+  • Implemented LSP type hierarchy: |vim.lsp.buf.typehierarchy()|
+    https://microsoft.github.io/language-server-protocol/specification/#textDocument_prepareTypeHierarchy
+  • |vim.lsp.status()| consumes the last progress messages as a string.
+  • LSP client now always saves and restores named buffer marks when applying
+    text edits.
+  • LSP client now supports the `positionEncoding` server capability. If a server
+    responds with the `positionEncoding` capability in its initialization
+    response, Nvim automatically sets the client's `offset_encoding` field.
+  • Dynamic registration of LSP capabilities. An implication of this change is
+    that checking a client's `server_capabilities` is no longer a sufficient
+    indicator to see if a server supports a feature. Instead use
+    `client.supports_method()`. It considers both the dynamic
+    capabilities and static `server_capabilities`.
+  • `anchor_bias` option to |lsp-handlers| aids in positioning of floating
+    windows.
+  • |vim.lsp.util.locations_to_items()| sets the `user_data` of each item to
+    the original LSP `Location` or `LocationLink`.
+  • Added support for connecting to servers using named pipes (Windows) or
+    Unix domain sockets (Unix) via |vim.lsp.rpc.connect()|.
+  • Added support for `completionList.itemDefaults`, reducing overhead when
+    computing completion items where properties often share the same value
+    (e.g. `commitCharacters`). Note that this might affect plugins and
+    language servers that don't support the feature, and in such cases the
+    respective capability can be unset.
+  • |vim.lsp.start()| accepts a "silent" option for suppressing messages
+    if an LSP server failed to start.
+  • |vim.lsp.buf.definition()|, |vim.lsp.buf.declaration()|,
+    |vim.lsp.buf.type_definition()|, and |vim.lsp.buf.implementation()| now
+    support the `loclist` field of |vim.lsp.ListOpts|.
+
+• Lua:
+  • |:lua| with a |[range]| executes that range as Lua code, in any buffer.
+  • |:source| without arguments treats a buffer with 'filetype' of "lua" as
+    Lua code regardless of its extension.
+  • Vimscript function |exists()| supports checking |v:lua| functions.
+  • |vim.iter()| is a generic interface for all |iterable| objects (tables,
+    |iterator|s).
+  • |vim.snippet| provides a mode for expanding and navigating snippets.
+  • |vim.ringbuf()| is a generic ring buffer (data structure).
+  • |vim.deepcopy()| gained a `noref` argument to avoid hashing table values.
+  • |vim.keycode()| translates keycodes in a string.
+  • |vim.system()| runs commands / starts processes.
+  • |vim.lpeg| and |vim.re| expose the bundled Lpeg expression grammar parser
+    and its regex interface.
+  • |vim.base64.encode()| and |vim.base64.decode()| encode and decode strings
+    using Base64 encoding.
+  • |vim.text.hexencode()| and |vim.text.hexdecode()| convert strings to and
+    from byte representations.
+  • |vim.ui.open()| opens URIs using the system default handler (macOS `open`,
+    Windows `explorer`, Linux `xdg-open`, etc.)
+  • |vim.wo| can now be double indexed for |:setlocal| behaviour. Currently
+    only `0` for the buffer index is supported.
+  • Improved messages for type errors in `vim.api.*` calls (including `opts` params).
+  • Lua type annotations for:
+    • `vim.*`
+    • `vim.fn.*`
+    • `vim.api.*`
+    • `vim.v.*`
+  • Functions that take a severity as an optional parameter (e.g.
+    |vim.diagnostic.get()|) now also accept a list of severities |vim.diagnostic.severity|
+  • |vim.diagnostic.count()| returns the number of diagnostics for a given
+    buffer and/or namespace, by severity. This is a faster alternative to
+    |vim.diagnostic.get()| when only the number of diagnostics is needed, but
+    not the diagnostics themselves.
+  • |vim.diagnostic.is_enabled()|
+  • |vim.version.le()|, |vim.version.ge()|
+  • |vim.fs.root()| finds project root directories from a list of "root
+    markers".
+  • |vim.tbl_contains()| now works for general tables and allows specifying
+    a predicate function that is checked for each value. (Use
+    |vim.list_contains()| for checking list-like tables (integer keys without
+    gaps) for literal values.)
+  • |vim.region()| can use a string accepted by |getpos()| as position.
+
+• Options:
+  • 'winfixbuf' keeps a window focused onto a specific buffer
+  • 'smoothscroll' option to scroll by screen line rather than by text line
+    when 'wrap' is set.
+  • 'foldtext' now supports virtual text format. |fold-foldtext|
+  • 'foldtext' can be set to an empty string to disable and render the line:
+    as normal with regular highlighting and no line wrapping.
+  • 'complete' option supports "f" flag for completing buffer names.
+  • 'completeopt' option supports "popup" flag to show extra information in
+    a floating window.
+  • 'errorfile' (|-q|) accepts `-` as an alias for stdin.
+
+• Performance:
+  • 'diffopt' "linematch" scoring algorithm now favours larger and less groups
+    https://github.com/neovim/neovim/pull/23611
+  • Treesitter highlighting now parses injections incrementally during
+    screen redraws only for the line range being rendered. This significantly
+    improves performance in large files with many injections.
+  • 'breakindent' performance is significantly improved for wrapped lines.
+  • Cursor movement, insertion with [count] and |screenpos()| are now faster.
+
+• Plugins:
+  • Nvim now includes |commenting| support.
+  • |:Man| supports the `:hide` modifier to open page in the current window.
+  • |:Man| respects 'wrapmargin'
+
+• Startup:
+  • |$NVIM_APPNAME| can be set to a relative path instead of only a name.
+  • |--startuptime| reports startup times for both processes (TUI + server) as
+    separate sections.
+
+• Terminal:
+  • |:terminal| accepts some |:command-modifiers| (specifically |:horizontal|
+    and those that affect splitting a window).
+  • Terminal buffers emit a |TermRequest| autocommand event when the child
+    process emits an OSC or DCS control sequence.
+  • Terminal buffers respond to OSC background and foreground requests.
+    |default-autocmds|
+
+• Treesitter:
+  • Bundled parsers and queries (highlight, folds) for Markdown, Python, and
+    Bash.
+  • |:InspectTree| shows root nodes.
+  • |:InspectTree| now supports |folding|.
+  • |:InspectTree| shows node ranges in 0-based instead of 1-based indexing.
+  • |vim.treesitter.foldexpr()| now recognizes folds captured using a
+    quantified query pattern.
+  • |vim.treesitter.query.omnifunc()| provides completion in treesitter query
+    files (set by default).
+  • |vim.treesitter.query.edit()| provides live editing of treesitter queries.
+  • |Query:iter_matches()| now has the ability to set the maximum start depth
+    for matches.
+  • `@injection.language` now has smarter resolution and will fall back to
+    language aliases (e.g., filetype or custom shorthands) registered via
+    |vim.treesitter.language.register()| and/or attempt lower case variants of
+    the text.
+  • `@injection.filename` will try to match the node text via
+    |vim.filetype.match()| and treat the result as a language name in the same
+    way as `@injection.language`.
+  • The `#set!` directive supports `injection.self` and `injection.parent` for
+    injecting either the current node's language or the parent
+    |LanguageTree|'s language, respectively.
+  • The `#set!` directive can set the "url" property of a node to have the
+    node emit a hyperlink. Hyperlinks are UI specific: in the TUI, the OSC 8
+    control sequence is used.
+  • Improved error messages for query parsing.
+
+• TUI:
+  • Builtin TUI can now recognize "super" (|vim
+    :call netrw#BrowseX(expand(exists("g:netrw_gx") ? g:netrw_gx : ''), netrw#CheckIfRemote())
+
+• LSP:
+  • LSP hover and signature help now use Treesitter for highlighting of
+    Markdown content. Note that highlighting of code examples requires
+    a matching parser and may be affected by custom queries.
+  • |LspRequest| autocmd callbacks contain more information about the LSP
+    request status update that occurred.
+
+• Lua:
+  • |vim.wait()| cannot be called in |api-fast|.
+  • |vim.diagnostic.config()| now accepts virtual text relevant options to
+    |nvim_buf_set_extmark()| (e.g. "virt_text_pos" and "hl_mode") in its
+    "virtual_text" table, which gives users more control over how diagnostic
+    virtual text is displayed.
+  • |vim.diagnostic.get()| and |vim.diagnostic.count()| accept multiple
+    namespaces rather than just a single namespace.
+  • |vim.diagnostic.enable()| gained new parameters, and the old signature is
+    deprecated.
+  • |vim.diagnostic.config()| now accepts a function for the virtual_text.prefix
+    option, which allows for rendering e.g., diagnostic severities differently.
+
+• Options:
+  • Attempting to set an invalid keycode option (e.g. `set t_foo=123`) no
+    longer gives an error.
+
+• Terminal:
+  • Terminal buffers started with no arguments (and use 'shell') close
+    automatically if the job exited without error, eliminating the (often
+    unwanted) "[Process exited 0]" message. |default-autocmds|
+
+• Treesitter:
+  • |Query:iter_matches()|, |vim.treesitter.query.add_predicate()|, and
+    |vim.treesitter.query.add_directive()| accept a new `all` option which
+    ensures that all matching nodes are returned as a table. The default option
+    `all=false` returns only a single node, breaking captures with quantifiers
+    like `(comment)+ @comment`; it is only provided for backward compatibility
+    and will be removed after Nvim 0.10.
+  • |vim.treesitter.query.add_predicate()| and
+    |vim.treesitter.query.add_directive()| now accept an options table rather
+    than a boolean "force" argument. To force a predicate or directive to
+    override an existing predicate or directive, use `{ force = true }`.
+
+==============================================================================
+REMOVED FEATURES
+
+These deprecated features were removed.
+
+• Vimball support, including `:Vimuntar` command
+
+• Support for legacy treesitter injection queries
+
+• 'shortmess' flags:
+  • |shm-f|. Always use "(3 of 5)", never "(file 3 of 5)".
+  • |shm-i|. Always use "[noeol]".
+  • |shm-x|. Always use "[dos]", "[unix]" and "[mac]".
+  • |shm-n|. Always use "[New]".
+
+==============================================================================
+DEPRECATIONS
+
+See |deprecated-0.10|.
+
+ vim:tw=78:ts=8:sw=2:et:ft=help:norl:
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 6889ce32fd..a1859d19cf 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -4,395 +4,125 @@
                             NVIM REFERENCE MANUAL
 
 
-Notable changes since Nvim 0.9                                  *news*
+Notable changes since Nvim 0.10                                 *news*
 
-For changes in the previous release, see |news-0.9|.
+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*
+
+              ====== Remove this section before release. ======
+
+The following changes to UNRELEASED features were made during the development
+cycle (Nvim HEAD, the "master" branch).
+
 ==============================================================================
 BREAKING CHANGES                                                *news-breaking*
 
 These changes may require adaptations in your config or plugins.
 
-• 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.
-
-• 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.
-
-• Editor:
-  • When switching windows, |CursorMoved| autocommands trigger when Nvim is
-    back on 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
-
-      set selection=exclusive
-      set selectmode=mouse,key
-      set mousemodel=popup
-      set keymodel=startsel,stopsel
-<
-• Events:
-  • Returning any truthy value from a callback passed to
-    |nvim_create_autocmd()| (rather than just `true`) will delete the
-    autocommand.
-
-• 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 calling |vim.lsp.protocol.make_client_capabilities()|.
-  • |LspRequest| and LspProgressUpdate (renamed to |LspProgress|) autocmds
-    were promoted from |User| autocmds to first class citizens.
-
-• Lua:
-  • |-l| ensures output ends with a newline if the script prints messages and
-    doesn't cause Nvim to exit.
-  • 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()`.
-  • |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()|.
-  • Renamed `vim.treesitter.playground` to `vim.treesitter.dev`.
-
-• Options:
-  • 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.
-  • |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.
-
-• Plugins:
-  • |:TOhtml| has been rewritten in Lua to support Nvim-specific decorations,
-    and many options have been removed.
-
-• Treesitter:
-  • 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|.
-
-• TUI:
-  • 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
-      set guicursor+=n-v-c:blinkon500-blinkoff500
-<
+API
+
+• TODO
+
+DEFAULTS
+
+• TODO
+
+EDITOR
+
+• TODO
+
+EVENTS
+
+• TODO
+
+LSP
+
+• TODO
+
+LUA
+
+• TODO
+
+OPTIONS
+
+• TODO
+
+PLUGINS
+
+• TODO
+
+TREESITTER
+
+• TODO
+
+TUI
+
+• TODO
 
 ==============================================================================
 NEW FEATURES                                                    *news-features*
 
 The following new features were added.
 
-• API:
-  • Passing 0 to |nvim_get_chan_info()| gets info about the current channel.
-  • |nvim_buf_set_extmark()| supports inline virtual text.
-  • |nvim_win_text_height()| computes the number of screen lines occupied
-    by a range of text in a given window.
-  • New RPC client type `msgpack-rpc` is added for |nvim_set_client_info()| to
-    support fully MessagePack-RPC compliant clients.
-  • Floating windows can now be hidden by setting `hide` in |nvim_open_win()| or
-    |nvim_win_set_config()|.
-  • |nvim_input_mouse()| supports mouse buttons "x1" and "x2".
-  • Added "force_crlf" option field in |nvim_open_term()|.
-  • Added |nvim_tabpage_set_win()| to set the current window of a tabpage.
-  • |nvim__win_add_ns()| can bind a |namespace| to a window-local scope(s).
-    • Extmarks opt-in to this scoping via the `scoped` flag of |nvim_buf_set_extmark()|.
-  • Mapping APIs now support abbreviations when mode short-name has suffix "a".
-  • Floating windows can now show footer with new `footer` and `footer_pos`
-    config fields. Uses |hl-FloatFooter| by default.
-  • |extmarks| can set a "url" highlight attribute, so the text region can
-    become a clickable hyperlink (assuming UI support). The TUI renders URLs
-    using the OSC 8 control sequence, enabling clickable text in supporting
-    terminals.
-  • |nvim_open_win()| and |nvim_win_set_config()| now support opening normal
-    (split) windows, moving floating windows into split windows, and opening
-    windows in non-current tabpages.
-  • Flags added to |nvim_buf_set_extmark()|:
-    • "undo_restore": opt-out extmarks of precise undo tracking.
-    • "invalidate": automatically hide or delete extmarks.
-    • "virt_text_repeat_linebreak": repeat virtual text on wrapped lines.
-  • 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()|
-    API function already allowed you to define such ranges, but highlight
-    regions were not rendered consistently for a range that covers more than
-    one line break. This has now been fixed. Signs defined as part of
-    a multi-line extmark also apply to every line in the range, not just the
-    first. In addition, |nvim_buf_get_extmarks()| has gained an "overlap"
-    option to return such ranges even if they started before the specified
-    position.
-
-• Defaults:
-  • The `workspace/didChangeWatchedFiles` LSP client capability is now enabled
-    by default on Mac and Windows. Disabled on Linux since there currently
-    isn't a viable backend for watching files that scales well for large
-    directories.
-  • On Windows 'isfname' does not include ":". Drive letters are handled
-    correctly without it. (Use |gF| for filepaths suffixed with ":line:col").
-  • 'comments' includes "fb:•".
-  • 'shortmess' includes the "C" flag.
-  • 'grepprg' uses the -H and -I flags for grep by default,
-    and defaults to using ripgrep if available.
-  • "]d" and "[d" in Normal mode map to |vim.diagnostic.goto_next()| and
-    |vim.diagnostic.goto_prev()|, respectively. |]d-default| |[d-default|
-  • d (and ) map to |vim.diagnostic.open_float()|
-    |CTRL-W_d-default|
-  • |vim.lsp.start()| sets the following default keymaps (assuming server
-    support):
-    • |K| in Normal mode maps to |vim.lsp.buf.hover()|, unless 'keywordprg'
-      was customized before calling |vim.lsp.start()|.
-  • Automatic linting of treesitter query files (see |ft-query-plugin|).
-    Can be disabled via: >lua
-      vim.g.query_lint_on = {}
-<
-  • Enabled treesitter highlighting for:
-    • Treesitter query files
-    • Vim help files
-    • Lua files
-
-• Editor:
-  • Better cmdline completion for string option value. |complete-set-option|
-    • Try it with `:set listchars=`
-  • By default, the swapfile "ATTENTION" |E325| dialog is skipped if the
-    swapfile is owned by a running Nvim process, instead of prompting. If you
-    always want the swapfile dialog, delete the default SwapExists handler:
-    `autocmd! nvim_swapfile`. |default-autocmds|
-  • Navigating the |jumplist| with CTRL+O, CTRL+I behaves more intuitively
-    when deleting buffers, and avoids "invalid buffer" cases. #25461
-  • |:fclose| command.
-  • |v_Q-default| and |v_@-default| repeat a register for each line of a linewise
-    visual selection.
-  • 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
-    |:vertical|, |:horizontal| and |:botright|.
-
-• Events:
-  • |vim.on_key()| callbacks receive a second argument for keys typed before
-    mappings are applied.
-
-• LSP:
-  • LSP method names are available in |vim.lsp.protocol.Methods|.
-  • Implemented LSP inlay hints: |lsp-inlay_hint|
-    https://microsoft.github.io/language-server-protocol/specification/#textDocument_inlayHint
-  • Implemented pull diagnostic textDocument/diagnostic: |vim.lsp.diagnostic.on_diagnostic()|
-    https://microsoft.github.io/language-server-protocol/specification/#textDocument_diagnostic
-  • Implemented LSP type hierarchy: |vim.lsp.buf.typehierarchy()|
-    https://microsoft.github.io/language-server-protocol/specification/#textDocument_prepareTypeHierarchy
-  • |vim.lsp.status()| consumes the last progress messages as a string.
-  • LSP client now always saves and restores named buffer marks when applying
-    text edits.
-  • LSP client now supports the `positionEncoding` server capability. If a server
-    responds with the `positionEncoding` capability in its initialization
-    response, Nvim automatically sets the client's `offset_encoding` field.
-  • Dynamic registration of LSP capabilities. An implication of this change is
-    that checking a client's `server_capabilities` is no longer a sufficient
-    indicator to see if a server supports a feature. Instead use
-    `client.supports_method()`. It considers both the dynamic
-    capabilities and static `server_capabilities`.
-  • `anchor_bias` option to |lsp-handlers| aids in positioning of floating
-    windows.
-  • |vim.lsp.util.locations_to_items()| sets the `user_data` of each item to
-    the original LSP `Location` or `LocationLink`.
-  • Added support for connecting to servers using named pipes (Windows) or
-    Unix domain sockets (Unix) via |vim.lsp.rpc.connect()|.
-  • Added support for `completionList.itemDefaults`, reducing overhead when
-    computing completion items where properties often share the same value
-    (e.g. `commitCharacters`). Note that this might affect plugins and
-    language servers that don't support the feature, and in such cases the
-    respective capability can be unset.
-  • |vim.lsp.start()| accepts a "silent" option for suppressing messages
-    if an LSP server failed to start.
-  • |vim.lsp.buf.definition()|, |vim.lsp.buf.declaration()|,
-    |vim.lsp.buf.type_definition()|, and |vim.lsp.buf.implementation()| now
-    support the `loclist` field of |vim.lsp.ListOpts|.
-
-• Lua:
-  • |:lua| with a |[range]| executes that range as Lua code, in any buffer.
-  • |:source| without arguments treats a buffer with 'filetype' of "lua" as
-    Lua code regardless of its extension.
-  • Vimscript function |exists()| supports checking |v:lua| functions.
-  • |vim.iter()| is a generic interface for all |iterable| objects (tables,
-    |iterator|s).
-  • |vim.snippet| provides a mode for expanding and navigating snippets.
-  • |vim.ringbuf()| is a generic ring buffer (data structure).
-  • |vim.deepcopy()| gained a `noref` argument to avoid hashing table values.
-  • |vim.keycode()| translates keycodes in a string.
-  • |vim.system()| runs commands / starts processes.
-  • |vim.lpeg| and |vim.re| expose the bundled Lpeg expression grammar parser
-    and its regex interface.
-  • |vim.base64.encode()| and |vim.base64.decode()| encode and decode strings
-    using Base64 encoding.
-  • |vim.text.hexencode()| and |vim.text.hexdecode()| convert strings to and
-    from byte representations.
-  • |vim.ui.open()| opens URIs using the system default handler (macOS `open`,
-    Windows `explorer`, Linux `xdg-open`, etc.)
-  • |vim.wo| can now be double indexed for |:setlocal| behaviour. Currently
-    only `0` for the buffer index is supported.
-  • Improved messages for type errors in `vim.api.*` calls (including `opts` params).
-  • Lua type annotations for:
-    • `vim.*`
-    • `vim.fn.*`
-    • `vim.api.*`
-    • `vim.v.*`
-  • Functions that take a severity as an optional parameter (e.g.
-    |vim.diagnostic.get()|) now also accept a list of severities |vim.diagnostic.severity|
-  • |vim.diagnostic.count()| returns the number of diagnostics for a given
-    buffer and/or namespace, by severity. This is a faster alternative to
-    |vim.diagnostic.get()| when only the number of diagnostics is needed, but
-    not the diagnostics themselves.
-  • |vim.diagnostic.is_enabled()|
-  • |vim.version.le()|, |vim.version.ge()|
-  • |vim.fs.root()| finds project root directories from a list of "root
-    markers".
-  • |vim.tbl_contains()| now works for general tables and allows specifying
-    a predicate function that is checked for each value. (Use
-    |vim.list_contains()| for checking list-like tables (integer keys without
-    gaps) for literal values.)
-  • |vim.region()| can use a string accepted by |getpos()| as position.
-
-• Options:
-  • 'winfixbuf' keeps a window focused onto a specific buffer
-  • 'smoothscroll' option to scroll by screen line rather than by text line
-    when 'wrap' is set.
-  • 'foldtext' now supports virtual text format. |fold-foldtext|
-  • 'foldtext' can be set to an empty string to disable and render the line:
-    as normal with regular highlighting and no line wrapping.
-  • 'complete' option supports "f" flag for completing buffer names.
-  • 'completeopt' option supports "popup" flag to show extra information in
-    a floating window.
-  • 'errorfile' (|-q|) accepts `-` as an alias for stdin.
-
-• Performance:
-  • 'diffopt' "linematch" scoring algorithm now favours larger and less groups
-    https://github.com/neovim/neovim/pull/23611
-  • Treesitter highlighting now parses injections incrementally during
-    screen redraws only for the line range being rendered. This significantly
-    improves performance in large files with many injections.
-  • 'breakindent' performance is significantly improved for wrapped lines.
-  • Cursor movement, insertion with [count] and |screenpos()| are now faster.
-
-• Plugins:
-  • Nvim now includes |commenting| support.
-  • |:Man| supports the `:hide` modifier to open page in the current window.
-  • |:Man| respects 'wrapmargin'
-
-• Startup:
-  • |$NVIM_APPNAME| can be set to a relative path instead of only a name.
-  • |--startuptime| reports startup times for both processes (TUI + server) as
-    separate sections.
-
-• Terminal:
-  • |:terminal| accepts some |:command-modifiers| (specifically |:horizontal|
-    and those that affect splitting a window).
-  • Terminal buffers emit a |TermRequest| autocommand event when the child
-    process emits an OSC or DCS control sequence.
-  • Terminal buffers respond to OSC background and foreground requests.
-    |default-autocmds|
-
-• Treesitter:
-  • Bundled parsers and queries (highlight, folds) for Markdown, Python, and
-    Bash.
-  • |:InspectTree| shows root nodes.
-  • |:InspectTree| now supports |folding|.
-  • |:InspectTree| shows node ranges in 0-based instead of 1-based indexing.
-  • |vim.treesitter.foldexpr()| now recognizes folds captured using a
-    quantified query pattern.
-  • |vim.treesitter.query.omnifunc()| provides completion in treesitter query
-    files (set by default).
-  • |vim.treesitter.query.edit()| provides live editing of treesitter queries.
-  • |Query:iter_matches()| now has the ability to set the maximum start depth
-    for matches.
-  • `@injection.language` now has smarter resolution and will fall back to
-    language aliases (e.g., filetype or custom shorthands) registered via
-    |vim.treesitter.language.register()| and/or attempt lower case variants of
-    the text.
-  • `@injection.filename` will try to match the node text via
-    |vim.filetype.match()| and treat the result as a language name in the same
-    way as `@injection.language`.
-  • The `#set!` directive supports `injection.self` and `injection.parent` for
-    injecting either the current node's language or the parent
-    |LanguageTree|'s language, respectively.
-  • The `#set!` directive can set the "url" property of a node to have the
-    node emit a hyperlink. Hyperlinks are UI specific: in the TUI, the OSC 8
-    control sequence is used.
-  • Improved error messages for query parsing.
-
-• TUI:
-  • Builtin TUI can now recognize "super" (|vim
-    :call netrw#BrowseX(expand(exists("g:netrw_gx") ? g:netrw_gx : ''), netrw#CheckIfRemote())
-
-• LSP:
-  • LSP hover and signature help now use Treesitter for highlighting of
-    Markdown content. Note that highlighting of code examples requires
-    a matching parser and may be affected by custom queries.
-  • |LspRequest| autocmd callbacks contain more information about the LSP
-    request status update that occurred.
-
-• Lua:
-  • |vim.wait()| cannot be called in |api-fast|.
-  • |vim.diagnostic.config()| now accepts virtual text relevant options to
-    |nvim_buf_set_extmark()| (e.g. "virt_text_pos" and "hl_mode") in its
-    "virtual_text" table, which gives users more control over how diagnostic
-    virtual text is displayed.
-  • |vim.diagnostic.get()| and |vim.diagnostic.count()| accept multiple
-    namespaces rather than just a single namespace.
-  • |vim.diagnostic.enable()| gained new parameters, and the old signature is
-    deprecated.
-  • |vim.diagnostic.config()| now accepts a function for the virtual_text.prefix
-    option, which allows for rendering e.g., diagnostic severities differently.
-
-• Options:
-  • Attempting to set an invalid keycode option (e.g. `set t_foo=123`) no
-    longer gives an error.
-
-• Terminal:
-  • Terminal buffers started with no arguments (and use 'shell') close
-    automatically if the job exited without error, eliminating the (often
-    unwanted) "[Process exited 0]" message. |default-autocmds|
-
-• Treesitter:
-  • |Query:iter_matches()|, |vim.treesitter.query.add_predicate()|, and
-    |vim.treesitter.query.add_directive()| accept a new `all` option which
-    ensures that all matching nodes are returned as a table. The default option
-    `all=false` returns only a single node, breaking captures with quantifiers
-    like `(comment)+ @comment`; it is only provided for backward compatibility
-    and will be removed after Nvim 0.10.
-  • |vim.treesitter.query.add_predicate()| and
-    |vim.treesitter.query.add_directive()| now accept an options table rather
-    than a boolean "force" argument. To force a predicate or directive to
-    override an existing predicate or directive, use `{ force = true }`.
+• N/A
 
 ==============================================================================
 REMOVED FEATURES                                                 *news-removed*
 
 These deprecated features were removed.
 
-• Vimball support, including `:Vimuntar` command
-
-• Support for legacy treesitter injection queries
-
-• 'shortmess' flags:
-  • |shm-f|. Always use "(3 of 5)", never "(file 3 of 5)".
-  • |shm-i|. Always use "[noeol]".
-  • |shm-x|. Always use "[dos]", "[unix]" and "[mac]".
-  • |shm-n|. Always use "[New]".
+• N/A
 
 ==============================================================================
 DEPRECATIONS                                                *news-deprecations*
 
-See |deprecated-0.10|.
+See |deprecated-0.11|.
 
  vim:tw=78:ts=8:sw=2:et:ft=help:norl:
-- 
cgit 


From 4b029163345333a2c6975cd0dace6613b036ae47 Mon Sep 17 00:00:00 2001
From: vanaigr 
Date: Thu, 16 May 2024 09:57:58 -0500
Subject: perf(treesitter): use child_containing_descendant() in has-ancestor?
 (#28512)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Problem: `has-ancestor?` is O(n²) for the depth of the tree since it iterates over each of the node's ancestors (bottom-up), and each ancestor takes O(n) time.
This happens because tree-sitter's nodes don't store their parent nodes, and the tree is searched (top-down) each time a new parent is requested.

Solution: Make use of new `ts_node_child_containing_descendant()` in tree-sitter v0.22.6 (which is now the minimum required version) to rewrite the `has-ancestor?` predicate in C to become O(n).

For a sample file, decreases the time taken by `has-ancestor?` from 360ms to 6ms.
---
 runtime/doc/treesitter.txt | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'runtime/doc')

diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt
index e105d06ebb..0b84bb60d4 100644
--- a/runtime/doc/treesitter.txt
+++ b/runtime/doc/treesitter.txt
@@ -78,6 +78,8 @@ An instance `TSNode` of a treesitter node supports the following methods.
 
 TSNode:parent()                                         *TSNode:parent()*
     Get the node's immediate parent.
+    Prefer |TSNode:child_containing_descendant()|
+    for iterating over the node's ancestors.
 
 TSNode:next_sibling()                                   *TSNode:next_sibling()*
     Get the node's next sibling.
@@ -114,6 +116,9 @@ TSNode:named_child({index})                              *TSNode:named_child()*
     Get the node's named child at the given {index}, where zero represents the
     first named child.
 
+TSNode:child_containing_descendant({descendant})  *TSNode:child_containing_descendant()*
+    Get the node's child that contains {descendant}.
+
 TSNode:start()                                          *TSNode:start()*
     Get the node's start position. Return three values: the row, column and
     total byte count (all zero-based).
-- 
cgit 


From aec4938a21a02d279d13a9eb64ef3b7cc592c374 Mon Sep 17 00:00:00 2001
From: "Justin M. Keyes" 
Date: Fri, 17 May 2024 07:37:39 -0700
Subject: feat(api): broadcast events to ALL channels #28487

Problem:
`vim.rpcnotify(0)` and `rpcnotify(0)` are documented as follows:

    If {channel} is 0, the event is broadcast to all channels.

But that's not actually true. Channels must call `nvim_subscribe` to
receive "broadcast" events, so it's actually "multicast".

- Assuming there is a use-case for "broadcast", the current model adds
  an extra step for broadcasting: all channels need to "subscribe".
- The presence of `nvim_subscribe` is a source of confusion for users,
  because its name implies something more generally useful than what it
  does.

Presumably the use-case of `nvim_subscribe` is to avoid "noise" on RPC
channels not expected a broadcast notification, and potentially an error
if the channel client reports an unknown event.

Solution:
- Deprecate `nvim_subscribe`/`nvim_unsubscribe`.
  - If applications want to multicast, they can keep their own multicast
    list. Or they can use `nvim_list_chans()` and `nvim_get_chan_info()`
    to enumerate and filter the clients they want to target.
- Always send "broadcast" events to ALL channels. Don't require channels
  to "subscribe" to receive broadcasts. This matches the documented
  behavior of `rpcnotify()`.
---
 runtime/doc/api.txt        |  18 -------
 runtime/doc/deprecated.txt | 114 ++++++++++++++++++++++++---------------------
 runtime/doc/news.txt       |   7 ++-
 3 files changed, 67 insertions(+), 72 deletions(-)

(limited to 'runtime/doc')

diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 13884e865d..2aa147770d 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -1461,24 +1461,6 @@ nvim_strwidth({text})                                        *nvim_strwidth()*
     Return: ~
         Number of cells
 
-nvim_subscribe({event})                                     *nvim_subscribe()*
-    Subscribes to event broadcasts.
-
-    Attributes: ~
-        |RPC| only
-
-    Parameters: ~
-      • {event}  Event type string
-
-nvim_unsubscribe({event})                                 *nvim_unsubscribe()*
-    Unsubscribes to event broadcasts.
-
-    Attributes: ~
-        |RPC| only
-
-    Parameters: ~
-      • {event}  Event type string
-
 nvim__complete_set({index}, {opts})                     *nvim__complete_set()*
     EXPERIMENTAL: this API may change in the future.
 
diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt
index 3fc2d872f6..646ba72bd8 100644
--- a/runtime/doc/deprecated.txt
+++ b/runtime/doc/deprecated.txt
@@ -12,76 +12,82 @@ They should not be used in new scripts, and old scripts should be updated.
 ==============================================================================
 Deprecated features
 
-DEPRECATED IN 0.11 *deprecated-0.11*
+------------------------------------------------------------------------------
+DEPRECATED IN 0.11					*deprecated-0.11*
+
+API
+- nvim_subscribe()	Plugins must maintain their own "multicast" channels list.
+- nvim_unsubscribe()	Plugins must maintain their own "multicast" channels list.
 
-• N/A
 
-DEPRECATED IN 0.10 *deprecated-0.10*
+------------------------------------------------------------------------------
+DEPRECATED IN 0.10					*deprecated-0.10*
 
+API
+• *nvim_buf_get_option()*	Use |nvim_get_option_value()| instead.
+• *nvim_buf_set_option()*	Use |nvim_set_option_value()| instead.
+• *nvim_call_atomic()*		Use |nvim_exec_lua()| instead.
+• *nvim_get_option()*		Use |nvim_get_option_value()| instead.
+• *nvim_set_option()*		Use |nvim_set_option_value()| instead.
+• *nvim_win_get_option()*	Use |nvim_get_option_value()| instead.
+• *nvim_win_set_option()*	Use |nvim_set_option_value()| instead.
+
+CHECKHEALTH
+• *health#report_error* *vim.health.report_error()*	Use |vim.health.error()| instead.
+• *health#report_info* *vim.health.report_info()*	Use |vim.health.info()| instead.
+• *health#report_ok* *vim.health.report_ok()*		Use |vim.health.ok()| instead.
+• *health#report_start* *vim.health.report_start()*	Use |vim.health.start()| instead.
+• *health#report_warn* *vim.health.report_warn()*	Use |vim.health.warn()| instead.
+
+DIAGNOSTICS
 • Configuring |diagnostic-signs| using |:sign-define| or |sign_define()|. Use
   the "signs" key of |vim.diagnostic.config()| instead.
-
-• Checkhealth functions:
-  - *health#report_error* *vim.health.report_error()*	Use |vim.health.error()| instead.
-  - *health#report_info* *vim.health.report_info()*	Use |vim.health.info()| instead.
-  - *health#report_ok* *vim.health.report_ok()*		Use |vim.health.ok()| instead.
-  - *health#report_start* *vim.health.report_start()*	Use |vim.health.start()| instead.
-  - *health#report_warn* *vim.health.report_warn()*	Use |vim.health.warn()| instead.
-
-• |API| functions:
-  - *nvim_buf_get_option()*	Use |nvim_get_option_value()| instead.
-  - *nvim_buf_set_option()*	Use |nvim_set_option_value()| instead.
-  - *nvim_call_atomic()*		Use |nvim_exec_lua()| instead.
-  - *nvim_get_option()*		Use |nvim_get_option_value()| instead.
-  - *nvim_set_option()*		Use |nvim_set_option_value()| instead.
-  - *nvim_win_get_option()*	Use |nvim_get_option_value()| instead.
-  - *nvim_win_set_option()*	Use |nvim_set_option_value()| instead.
-
 • vim.diagnostic functions:
-  - *vim.diagnostic.disable()*		Use |vim.diagnostic.enable()|
-  - *vim.diagnostic.is_disabled()*	Use |vim.diagnostic.is_enabled()|
-  - Legacy signature: `vim.diagnostic.enable(buf:number, namespace:number)`
-
-• vim.lsp functions:
-  - *vim.lsp.util.get_progress_messages()*	Use |vim.lsp.status()| instead.
-  - *vim.lsp.get_active_clients()*		Use |vim.lsp.get_clients()| instead.
-  - *vim.lsp.for_each_buffer_client()*		Use |vim.lsp.get_clients()| instead.
-  - *vim.lsp.util.trim_empty_lines()*		Use |vim.split()| with `trimempty` instead.
-  - *vim.lsp.util.try_trim_markdown_code_blocks()*
-  - *vim.lsp.util.set_lines()*
-  - *vim.lsp.util.extract_completion_items()*
-  - *vim.lsp.util.parse_snippet()*
-  - *vim.lsp.util.text_document_completion_list_to_complete_items()*
-  - *vim.lsp.util.lookup_section()*		Use |vim.tbl_get()| instead: >
+  • *vim.diagnostic.disable()*		Use |vim.diagnostic.enable()|
+  • *vim.diagnostic.is_disabled()*	Use |vim.diagnostic.is_enabled()|
+  • Legacy signature: `vim.diagnostic.enable(buf:number, namespace:number)`
+
+LSP
+• *vim.lsp.util.get_progress_messages()*	Use |vim.lsp.status()| instead.
+• *vim.lsp.get_active_clients()*		Use |vim.lsp.get_clients()| instead.
+• *vim.lsp.for_each_buffer_client()*		Use |vim.lsp.get_clients()| instead.
+• *vim.lsp.util.trim_empty_lines()*		Use |vim.split()| with `trimempty` instead.
+• *vim.lsp.util.try_trim_markdown_code_blocks()*
+• *vim.lsp.util.set_lines()*
+• *vim.lsp.util.extract_completion_items()*
+• *vim.lsp.util.parse_snippet()*
+• *vim.lsp.util.text_document_completion_list_to_complete_items()*
+• *vim.lsp.util.lookup_section()*		Use |vim.tbl_get()| instead: >
 						local keys = vim.split(section, '.', { plain = true })
 						local  vim.tbl_get(table, unpack(keys))
 
+LUA
 • *vim.loop*				Use |vim.uv| instead.
+• *vim.tbl_add_reverse_lookup()*
+• *vim.tbl_flatten()*			Use |Iter:flatten()| instead.
+• *vim.tbl_islist()*			Use |vim.islist()| instead.
 
-• vim.treesitter functions:
-  - *LanguageTree:for_each_child()*		Use |LanguageTree:children()| (non-recursive) instead.
-
+OPTIONS
 • The "term_background" UI option |ui-ext-options| is deprecated and no longer
   populated. Background color detection is now performed in Lua by the Nvim
   core, not the TUI.
 
-• Lua stdlib:
-  - *vim.tbl_add_reverse_lookup()*
-  - *vim.tbl_flatten()*			Use |Iter:flatten()| instead.
-  - *vim.tbl_islist()*			Use |vim.islist()| instead.
-
-DEPRECATED IN 0.9 *deprecated-0.9*
+TREESITTER
+• *LanguageTree:for_each_child()*	Use |LanguageTree:children()| (non-recursive) instead.
 
-• vim.treesitter functions
-  - *vim.treesitter.language.require_language()*	Use |vim.treesitter.language.add()| instead.
-  - *vim.treesitter.get_node_at_pos()*			Use |vim.treesitter.get_node()| instead.
-  - *vim.treesitter.get_node_at_cursor()*		Use |vim.treesitter.get_node()|
-							and |TSNode:type()| instead.
 
-• |API| functions:
-  - *nvim_get_hl_by_name()*		Use |nvim_get_hl()| instead.
-  - *nvim_get_hl_by_id()*		Use |nvim_get_hl()| instead.
+------------------------------------------------------------------------------
+DEPRECATED IN 0.9					*deprecated-0.9*
 
+API
+- *nvim_get_hl_by_name()*		Use |nvim_get_hl()| instead.
+- *nvim_get_hl_by_id()*			Use |nvim_get_hl()| instead.
+
+TREESITTER
+- *vim.treesitter.language.require_language()*	Use |vim.treesitter.language.add()| instead.
+- *vim.treesitter.get_node_at_pos()*		Use |vim.treesitter.get_node()| instead.
+- *vim.treesitter.get_node_at_cursor()*		Use |vim.treesitter.get_node()|
+						and |TSNode:type()| 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()|
@@ -98,10 +104,12 @@ DEPRECATED IN 0.9 *deprecated-0.9*
   - *vim.treesitter.query.get_range()*     -> |vim.treesitter.get_range()|
   - *vim.treesitter.query.get_node_text()* -> |vim.treesitter.get_node_text()|
 
-• Lua stdlib:
+LUA
   - *nvim_exec()*				Use |nvim_exec2()| instead.
   - *vim.pretty_print()*			Use |vim.print()| instead.
 
+
+------------------------------------------------------------------------------
 DEPRECATED IN 0.8 OR EARLIER
 
 API
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index a1859d19cf..0730faa441 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -25,7 +25,12 @@ These changes may require adaptations in your config or plugins.
 
 API
 
-• TODO
+• `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
+  now maintain their own list of channels.
+  • In the future, |vim.rpcnotify()| may accept a list of channels, if there
+    is demand for this use-case.
 
 DEFAULTS
 
-- 
cgit 


From 4c0d18c19773327dcd771d1da7805690e3e41255 Mon Sep 17 00:00:00 2001
From: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Date: Fri, 17 May 2024 14:17:25 -0500
Subject: fix(vim.iter): enable optimizations for arrays (lists with holes)
 (#28781)

The optimizations that vim.iter uses for array-like tables don't require
that the source table has no holes. The only thing that needs to change
is the determination if a table is "list-like": rather than requiring
consecutive, integer keys, we can simply test for (positive) integer
keys only, and remove any holes in the original array when we make a
copy for the iterator.
---
 runtime/doc/lua.txt | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'runtime/doc')

diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 0be3c24b0a..fccda177d2 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -3830,6 +3830,7 @@ chained to create iterator "pipelines": the output of each pipeline stage is
 input to the next stage. The first stage depends on the type passed to
 `vim.iter()`:
 • List tables (arrays, |lua-list|) yield only the value of each element.
+  • Holes (nil values) are allowed.
   • Use |Iter:enumerate()| to also pass the index to the next stage.
   • Or initialize with ipairs(): `vim.iter(ipairs(…))`.
 • Non-list tables (|lua-dict|) yield both the key and value of each element.
@@ -4287,9 +4288,9 @@ Iter:totable()                                                *Iter:totable()*
     Collect the iterator into a table.
 
     The resulting table depends on the initial source in the iterator
-    pipeline. List-like tables and function iterators will be collected into a
-    list-like table. If multiple values are returned from the final stage in
-    the iterator pipeline, each value will be included in a table.
+    pipeline. Array-like tables and function iterators will be collected into
+    an array-like table. If multiple values are returned from the final stage
+    in the iterator pipeline, each value will be included in a table.
 
     Examples: >lua
         vim.iter(string.gmatch('100 20 50', '%d+')):map(tonumber):totable()
@@ -4302,7 +4303,7 @@ Iter:totable()                                                *Iter:totable()*
         -- { { 'a', 1 }, { 'c', 3 } }
 <
 
-    The generated table is a list-like table with consecutive, numeric
+    The generated table is an array-like table with consecutive, numeric
     indices. To create a map-like table with arbitrary keys, use
     |Iter:fold()|.
 
-- 
cgit 


From 62eb7e79a5f9b5f476f034b5446d2972c840ef87 Mon Sep 17 00:00:00 2001
From: zeertzjq 
Date: Sat, 18 May 2024 07:09:05 +0800
Subject: vim-patch:9.1.0418: Cannot move to previous/next rare word (#28822)

Problem:  Cannot move to previous/next rare word
          (Colin Kennedy)
Solution: Add the ]r and [r motions (Christ van Willegen)

fixes: vim/vim#14773
closes: vim/vim#14780

https://github.com/vim/vim/commit/8e4c4c7d87def2b100a5d64dc518ef85d9de8765

Co-authored-by: Christ van Willegen - van Noort 
---
 runtime/doc/spell.txt | 11 +++++++++++
 1 file changed, 11 insertions(+)

(limited to 'runtime/doc')

diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt
index 29e4a7b0aa..269d52352d 100644
--- a/runtime/doc/spell.txt
+++ b/runtime/doc/spell.txt
@@ -51,6 +51,17 @@ To search for the next misspelled word:
 							*[S*
 [S			Like "]S" but search backwards.
 
+							*]r*
+]r			Move to next "rare" word after the cursor.
+			A count before the command can be used to repeat.
+			'wrapscan' applies.
+
+							*[r*
+[r			Like "]r" but search backwards, find the "rare"
+			word before the cursor.  Doesn't recognize words
+			split over two lines, thus may stop at words that are
+			not highlighted as rare.
+
 
 To add words to your own word list:
 
-- 
cgit 


From 2dfce05ec9fba1bd16b63355e7d75864090295ca Mon Sep 17 00:00:00 2001
From: Christian Clason 
Date: Mon, 20 May 2024 14:15:53 +0200
Subject: vim-patch:957d903cb7af

runtime(arduino): Add Arduino ftplugin and indent files (vim/vim#14811)

We already have Arduino syntax file, but we didn't have ftplugin and
indent files.

This commit adds a basic ftplugin file and a basic indent file.
Both of them are derived from {ftplugin,indent}/c.vim.

https://github.com/vim/vim/commit/957d903cb7af41539efd3195d053293987af85d9

Co-authored-by: K.Takata 
---
 runtime/doc/filetype.txt | 12 ++++++++++++
 1 file changed, 12 insertions(+)

(limited to 'runtime/doc')

diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index b1eb841e90..454bebe32f 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -415,6 +415,18 @@ To disable folding everything under the title use this: >
 	let asciidoc_fold_under_title = 0
 
 
+ARDUINO							*ft-arduino-plugin*
+
+By default the following options are set, in accordance with the default
+settings of Arduino IDE: >
+
+	setlocal expandtab tabstop=2 softtabstop=2 shiftwidth=2
+
+To disable this behavior, set the following variable in your vimrc: >
+
+	let g:arduino_recommended_style = 0
+
+
 AWK							*ft-awk-plugin*
 
 Support for features specific to GNU Awk, like @include, can be enabled by
-- 
cgit 


From d89144626e7429d9c499875ed426a6223f9013be Mon Sep 17 00:00:00 2001
From: zeertzjq 
Date: Mon, 20 May 2024 06:15:58 +0800
Subject: vim-patch:9.1.0394: Cannot get a list of positions describing a
 region

Problem:  Cannot get a list of positions describing a region
          (Justin M. Keyes, after v9.1.0120)
Solution: Add the getregionpos() function
          (Shougo Matsushita)

fixes: vim/vim#14609
closes: vim/vim#14617

https://github.com/vim/vim/commit/b4757e627e6c83d1c8e5535d4887a82d6a5efdd0

Co-authored-by: Shougo Matsushita 
Co-authored-by: Justin M. Keyes 
---
 runtime/doc/builtin.txt | 17 +++++++++++++++++
 runtime/doc/usr_41.txt  |  1 +
 2 files changed, 18 insertions(+)

(limited to 'runtime/doc')

diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index bbbabea2a4..0f0e33b54e 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -2969,6 +2969,23 @@ getregion({pos1}, {pos2} [, {opts}])                               *getregion()*
 			\ getpos('v'), getpos('.'), #{ type: mode() })
 <
 
+getregionpos({pos1}, {pos2} [, {opts}])                         *getregionpos()*
+		Same as |getregion()|, but returns a list of positions
+		describing the buffer text segments bound by {pos1} and
+		{pos2}.
+		The segments are a pair of positions for every line: >
+			[[{start_pos}, {end_pos}], ...]
+<
+		The position is a |List| with four numbers:
+		    [bufnum, lnum, col, off]
+		"bufnum" is the buffer number.
+		"lnum" and "col" are the position in the buffer.  The first
+		column is 1.
+		The "off" number is zero, unless 'virtualedit' is used.  Then
+		it is the offset in screen columns from the start of the
+		character.  E.g., a position within a  or after the last
+		character.
+
 getregtype([{regname}])                                           *getregtype()*
 		The result is a String, which is type of register {regname}.
 		The value will be one of:
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 9515548cc5..ab2eecdfaf 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -794,6 +794,7 @@ Cursor and mark position:		*cursor-functions* *mark-functions*
 Working with text in the current buffer:		*text-functions*
 	getline()		get a line or list of lines from the buffer
 	getregion()		get a region of text from the buffer
+	getregionpos()		get a list of positions for a region
 	setline()		replace a line in the buffer
 	append()		append line or list of lines in the buffer
 	indent()		indent of a specific line
-- 
cgit 


From e0259b9466a0dd62b74d4aa195b3c5e6c7a183d0 Mon Sep 17 00:00:00 2001
From: zeertzjq 
Date: Mon, 20 May 2024 20:50:32 +0800
Subject: vim-patch:9.1.0423: getregionpos() wrong with blockwise mode and
 multibyte

Problem:  getregionpos() wrong with blockwise mode and multibyte.
Solution: Use textcol and textlen instead of start_vcol and end_vcol.
          Handle coladd properly (zeertzjq).

Also remove unnecessary buflist_findnr() in add_regionpos_range(), as
getregionpos() has already switched buffer.

closes: vim/vim#14805

https://github.com/vim/vim/commit/c95e64f41f7f6d1bdc95b047ae9b369743c8637b
---
 runtime/doc/builtin.txt | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'runtime/doc')

diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 0f0e33b54e..e0921cf477 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -2981,10 +2981,12 @@ getregionpos({pos1}, {pos2} [, {opts}])                         *getregionpos()*
 		"bufnum" is the buffer number.
 		"lnum" and "col" are the position in the buffer.  The first
 		column is 1.
-		The "off" number is zero, unless 'virtualedit' is used.  Then
-		it is the offset in screen columns from the start of the
-		character.  E.g., a position within a  or after the last
-		character.
+		If the "off" number of a starting position is non-zero, it is
+		the offset in screen columns from the start of the character.
+		E.g., a position within a  or after the last character.
+		If the "off" number of an ending position is non-zero, it is
+		the character's number of cells included in the selection,
+		otherwise the whole character is included.
 
 getregtype([{regname}])                                           *getregtype()*
 		The result is a String, which is type of register {regname}.
-- 
cgit 


From ad191be65e2b1641c181506166b1037b548d14a8 Mon Sep 17 00:00:00 2001
From: Tobias Schmitz 
Date: Tue, 21 May 2024 18:21:42 +0200
Subject: feat(signs)!: place higher-priority signs from the left #27781

Problem:
Higher-priority signs may be hidden by lower-priority signs.

Solution:
Place higher-priority signs from the left.

Example:

    nvim_buf_set_extmark(0, ns, 0, -1, {sign_text='H', priority=1})
    nvim_buf_set_extmark(0, ns, 0, -1, {sign_text='W', priority=2})
    nvim_buf_set_extmark(0, ns, 0, -1, {sign_text='E', priority=3})

Before:

            |     |
          H | W E |
          ^ |     |
Not visible

After:

  |     |
  | E W | H
  |     | ^
          Not visible

Fixes #16632
---
 runtime/doc/news.txt | 2 +-
 runtime/doc/sign.txt | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

(limited to 'runtime/doc')

diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 0730faa441..f8bc983441 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -38,7 +38,7 @@ DEFAULTS
 
 EDITOR
 
-• TODO
+• The order in which signs are placed was changed. Higher priority signs will now appear left of lower priority signs.
 
 EVENTS
 
diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt
index 0360ce67f6..6fa260be40 100644
--- a/runtime/doc/sign.txt
+++ b/runtime/doc/sign.txt
@@ -72,9 +72,10 @@ on the same line, the attributes of the sign with the highest priority is used
 independently of the sign group. The default priority for a sign is 10. The
 priority is assigned at the time of placing a sign.
 
-When two signs with the same priority are present, and one has an icon or text
-in the signcolumn while the other has line highlighting, then both are
-displayed.
+When multiple signs that each have an icon or text are present, signs are
+ordered with increasing priority from left to right, up until the maximum
+width set in 'signcolumn'. Lower priority signs that do not fit are hidden.
+Highest priority signs with highlight attributes are always shown.
 
 When the line on which the sign is placed is deleted, the sign is removed along
 with it.
-- 
cgit 


From a108852b008b2cb1fe38b1f66cffd78b33bd9a70 Mon Sep 17 00:00:00 2001
From: Riley Bruins 
Date: Tue, 21 May 2024 09:25:54 -0700
Subject: fix(lsp): semantic token functions allow "0" bufnr #28849

aligns with ":help dev-patterns"
---
 runtime/doc/lsp.txt | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

(limited to 'runtime/doc')

diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index ab09ba4252..5729531b30 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -1686,9 +1686,10 @@ highlight_token({token}, {bufnr}, {client_id}, {hl_group}, {opts})
     use inside |LspTokenUpdate| callbacks.
 
     Parameters: ~
-      • {token}      (`table`) a semantic token, found as `args.data.token` in
-                     |LspTokenUpdate|.
-      • {bufnr}      (`integer`) the buffer to highlight
+      • {token}      (`table`) A semantic token, found as `args.data.token` in
+                     |LspTokenUpdate|
+      • {bufnr}      (`integer`) The buffer to highlight, or `0` for current
+                     buffer
       • {client_id}  (`integer`) The ID of the |vim.lsp.Client|
       • {hl_group}   (`string`) Highlight group name
       • {opts}       (`table?`) Optional parameters:
@@ -1709,8 +1710,8 @@ start({bufnr}, {client_id}, {opts})          *vim.lsp.semantic_tokens.start()*
 <
 
     Parameters: ~
-      • {bufnr}      (`integer`)
-      • {client_id}  (`integer`)
+      • {bufnr}      (`integer`) Buffer number, or `0` for current buffer
+      • {client_id}  (`integer`) The ID of the |vim.lsp.Client|
       • {opts}       (`table?`) Optional keyword arguments
                      • debounce (integer, default: 200): Debounce token
                        requests to the server by the given number in
@@ -1726,8 +1727,8 @@ stop({bufnr}, {client_id})                    *vim.lsp.semantic_tokens.stop()*
     from the buffer.
 
     Parameters: ~
-      • {bufnr}      (`integer`)
-      • {client_id}  (`integer`)
+      • {bufnr}      (`integer`) Buffer number, or `0` for current buffer
+      • {client_id}  (`integer`) The ID of the |vim.lsp.Client|
 
 
 ==============================================================================
-- 
cgit 


From 56b7a18995681b3e732f8fa460ef378e7044f990 Mon Sep 17 00:00:00 2001
From: Jongwook Choi 
Date: Tue, 21 May 2024 12:31:28 -0400
Subject: docs: how to get core dump files #28826

Problem: Docs about how to obtain backtraces on Linux is not very
beginner-friendly; some users used to have difficulties in getting
stacktrace against Nvim crash.

For instance, the `core` dump file might not appear in the current
directory on Ubuntu systems with apport, and the current docs do not
fully cover such cases.

Solution: Add more hints about where core dump files can be found. For
example, on Ubuntu where apport is managing core dump files, users would
want to find them in `/var/lib/apport/coredump`.
---
 runtime/doc/dev_tools.txt | 61 +++++++++++++++++++++++++----------------------
 1 file changed, 33 insertions(+), 28 deletions(-)

(limited to 'runtime/doc')

diff --git a/runtime/doc/dev_tools.txt b/runtime/doc/dev_tools.txt
index b9e1e68dbb..52513db31d 100644
--- a/runtime/doc/dev_tools.txt
+++ b/runtime/doc/dev_tools.txt
@@ -14,10 +14,10 @@ itself. See also |debug.txt| for advice that applies to Vim.
 ==============================================================================
 Backtraces                                            *dev-tools-backtrace*
 
-LINUX ~
+LINUX
 
-Core dumps are disabled by default on Ubuntu
-https://stackoverflow.com/a/18368068, CentOS and others. To enable core dumps:
+Core dumps are disabled by default on Ubuntu, CentOS and others.
+To enable core dumps:
 >bash
     ulimit -c unlimited
 <
@@ -25,21 +25,29 @@ On systemd-based systems getting a backtrace is as easy as:
 >bash
     coredumpctl -1 gdb
 <
-It's an optional tool, so you may need to install it:
+`coredumpctl` is an optional tool, so you may need to install it:
 >bash
     sudo apt install systemd-coredump
 <
 
-The full backtrace is most useful, send us the `bt.txt` file:
+The full backtrace is most useful; please send us the `backtrace.txt` file
+when reporting a bug related to a crash:
 >bash
-    2>&1 coredumpctl -1 gdb | tee -a bt.txt
-    thread apply all bt full
+    2>&1 coredumpctl -1 gdb | tee -a backtrace.txt
+    (gdb) thread apply all bt full
 <
-On older systems a `core` file will appear in the current directory. To get
-a backtrace from the `core` file:
+
+On systems without `coredumpctl`, you may find a `core` dump file appearing
+in the current directory or in other locations. On Linux systems where
+`apport` is installed (such as Ubuntu), the directory where core dump files
+are saved can be `/var/lib/apport/coredump` or elsewhere, depending on the
+system configuration (see `/proc/sys/kernel/core_pattern`). See also:
+https://stackoverflow.com/a/18368068
+
+To get a backtrace from the `./core` dump file:
 >bash
-    gdb build/bin/nvim core 2>&1 | tee backtrace.txt
-    thread apply all bt full
+    gdb build/bin/nvim ./core 2>&1 | tee backtrace.txt
+    (gdb) thread apply all bt full
 <
 
 MACOS
@@ -76,7 +84,7 @@ core dumps with `/etc/launchd.conf`).
 ==============================================================================
 Gdb                                                          *dev-tools-gdb*
 
-USING GDB TO STEP THROUGH FUNCTIONAL TESTS ~
+USING GDB TO STEP THROUGH FUNCTIONAL TESTS
 
 Use `TEST_TAG` to run tests matching busted tags (of the form `#foo` e.g.
 `it("test #foo ...", ...)`):
@@ -86,19 +94,19 @@ Use `TEST_TAG` to run tests matching busted tags (of the form `#foo` e.g.
 Then, in another terminal:
 >bash
     gdb build/bin/nvim
-    target remote localhost:7777
+    (gdb) target remote localhost:7777
 
 -- See `nvim_argv` in https://github.com/neovim/neovim/blob/master/test/functional/testnvim.lua.
 
-USING LLDB TO STEP THROUGH UNIT TESTS ~
+USING LLDB TO STEP THROUGH UNIT TESTS
 
->bash
+>
     lldb .deps/usr/bin/luajit -- .deps/usr/bin/busted --lpath="./build/?.lua" test/unit/
 <
+USING GDB
 
-USING GDB ~
-
-To attach to a running `nvim` process with a pid of 1234:
+To attach to a running `nvim` process with a pid of 1234 (Tip: the pid of a
+running Nvim instance can be obtained by calling |getpid()|), for instance:
 >bash
     gdb -tui -p 1234 build/bin/nvim
 <
@@ -117,8 +125,7 @@ The `gdb` interactive prompt will appear. At any time you can:
   need for a gdb "frontend".
 - `` and `` to scroll the source file view
 
-
-GDB "REVERSE DEBUGGING" ~
+GDB REVERSE DEBUGGING
 
 - `set record full insn-number-max unlimited`
 - `continue` for a bit (at least until `main()` is executed
@@ -126,8 +133,7 @@ GDB "REVERSE DEBUGGING" ~
 - provoke the bug, then use `revert-next`, `reverse-step`, etc. to rewind the
   debugger
 
-
-USING GDBSERVER ~
+USING GDBSERVER
 
 You may want to connect multiple `gdb` clients to the same running `nvim`
 process, or you may want to connect to a remote `nvim` process with a local
@@ -145,12 +151,12 @@ debugging session in another terminal:
 <
 Once you've entered `gdb`, you need to attach to the remote session:
 >
-    target remote localhost:6666
+    (gdb) target remote localhost:6666
 <
 In case gdbserver puts the TUI as a background process, the TUI can become
 unable to read input from pty (and receives SIGTTIN signal) and/or output data
 (SIGTTOU signal). To force the TUI as the foreground process, you can add
->
+>c
     signal (SIGTTOU, SIG_IGN);
     if (!tcsetpgrp(data->input.in_fd, getpid())) {
         perror("tcsetpgrp failed");
@@ -158,8 +164,7 @@ unable to read input from pty (and receives SIGTTIN signal) and/or output data
 <
 to `tui.c:terminfo_start`.
 
-
-USING GDBSERVER IN TMUX ~
+USING GDBSERVER IN TMUX
 
 Consider using a custom makefile
 https://github.com/neovim/neovim/blob/master/BUILD.md#custom-makefile to
@@ -184,8 +189,8 @@ Here `gdb_start.sh` includes `gdb` commands to be called when the debugger
 starts. It needs to attach to the server started by the `dbg-start` rule. For
 example:
 >
-    target remote localhost:6666
-    br main
+    (gdb) target remote localhost:6666
+    (gdb) br main
 <
 
 vim:tw=78:ts=8:et:ft=help:norl:
-- 
cgit 


From d6be78cc98c49076f8b6c5b641b7ed403f4377c5 Mon Sep 17 00:00:00 2001
From: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Date: Tue, 21 May 2024 18:51:51 -0500
Subject: vim-patch:d1d9316: runtime(zig): refactor zig ftplugin, remove auto
 format (#28904)

Refactored zig ftplugin, removed upstream comment, aucmd and
auto formatting support. Updated documentation for zig configuration
settings and added new maintainer.

closes: vim/vim#13803

https://github.com/vim/vim/commit/d1d9316c6621d275593f58664975faf0fc23985f

Co-authored-by: Tiseno 
---
 runtime/doc/filetype.txt | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

(limited to 'runtime/doc')

diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 454bebe32f..5eae78744c 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -994,6 +994,31 @@ The mappings can be disabled with: >
 	let g:no_vim_maps = 1
 
 
+ZIG							*ft-zig-plugin*
+
+						*g:zig_recommended_style*
+By default the following indentation options are set, in accordance with Zig's
+recommended style (https://ziglang.org/documentation/master/): >
+
+	setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
+<
+To disable this behavior, set |g:zig_recommended_style| to 0: >
+
+	let g:zig_recommended_style = 0
+<
+							*g:zig_std_dir*
+The path to the Zig standard library. The Zig |ftplugin| reads |g:zig_std_dir|
+and appends it to the 'path' for Zig files. Where the Zig standard library
+is located is system and installation method dependent.
+
+One can automatically set |g:zig_std_dir| using `zig env`: >
+
+	let g:zig_std_dir = json_decode(system('zig env'))['std_dir']
+<
+This can, for example, be put in a FileType |:autocmd| or user |ftplugin| to
+only load when a Zig file is opened.
+
+
 ZIMBU							*ft-zimbu-plugin*
 
 The Zimbu filetype plugin defines mappings to move to the start and end of
-- 
cgit 


From e8f7025de1d8b7c8bbe747736e4c46dcd6e73133 Mon Sep 17 00:00:00 2001
From: dundargoc 
Date: Wed, 22 May 2024 16:07:45 +0200
Subject: docs: move vim.health documentation to lua.txt

`vim.health` is not a "plugin" but part of our Lua API and the
documentation should reflect that. This also helps make the
documentation maintenance easier as it is now generated.
---
 runtime/doc/help.txt      |   1 -
 runtime/doc/lua.txt       | 125 ++++++++++++++++++++++++++++++++++++++++++++++
 runtime/doc/pi_health.txt | 122 --------------------------------------------
 3 files changed, 125 insertions(+), 123 deletions(-)
 delete mode 100644 runtime/doc/pi_health.txt

(limited to 'runtime/doc')

diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt
index 7545d2c621..f2deac3cd8 100644
--- a/runtime/doc/help.txt
+++ b/runtime/doc/help.txt
@@ -175,7 +175,6 @@ DEVELOPING NVIM
 Standard plugins ~
 						*standard-plugin-list*
 |pi_gzip.txt|		Reading and writing compressed files
-|pi_health.txt|		Healthcheck framework
 |pi_msgpack.txt|	msgpack utilities
 |pi_netrw.txt|		Reading and writing files over a network
 |pi_paren.txt|		Highlight matching parens
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index fccda177d2..76a6bc0801 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -4430,4 +4430,129 @@ tohtml.tohtml({winid}, {opt})                         *tohtml.tohtml.tohtml()*
         (`string[]`)
 
 
+==============================================================================
+Lua module: vim.health                                            *vim.health*
+
+
+health.vim is a minimal framework to help users troubleshoot configuration and
+any other environment conditions that a plugin might care about. Nvim ships
+with healthchecks for configuration, performance, python support, ruby
+support, clipboard support, and more.
+
+To run all healthchecks, use: >vim
+
+        :checkhealth
+<
+Plugin authors are encouraged to write new healthchecks. |health-dev|
+
+Commands                                                     *health-commands*
+
+                                                           *:che* *:checkhealth*
+:che[ckhealth]  Run all healthchecks.
+                                                                       *E5009*
+                Nvim depends on |$VIMRUNTIME|, 'runtimepath' and 'packpath' to
+                find the standard "runtime files" for syntax highlighting,
+                filetype-specific behavior, and standard plugins (including
+                :checkhealth).  If the runtime files cannot be found then
+                those features will not work.
+
+:che[ckhealth] {plugins}
+                Run healthcheck(s) for one or more plugins. E.g. to run only
+                the standard Nvim healthcheck: >vim
+                        :checkhealth vim.health
+<
+                To run the healthchecks for the "foo" and "bar" plugins
+                (assuming they are on 'runtimepath' and they have implemented
+                the Lua `require("foo.health").check()` interface): >vim
+                        :checkhealth foo bar
+<
+                To run healthchecks for Lua submodules, use dot notation or
+                "*" to refer to all submodules. For example Nvim provides
+                `vim.lsp` and `vim.treesitter`:  >vim
+                        :checkhealth vim.lsp vim.treesitter
+                        :checkhealth vim*
+<
+
+Create a healthcheck                                              *health-dev*
+
+Healthchecks are functions that check the user environment, configuration, or
+any other prerequisites that a plugin cares about. Nvim ships with
+healthchecks in:
+        - $VIMRUNTIME/autoload/health/
+        - $VIMRUNTIME/lua/vim/lsp/health.lua
+        - $VIMRUNTIME/lua/vim/treesitter/health.lua
+        - and more...
+
+To add a new healthcheck for your own plugin, simply create a "health.lua"
+module on 'runtimepath' that returns a table with a "check()" function. Then
+|:checkhealth| will automatically find and invoke the function.
+
+For example if your plugin is named "foo", define your healthcheck module at
+one of these locations (on 'runtimepath'):
+        - lua/foo/health/init.lua
+        - lua/foo/health.lua
+
+If your plugin also provides a submodule named "bar" for which you want
+a separate healthcheck, define the healthcheck at one of these locations:
+        - lua/foo/bar/health/init.lua
+        - lua/foo/bar/health.lua
+
+All such health modules must return a Lua table containing a `check()`
+function.
+
+Copy this sample code into `lua/foo/health.lua`, replacing "foo" in the path
+with your plugin name: >lua
+
+        local M = {}
+
+        M.check = function()
+          vim.health.start("foo report")
+          -- make sure setup function parameters are ok
+          if check_setup() then
+            vim.health.ok("Setup is correct")
+          else
+            vim.health.error("Setup is incorrect")
+          end
+          -- do some more checking
+          -- ...
+        end
+
+        return M
+
+
+vim.health.error({msg}, {...})                            *vim.health.error()*
+    Reports an error.
+
+    Parameters: ~
+      • {msg}  (`string`)
+      • {...}  (`string|string[]`) Optional advice
+
+vim.health.info({msg})                                     *vim.health.info()*
+    Reports an informational message.
+
+    Parameters: ~
+      • {msg}  (`string`)
+
+vim.health.ok({msg})                                         *vim.health.ok()*
+    Reports a "success" message.
+
+    Parameters: ~
+      • {msg}  (`string`)
+
+vim.health.start({name})                                  *vim.health.start()*
+    Starts a new report. Most plugins should call this only once, but if you
+    want different sections to appear in your report, call this once per
+    section.
+
+    Parameters: ~
+      • {name}  (`string`)
+
+vim.health.warn({msg}, {...})                              *vim.health.warn()*
+    Reports a warning.
+
+    Parameters: ~
+      • {msg}  (`string`)
+      • {...}  (`string|string[]`) Optional advice
+
+
  vim:tw=78:ts=8:sw=4:sts=4:et:ft=help:norl:
diff --git a/runtime/doc/pi_health.txt b/runtime/doc/pi_health.txt
deleted file mode 100644
index bcc933d8b2..0000000000
--- a/runtime/doc/pi_health.txt
+++ /dev/null
@@ -1,122 +0,0 @@
-*pi_health.txt*   Healthcheck framework
-
-Author: TJ DeVries 
-
-                                      Type |gO| to see the table of contents.
-
-==============================================================================
-Introduction                            *health*
-
-health.vim is a minimal framework to help users troubleshoot configuration and
-any other environment conditions that a plugin might care about. Nvim ships
-with healthchecks for configuration, performance, python support, ruby
-support, clipboard support, and more.
-
-To run all healthchecks, use: >vim
-
-        :checkhealth
-<
-Plugin authors are encouraged to write new healthchecks. |health-dev|
-
-==============================================================================
-Commands                                *health-commands*
-
-                                                             *:che* *:checkhealth*
-:che[ckhealth]  Run all healthchecks.
-                                        *E5009*
-                Nvim depends on |$VIMRUNTIME|, 'runtimepath' and 'packpath' to
-                find the standard "runtime files" for syntax highlighting,
-                filetype-specific behavior, and standard plugins (including
-                :checkhealth).  If the runtime files cannot be found then
-                those features will not work.
-
-:che[ckhealth] {plugins}
-                Run healthcheck(s) for one or more plugins. E.g. to run only
-                the standard Nvim healthcheck: >vim
-                        :checkhealth nvim
-<
-                To run the healthchecks for the "foo" and "bar" plugins
-                (assuming they are on 'runtimepath' and they have implemented
-                the Lua `require("foo.health").check()` interface): >vim
-                        :checkhealth foo bar
-<
-                To run healthchecks for Lua submodules, use dot notation or
-                "*" to refer to all submodules. For example Nvim provides
-                `vim.lsp` and `vim.treesitter`:  >vim
-                        :checkhealth vim.lsp vim.treesitter
-                        :checkhealth vim*
-<
-==============================================================================
-Functions                               *health-functions* *vim.health*
-
-The Lua "health" module can be used to create new healthchecks. To get started
-see |health-dev|.
-
-vim.health.start({name})                                     *vim.health.start()*
-        Starts a new report. Most plugins should call this only once, but if
-        you want different sections to appear in your report, call this once
-        per section.
-
-vim.health.info({msg})                                        *vim.health.info()*
-        Reports an informational message.
-
-vim.health.ok({msg})                                            *vim.health.ok()*
-        Reports a "success" message.
-
-vim.health.warn({msg} [, {advice}])                           *vim.health.warn()*
-        Reports a warning. {advice} is an optional list of suggestions to
-        present to the user.
-
-vim.health.error({msg} [, {advice}])                         *vim.health.error()*
-        Reports an error. {advice} is an optional list of suggestions to
-        present to the user.
-
-==============================================================================
-Create a healthcheck                                    *health-dev*
-
-Healthchecks are functions that check the user environment, configuration, or
-any other prerequisites that a plugin cares about. Nvim ships with
-healthchecks in:
-        - $VIMRUNTIME/autoload/health/
-        - $VIMRUNTIME/lua/vim/lsp/health.lua
-        - $VIMRUNTIME/lua/vim/treesitter/health.lua
-        - and more...
-
-To add a new healthcheck for your own plugin, simply create a "health.lua"
-module on 'runtimepath' that returns a table with a "check()" function. Then
-|:checkhealth| will automatically find and invoke the function.
-
-For example if your plugin is named "foo", define your healthcheck module at
-one of these locations (on 'runtimepath'):
-        - lua/foo/health/init.lua
-        - lua/foo/health.lua
-
-If your plugin also provides a submodule named "bar" for which you want
-a separate healthcheck, define the healthcheck at one of these locations:
-        - lua/foo/bar/health/init.lua
-        - lua/foo/bar/health.lua
-
-All such health modules must return a Lua table containing a `check()`
-function.
-
-Copy this sample code into `lua/foo/health.lua`, replacing "foo" in the path
-with your plugin name: >lua
-
-        local M = {}
-
-        M.check = function()
-          vim.health.start("foo report")
-          -- make sure setup function parameters are ok
-          if check_setup() then
-            vim.health.ok("Setup is correct")
-          else
-            vim.health.error("Setup is incorrect")
-          end
-          -- do some more checking
-          -- ...
-        end
-
-        return M
-
-
-vim:et:tw=78:ts=8:ft=help:fdm=marker
-- 
cgit 


From 5cbd6d9b9f232a6ff22ae3a9af80075404226e4b Mon Sep 17 00:00:00 2001
From: zeertzjq 
Date: Thu, 23 May 2024 06:08:24 +0800
Subject: vim-patch:9.1.0430: getregionpos() doesn't handle one char selection
 (#28924)

Problem:  getregionpos() doesn't handle one char selection.
Solution: Handle startspaces differently when is_oneChar is set.
          Also add a test for an exclusive charwise selection with
          multibyte chars (zeertzjq)

closes: vim/vim#14825

https://github.com/vim/vim/commit/52a6f348874778cf315b47d9e8b5f818f4b97277
---
 runtime/doc/builtin.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'runtime/doc')

diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index e0921cf477..2c1c6675c1 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -2985,8 +2985,8 @@ getregionpos({pos1}, {pos2} [, {opts}])                         *getregionpos()*
 		the offset in screen columns from the start of the character.
 		E.g., a position within a  or after the last character.
 		If the "off" number of an ending position is non-zero, it is
-		the character's number of cells included in the selection,
-		otherwise the whole character is included.
+		the offset of the character's first cell not included in the
+		selection, otherwise all its cells are included.
 
 getregtype([{regname}])                                           *getregtype()*
 		The result is a String, which is type of register {regname}.
-- 
cgit 


From 0a2218f965ac8cd7967d33b8c52e5b06fb284aac Mon Sep 17 00:00:00 2001
From: Evgeni Chasnovski 
Date: Thu, 23 May 2024 23:30:53 +0300
Subject: fix(comment): fall back to using trimmed comment markers (#28938)

Problem: Currently comment detection, addition, and removal are done
  by matching 'commentstring' exactly. This has the downside when users
  want to add comment markers with space (like with `-- %s`
  commentstring) but also be able to uncomment lines that do not contain
  space (like `--aaa`).

Solution: Use the following approach:
  - Line is commented if it matches 'commentstring' with trimmed parts.
  - Adding comment is 100% relying on 'commentstring' parts (as is now).
  - Removing comment is first trying exact 'commentstring' parts with
    fallback on trying its trimmed parts.
---
 runtime/doc/various.txt | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'runtime/doc')

diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index d41bdb5b00..662be4a7a2 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -579,6 +579,10 @@ Acting on multiple lines behaves as follows:
   transformed to empty comments (e.g. `/**/`). Comment markers are aligned to
   the least indented line.
 
+Matching 'commentstring' does not account for whitespace in comment markers.
+Removing comment markers is first attempted exactly, with fallback to using
+markers trimmed from whitespace.
+
 If the filetype of the buffer is associated with a language for which a
 |treesitter| parser is installed, then |vim.filetype.get_option()| is called
 to look up the value of 'commentstring' corresponding to the cursor position.
-- 
cgit 


From cd05fbef170b29083973fd11170d25225feb8bed Mon Sep 17 00:00:00 2001
From: zeertzjq 
Date: Fri, 24 May 2024 15:44:52 +0800
Subject: vim-patch:9.1.0441: getregionpos() can't properly indicate positions
 beyond eol (#28957)

Problem:  getregionpos() can't properly indicate positions beyond eol.
Solution: Add an "eol" flag that enables handling positions beyond end
          of line like getpos() does (zeertzjq).

Also fix the problem that a position still has the coladd beyond the end
of the line when its column has been clamped.  In the last test case
with TABs at the end of the line the old behavior is obviously wrong.

I decided to gate this behind a flag because returning positions that
don't correspond to actual characters in the line may lead to mistakes
for callers that want to calculate the length of the selected text, so
the behavior is only enabled if the caller wants it.

closes: vim/vim#14838

https://github.com/vim/vim/commit/2b09de910458247b70751928217422c38fd5abf8
---
 runtime/doc/builtin.txt | 13 +++++++++++++
 1 file changed, 13 insertions(+)

(limited to 'runtime/doc')

diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 2c1c6675c1..ff7d5f9ce8 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -2988,6 +2988,19 @@ getregionpos({pos1}, {pos2} [, {opts}])                         *getregionpos()*
 		the offset of the character's first cell not included in the
 		selection, otherwise all its cells are included.
 
+		Apart from the options supported by |getregion()|, {opts} also
+		supports the following:
+
+			eol		If |TRUE|, indicate positions beyond
+					the end of a line with "col" values
+					one more than the length of the line.
+					If |FALSE|, positions are limited
+					within their lines, and if a line is
+					empty or the selection is entirely
+					beyond the end of a line, a "col"
+					value of 0 is used for both positions.
+					(default: |FALSE|)
+
 getregtype([{regname}])                                           *getregtype()*
 		The result is a String, which is type of register {regname}.
 		The value will be one of:
-- 
cgit 


From 4f431bb632b5285fc0f0d5e6ac0ff21b7c6ef101 Mon Sep 17 00:00:00 2001
From: zeertzjq 
Date: Fri, 24 May 2024 15:45:07 +0800
Subject: vim-patch:9.1.0439: Cannot filter the history (#28958)

Problem:  Cannot filter the history
Solution: Implement :filter :history

closes: vim/vim#14835

https://github.com/vim/vim/commit/42a5b5a6d0d05255b9c464abe71f29c7677b5833

Co-authored-by: Christian Brabandt 
---
 runtime/doc/various.txt | 1 +
 1 file changed, 1 insertion(+)

(limited to 'runtime/doc')

diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index 662be4a7a2..0287271d4c 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -400,6 +400,7 @@ gx			Opens the current filepath or URL (decided by
 			   |:command|    - filter by command name
 			   |:files|      - filter by file name
 			   |:highlight|  - filter by highlight group
+			   |:history|    - filter by history commands
 			   |:jumps|      - filter by file name
 			   |:let|        - filter by variable name
 			   |:list|       - filter whole line
-- 
cgit 


From 6dc62c2e2b413a9bbaf0746660c5638936303249 Mon Sep 17 00:00:00 2001
From: dundargoc 
Date: Thu, 23 May 2024 11:40:51 +0200
Subject: docs: extract health to its own file

---
 runtime/doc/develop.txt      |   6 ++
 runtime/doc/editorconfig.txt |   2 +
 runtime/doc/health.txt       | 134 +++++++++++++++++++++++++++++++++++++++++++
 runtime/doc/help.txt         |   1 +
 runtime/doc/lua.txt          | 125 ----------------------------------------
 5 files changed, 143 insertions(+), 125 deletions(-)
 create mode 100644 runtime/doc/health.txt

(limited to 'runtime/doc')

diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt
index adbe4eeeff..d7837dc2fe 100644
--- a/runtime/doc/develop.txt
+++ b/runtime/doc/develop.txt
@@ -159,6 +159,12 @@ DOCUMENTATION                                           *dev-doc*
       not "the user host terminal".
     - Use "tui-" to prefix help tags related to the host terminal, and "TUI"
       in prose if possible.
+- Rough guidelines on where Lua documentation should end up:
+    - Nvim API functions `vim.api.nvim_*` should be in `api.txt`.
+    - If the module is big and not relevant to generic and lower-level Lua
+      functionality, then it's a strong candidate for separation. Example:
+      `treesitter.txt`
+    - Otherwise, add them to `lua.txt`
 
 Documentation format ~
 
diff --git a/runtime/doc/editorconfig.txt b/runtime/doc/editorconfig.txt
index aa4e150862..0b20c77801 100644
--- a/runtime/doc/editorconfig.txt
+++ b/runtime/doc/editorconfig.txt
@@ -3,6 +3,8 @@
 
                             NVIM REFERENCE MANUAL
 
+                                       Type |gO| to see the table of contents.
+
 ==============================================================================
 EditorConfig integration                                        *editorconfig*
 
diff --git a/runtime/doc/health.txt b/runtime/doc/health.txt
new file mode 100644
index 0000000000..e879f11351
--- /dev/null
+++ b/runtime/doc/health.txt
@@ -0,0 +1,134 @@
+*health.txt*               Nvim
+
+
+                 NVIM REFERENCE MANUAL
+
+
+                                       Type |gO| to see the table of contents.
+
+==============================================================================
+Checkhealth                                                           *health*
+
+
+health.vim is a minimal framework to help users troubleshoot configuration and
+any other environment conditions that a plugin might care about. Nvim ships
+with healthchecks for configuration, performance, python support, ruby
+support, clipboard support, and more.
+
+To run all healthchecks, use: >vim
+
+        :checkhealth
+<
+Plugin authors are encouraged to write new healthchecks. |health-dev|
+
+Commands                                                     *health-commands*
+
+                                                           *:che* *:checkhealth*
+:che[ckhealth]  Run all healthchecks.
+                                                                       *E5009*
+                Nvim depends on |$VIMRUNTIME|, 'runtimepath' and 'packpath' to
+                find the standard "runtime files" for syntax highlighting,
+                filetype-specific behavior, and standard plugins (including
+                :checkhealth).  If the runtime files cannot be found then
+                those features will not work.
+
+:che[ckhealth] {plugins}
+                Run healthcheck(s) for one or more plugins. E.g. to run only
+                the standard Nvim healthcheck: >vim
+                        :checkhealth vim.health
+<
+                To run the healthchecks for the "foo" and "bar" plugins
+                (assuming they are on 'runtimepath' and they have implemented
+                the Lua `require("foo.health").check()` interface): >vim
+                        :checkhealth foo bar
+<
+                To run healthchecks for Lua submodules, use dot notation or
+                "*" to refer to all submodules. For example Nvim provides
+                `vim.lsp` and `vim.treesitter`:  >vim
+                        :checkhealth vim.lsp vim.treesitter
+                        :checkhealth vim*
+<
+
+Create a healthcheck                                   *health-dev* *vim.health*
+
+Healthchecks are functions that check the user environment, configuration, or
+any other prerequisites that a plugin cares about. Nvim ships with
+healthchecks in:
+        - $VIMRUNTIME/autoload/health/
+        - $VIMRUNTIME/lua/vim/lsp/health.lua
+        - $VIMRUNTIME/lua/vim/treesitter/health.lua
+        - and more...
+
+To add a new healthcheck for your own plugin, simply create a "health.lua"
+module on 'runtimepath' that returns a table with a "check()" function. Then
+|:checkhealth| will automatically find and invoke the function.
+
+For example if your plugin is named "foo", define your healthcheck module at
+one of these locations (on 'runtimepath'):
+        - lua/foo/health/init.lua
+        - lua/foo/health.lua
+
+If your plugin also provides a submodule named "bar" for which you want
+a separate healthcheck, define the healthcheck at one of these locations:
+        - lua/foo/bar/health/init.lua
+        - lua/foo/bar/health.lua
+
+All such health modules must return a Lua table containing a `check()`
+function.
+
+Copy this sample code into `lua/foo/health.lua`, replacing "foo" in the path
+with your plugin name: >lua
+
+        local M = {}
+
+        M.check = function()
+          vim.health.start("foo report")
+          -- make sure setup function parameters are ok
+          if check_setup() then
+            vim.health.ok("Setup is correct")
+          else
+            vim.health.error("Setup is incorrect")
+          end
+          -- do some more checking
+          -- ...
+        end
+
+        return M
+
+
+error({msg}, {...})                                       *vim.health.error()*
+    Reports an error.
+
+    Parameters: ~
+      • {msg}  (`string`)
+      • {...}  (`string|string[]`) Optional advice
+
+info({msg})                                                *vim.health.info()*
+    Reports an informational message.
+
+    Parameters: ~
+      • {msg}  (`string`)
+
+ok({msg})                                                    *vim.health.ok()*
+    Reports a "success" message.
+
+    Parameters: ~
+      • {msg}  (`string`)
+
+start({name})                                             *vim.health.start()*
+    Starts a new report. Most plugins should call this only once, but if you
+    want different sections to appear in your report, call this once per
+    section.
+
+    Parameters: ~
+      • {name}  (`string`)
+
+warn({msg}, {...})                                         *vim.health.warn()*
+    Reports a warning.
+
+    Parameters: ~
+      • {msg}  (`string`)
+      • {...}  (`string|string[]`) Optional advice
+
+
+ vim:tw=78:ts=8:sw=4:sts=4:et:ft=help:norl:
diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt
index f2deac3cd8..43f80101ed 100644
--- a/runtime/doc/help.txt
+++ b/runtime/doc/help.txt
@@ -114,6 +114,7 @@ API (EXTENSIBILITY/SCRIPTING/PLUGINS)
 |vimscript-functions|	Vimscript functions
 |testing.txt|		Vimscript testing functions
 |remote-plugin|		Nvim remote plugins
+|health|		Health checking
 
 ------------------------------------------------------------------------------
 PROGRAMMING LANGUAGE SUPPORT
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 76a6bc0801..fccda177d2 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -4430,129 +4430,4 @@ tohtml.tohtml({winid}, {opt})                         *tohtml.tohtml.tohtml()*
         (`string[]`)
 
 
-==============================================================================
-Lua module: vim.health                                            *vim.health*
-
-
-health.vim is a minimal framework to help users troubleshoot configuration and
-any other environment conditions that a plugin might care about. Nvim ships
-with healthchecks for configuration, performance, python support, ruby
-support, clipboard support, and more.
-
-To run all healthchecks, use: >vim
-
-        :checkhealth
-<
-Plugin authors are encouraged to write new healthchecks. |health-dev|
-
-Commands                                                     *health-commands*
-
-                                                           *:che* *:checkhealth*
-:che[ckhealth]  Run all healthchecks.
-                                                                       *E5009*
-                Nvim depends on |$VIMRUNTIME|, 'runtimepath' and 'packpath' to
-                find the standard "runtime files" for syntax highlighting,
-                filetype-specific behavior, and standard plugins (including
-                :checkhealth).  If the runtime files cannot be found then
-                those features will not work.
-
-:che[ckhealth] {plugins}
-                Run healthcheck(s) for one or more plugins. E.g. to run only
-                the standard Nvim healthcheck: >vim
-                        :checkhealth vim.health
-<
-                To run the healthchecks for the "foo" and "bar" plugins
-                (assuming they are on 'runtimepath' and they have implemented
-                the Lua `require("foo.health").check()` interface): >vim
-                        :checkhealth foo bar
-<
-                To run healthchecks for Lua submodules, use dot notation or
-                "*" to refer to all submodules. For example Nvim provides
-                `vim.lsp` and `vim.treesitter`:  >vim
-                        :checkhealth vim.lsp vim.treesitter
-                        :checkhealth vim*
-<
-
-Create a healthcheck                                              *health-dev*
-
-Healthchecks are functions that check the user environment, configuration, or
-any other prerequisites that a plugin cares about. Nvim ships with
-healthchecks in:
-        - $VIMRUNTIME/autoload/health/
-        - $VIMRUNTIME/lua/vim/lsp/health.lua
-        - $VIMRUNTIME/lua/vim/treesitter/health.lua
-        - and more...
-
-To add a new healthcheck for your own plugin, simply create a "health.lua"
-module on 'runtimepath' that returns a table with a "check()" function. Then
-|:checkhealth| will automatically find and invoke the function.
-
-For example if your plugin is named "foo", define your healthcheck module at
-one of these locations (on 'runtimepath'):
-        - lua/foo/health/init.lua
-        - lua/foo/health.lua
-
-If your plugin also provides a submodule named "bar" for which you want
-a separate healthcheck, define the healthcheck at one of these locations:
-        - lua/foo/bar/health/init.lua
-        - lua/foo/bar/health.lua
-
-All such health modules must return a Lua table containing a `check()`
-function.
-
-Copy this sample code into `lua/foo/health.lua`, replacing "foo" in the path
-with your plugin name: >lua
-
-        local M = {}
-
-        M.check = function()
-          vim.health.start("foo report")
-          -- make sure setup function parameters are ok
-          if check_setup() then
-            vim.health.ok("Setup is correct")
-          else
-            vim.health.error("Setup is incorrect")
-          end
-          -- do some more checking
-          -- ...
-        end
-
-        return M
-
-
-vim.health.error({msg}, {...})                            *vim.health.error()*
-    Reports an error.
-
-    Parameters: ~
-      • {msg}  (`string`)
-      • {...}  (`string|string[]`) Optional advice
-
-vim.health.info({msg})                                     *vim.health.info()*
-    Reports an informational message.
-
-    Parameters: ~
-      • {msg}  (`string`)
-
-vim.health.ok({msg})                                         *vim.health.ok()*
-    Reports a "success" message.
-
-    Parameters: ~
-      • {msg}  (`string`)
-
-vim.health.start({name})                                  *vim.health.start()*
-    Starts a new report. Most plugins should call this only once, but if you
-    want different sections to appear in your report, call this once per
-    section.
-
-    Parameters: ~
-      • {name}  (`string`)
-
-vim.health.warn({msg}, {...})                              *vim.health.warn()*
-    Reports a warning.
-
-    Parameters: ~
-      • {msg}  (`string`)
-      • {...}  (`string|string[]`) Optional advice
-
-
  vim:tw=78:ts=8:sw=4:sts=4:et:ft=help:norl:
-- 
cgit 


From a616272f568a9492580abfd22ab460457ecdbfa3 Mon Sep 17 00:00:00 2001
From: Famiu Haque 
Date: Fri, 24 May 2024 15:57:46 +0600
Subject: feat(complete): specify reason for CompleteDone

Problem: `CompleteDone` currently does not specify the reason for why completion was done, which is problematic for completion plugins as they cannot know whether the event was triggered due to the completion being canceled, accepted, or for some other reason.

Solution: Add a `reason` key to `v:event`, which is set by `CompleteDone` to indicate why completion ended.
---
 runtime/doc/autocmd.txt | 10 ++++++++++
 runtime/doc/news.txt    |  3 +++
 runtime/doc/vvars.txt   |  1 +
 3 files changed, 14 insertions(+)

(limited to 'runtime/doc')

diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index bb84966228..ca816851dd 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -466,6 +466,16 @@ CompleteDone			After Insert mode completion is done.  Either
 				CompleteDonePre if you need it.
 				|v:completed_item| gives the completed item.
 
+				Sets these |v:event| keys:
+				    reason	Reason for completion being
+						done. Can be one of:
+						- "accept": completion was
+						  accepted using |complete_CTRL-Y|.
+						- "cancel": completion was cancelled
+						  using |complete_CTRL-E|, pressing
+						  a non-keyword character, or
+						  triggering a new completion.
+
 							*CursorHold*
 CursorHold			When the user doesn't press a key for the time
 				specified with 'updatetime'.  Not triggered
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index f8bc983441..03f6f7f8fd 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -130,6 +130,9 @@ UI
 • TODO
 
 
+• |CompleteDone| now sets the `reason` key in `v:event` which specifies the reason
+  for completion being done.
+
 ==============================================================================
 CHANGED FEATURES                                                 *news-changed*
 
diff --git a/runtime/doc/vvars.txt b/runtime/doc/vvars.txt
index de7f23a34d..15d836a83d 100644
--- a/runtime/doc/vvars.txt
+++ b/runtime/doc/vvars.txt
@@ -187,6 +187,7 @@ v:event
 		  changed_window   Is |v:true| if the event fired while
 		                   changing window  (or tab) on |DirChanged|.
 		  status           Job status or exit code, -1 means "unknown". |TermClose|
+		  reason           Reason for completion being done. |CompleteDone|
 
 				*v:exception* *exception-variable*
 v:exception
-- 
cgit 


From 206f8f24a2470f961cfe7e7c177443c0f199231c Mon Sep 17 00:00:00 2001
From: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Date: Fri, 24 May 2024 10:48:32 -0500
Subject: fix(fs): make vim.fs.root work for relative paths and unnamed buffers
 (#28964)

If a buffer does not have a backing file then fall back to the current
working directory.
---
 runtime/doc/lua.txt | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'runtime/doc')

diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index fccda177d2..3d8453c5a2 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -3012,7 +3012,10 @@ vim.fs.parents({start})                                     *vim.fs.parents()*
 
 vim.fs.root({source}, {marker})                                *vim.fs.root()*
     Find the first parent directory containing a specific "marker", relative
-    to a buffer's directory.
+    to a file path or buffer.
+
+    If the buffer is unnamed (has no backing file) or has a non-empty
+    'buftype' then the search begins from Nvim's |current-directory|.
 
     Example: >lua
         -- Find the root of a Python project, starting from file 'main.py'
@@ -3029,7 +3032,8 @@ vim.fs.root({source}, {marker})                                *vim.fs.root()*
 
     Parameters: ~
       • {source}  (`integer|string`) Buffer number (0 for current buffer) or
-                  file path to begin the search from.
+                  file path (absolute or relative to the |current-directory|)
+                  to begin the search from.
       • {marker}  (`string|string[]|fun(name: string, path: string): boolean`)
                   A marker, or list of markers, to search for. If a function,
                   the function is called for each evaluated item and should
-- 
cgit 


From 2c6b6358722b2df9160c3739b0cea07e8779513f Mon Sep 17 00:00:00 2001
From: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Date: Fri, 24 May 2024 11:33:49 -0500
Subject: feat(defaults): add LSP default mappings (again) (#28650)

---
 runtime/doc/change.txt   |  7 +++++++
 runtime/doc/lsp.txt      | 13 ++++++++++---
 runtime/doc/news.txt     |  6 +++++-
 runtime/doc/vim_diff.txt |  5 +++++
 4 files changed, 27 insertions(+), 4 deletions(-)

(limited to 'runtime/doc')

diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index 09db651614..9ff16165d7 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -281,6 +281,13 @@ gr{char}		Replace the virtual characters under the cursor with
 			that have a special meaning in Insert mode, such as
 			most CTRL-keys, cannot be used.
 
+							*gr-default*
+			Nvim creates default mappings with "gr" as a prefix,
+			which may inhibit the behavior of |gr|. Use the
+			following to restore the builtin behavior: >
+				nnoremap  gr gr
+<
+
 						*digraph-arg*
 The argument for Normal mode commands like |r| and |t| is a single character.
 When 'cpo' doesn't contain the 'D' flag, this character can also be entered
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index 5729531b30..ba5dd5fbef 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -61,6 +61,16 @@ options are not restored when the LSP client is stopped or detached.
 - |K| is mapped to |vim.lsp.buf.hover()| unless |'keywordprg'| is customized or
   a custom keymap for `K` exists.
 
+                                                *grr* *gra* *grn* *i_CTRL-S*
+Some keymaps are created unconditionally when Nvim starts:
+- "grn" is mapped in Normal mode to |vim.lsp.buf.rename()|
+- "gra" is mapped in Normal and Visual mode to |vim.lsp.buf.code_action()|
+- "grr" is mapped in Normal mode to |vim.lsp.buf.references()|
+- CTRL-S is mapped in Insert mode to |vim.lsp.buf.signature_help()|
+
+If not wanted, these keymaps can be removed at any time using
+|vim.keymap.del()| or |:unmap| (see also |gr-default|).
+
                                                         *lsp-defaults-disable*
 To override the above defaults, set or unset the options on |LspAttach|: >lua
 
@@ -80,9 +90,6 @@ Example: >lua
     vim.api.nvim_create_autocmd('LspAttach', {
       callback = function(args)
         local client = vim.lsp.get_client_by_id(args.data.client_id)
-        if client.supports_method('textDocument/rename') then
-          -- Create a keymap for vim.lsp.buf.rename()
-        end
         if client.supports_method('textDocument/implementation') then
           -- Create a keymap for vim.lsp.buf.implementation
         end
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 03f6f7f8fd..708e127136 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -79,7 +79,11 @@ API
 
 DEFAULTS
 
-• TODO
+• Keymaps:
+  - |grn| in Normal mode maps to |vim.lsp.buf.rename()|
+  - |grr| in Normal mode maps to |vim.lsp.buf.references()|
+  - |gra| in Normal and Visual mode maps to |vim.lsp.buf.code_action()|
+  - CTRL-S in Insert mode maps to |vim.lsp.buf.signature_help()|
 
 EDITOR
 
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 15134531e1..5d894bb5e1 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -138,6 +138,11 @@ of these in your config by simply removing the mapping, e.g. ":unmap Y".
 - * |v_star-default|
 - gc |gc-default| |v_gc-default| |o_gc-default|
 - gcc |gcc-default|
+- gr prefix |gr-default|
+  - |grn|
+  - |grr|
+  - |gra|
+-  |i_CTRL-S|
 - ]d |]d-default|
 - [d |[d-default|
 - d |CTRL-W_d-default|
-- 
cgit 


From 28c04948a1c887a1cc0cb64de79fa32631700466 Mon Sep 17 00:00:00 2001
From: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Date: Fri, 24 May 2024 13:35:39 -0500
Subject: docs: update LSP quickstart (#28954)

The LSP quickstart can act as our true "entrypoint" for answering the
question "How do I use LSP in Neovim?" As such, it can be a little more
beginniner-friendly than other sections of our help docs by including
explanatory comments and a more fleshed out example (including a
`FileType` autocommand).

This also includes some other minor wording updates and points users
toward `:checkhealth lsp`.
---
 runtime/doc/lsp.txt | 46 +++++++++++++++++++++++++++++-----------------
 1 file changed, 29 insertions(+), 17 deletions(-)

(limited to 'runtime/doc')

diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index ba5dd5fbef..50fffca497 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -12,7 +12,7 @@ enhanced LSP tools.
 
     https://microsoft.github.io/language-server-protocol/
 
-LSP facilitates features like go-to-definition, find-references, hover,
+LSP facilitates features like go-to-definition, find references, hover,
 completion, rename, format, refactor, etc., using semantic whole-project
 analysis (unlike |ctags|).
 
@@ -25,26 +25,36 @@ Nvim provides an LSP client, but the servers are provided by third parties.
 Follow these steps to get LSP features:
 
 1. Install language servers using your package manager or by following the
-   upstream installation instruction. You can find language servers here:
+   upstream installation instructions. You can find language servers here:
    https://microsoft.github.io/language-server-protocol/implementors/servers/
 
-2. Configure the LSP client per language server. See |vim.lsp.start()| or use
-   this minimal example as a guide: >lua
-
-    vim.lsp.start({
-      name = 'my-server-name',
-      cmd = {'name-of-language-server-executable'},
-      root_dir = vim.fs.root(0, {'setup.py', 'pyproject.toml'}),
+2. Use |vim.lsp.start()| to start the LSP server (or attach to an existing
+   one) when a file is opened. Example: >lua
+    -- Create an event handler for the FileType autocommand
+    vim.api.nvim_create_autocmd('FileType', {
+      -- This handler will fire when the buffer's 'filetype' is "python"
+      pattern = 'python',
+      callback = function(ev)
+        vim.lsp.start({
+          name = 'my-server-name',
+          cmd = {'name-of-language-server-executable', '--option', 'arg1', 'arg2'},
+
+          -- Set the "root directory" to the parent directory of the file in the
+          -- current buffer (`ev.buf`) that contains either a "setup.py" or a
+          -- "pyproject.toml" file. Files that share a root directory will reuse
+          -- the connection to the same LSP server.
+          root_dir = vim.fs.root(ev.buf, {'setup.py', 'pyproject.toml'}),
+        })
+      end,
     })
 <
-3. Check that the server attached to the buffer: >
-    :lua =vim.lsp.get_clients()
+3. Check that the buffer is attached to the server: >vim
+    :checkhealth lsp
 
-4. Configure keymaps and autocmds to use LSP features. See |lsp-config|.
+4. (Optional) Configure keymaps and autocommands to use LSP features. |lsp-config|
 
-                                                        *lsp-config*
                                                         *lsp-defaults*
-When the LSP client starts it enables diagnostics |vim.diagnostic| (see
+When the Nvim LSP client starts it enables diagnostics |vim.diagnostic| (see
 |vim.diagnostic.config()| to customize). It also sets various default options,
 listed below, if (1) the language server supports the functionality and (2)
 the options are empty or were set by the builtin runtime (ftplugin) files. The
@@ -57,7 +67,7 @@ options are not restored when the LSP client is stopped or detached.
   |CTRL-W_}| to utilize the language server.
 - 'formatexpr' is set to |vim.lsp.formatexpr()|, so you can format lines via
   |gq| if the language server supports it.
-  - To opt out of this use |gw| instead of gq, or set 'formatexpr' on LspAttach.
+  - To opt out of this use |gw| instead of gq, or clear 'formatexpr' on |LspAttach|.
 - |K| is mapped to |vim.lsp.buf.hover()| unless |'keywordprg'| is customized or
   a custom keymap for `K` exists.
 
@@ -72,7 +82,8 @@ If not wanted, these keymaps can be removed at any time using
 |vim.keymap.del()| or |:unmap| (see also |gr-default|).
 
                                                         *lsp-defaults-disable*
-To override the above defaults, set or unset the options on |LspAttach|: >lua
+To override or delete any of the above defaults, set or unset the options on
+|LspAttach|: >lua
 
     vim.api.nvim_create_autocmd('LspAttach', {
       callback = function(ev)
@@ -81,7 +92,8 @@ To override the above defaults, set or unset the options on |LspAttach|: >lua
         vim.keymap.del('n', 'K', { buffer = ev.buf })
       end,
     })
-
+<
+                                                        *lsp-config*
 To use other LSP features, set keymaps on |LspAttach|. Not all language
 servers provide the same capabilities. To ensure you only set keymaps if the
 language server supports a feature, guard keymaps behind capability checks.
-- 
cgit