From 06347a64cac5e33574713a59ace9d1d0ea4b6f82 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 25 May 2024 05:19:46 +0800 Subject: vim-patch:9.1.0443: Can't use blockwise selection with width for getregion() (#28985) Problem: Can't use a blockwise selection with a width for getregion(). Solution: Add support for blockwise selection with width like the return value of getregtype() or the "regtype" value of TextYankPost (zeertzjq). closes: vim/vim#14842 https://github.com/vim/vim/commit/afc2295c2201ae87bfbb42d5f5315ad0583ccabf --- runtime/doc/builtin.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index ff7d5f9ce8..5b1dd2ca47 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -2930,14 +2930,13 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()* The optional argument {opts} is a Dict and supports the following items: - type Specify the region's selection type - (default: "v"): - "v" for |charwise| mode - "V" for |linewise| mode - "" for |blockwise-visual| mode + type Specify the region's selection type. + See |getregtype()| for possible values, + except it cannot be an empty string. + (default: "v") exclusive If |TRUE|, use exclusive selection - for the end position + for the end position. (default: follow 'selection') You can get the last selection type by |visualmode()|. -- cgit From 8b2b1fba2abfb99186e3a1f0123251a3e2eae3fe Mon Sep 17 00:00:00 2001 From: glepnir Date: Fri, 3 May 2024 15:53:13 +0800 Subject: fix(float): missing default highlight for title Problem: there is missing default title highlight when highlight not defined in title text chunk. Solution: when attr is not set use default title highlight group. --- runtime/doc/api.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 86f4c3875c..2ca34150f3 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -3270,13 +3270,15 @@ nvim_open_win({buffer}, {enter}, {config}) *nvim_open_win()* < • title: Title (optional) in window border, string or list. List should consist of `[text, highlight]` tuples. If - string, the default highlight group is `FloatTitle`. + string, or a tuple lacks a highlight, the default + highlight group is `FloatTitle`. • title_pos: Title position. Must be set with `title` option. Value can be one of "left", "center", or "right". Default is `"left"`. • footer: Footer (optional) in window border, string or list. List should consist of `[text, highlight]` tuples. - If string, the default highlight group is `FloatFooter`. + If string, or a tuple lacks a highlight, the default + highlight group is `FloatFooter`. • footer_pos: Footer position. Must be set with `footer` option. Value can be one of "left", "center", or "right". Default is `"left"`. -- cgit From b43244adafa0f4d86409d1101754d5e23782c158 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Fri, 24 May 2024 19:09:31 +0200 Subject: vim-patch:5e45715: runtime(typescript): update outdated syntax files fixes: vim/vim#14721 fixes: HerringtonDarkholme/yats.vim#277 closes: vim/vim#14840 https://github.com/vim/vim/commit/5e4571508480c8f51748e49fb05c1891db0cb803 Co-authored-by: rhysd --- runtime/doc/syntax.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 7893822a66..06d7ad8f7e 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -3289,6 +3289,19 @@ set "tf_minlines" to the value you desire. Example: > :let tf_minlines = your choice < +TYPESCRIPT *typescript.vim* *ft-typescript-syntax* + *typescriptreact.vim* *ft-typescriptreact-syntax* + +There is one option to control the TypeScript syntax highlighting. + + *g:typescript_host_keyword* +When this variable is set to 1, host-specific APIs such as `addEventListener` +are highlighted. To disable set it to zero in your .vimrc: > + + let g:typescript_host_keyword = 0 +< +The default value is 1. + VIM *vim.vim* *ft-vim-syntax* *g:vimsyn_minlines* *g:vimsyn_maxlines* There is a trade-off between more accurate syntax highlighting versus screen -- cgit From 4757d497f3c85cc343f7dcbc09f95e43ba5c1314 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 25 May 2024 16:53:10 +0800 Subject: vim-patch:9.1.0444: Not enough tests for getregion() with multibyte chars (#29000) Problem: Not enough tests for getregion() with multibyte chars. Solution: Add a few more tests (zeertzjq). closes: vim/vim#14844 https://github.com/vim/vim/commit/dff55a335889c746a79974f7c52cdcdebad682c2 --- runtime/doc/builtin.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 5b1dd2ca47..1a762c6ec0 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -2932,7 +2932,8 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()* type Specify the region's selection type. See |getregtype()| for possible values, - except it cannot be an empty string. + except that the width can be omitted + and an empty string cannot be used. (default: "v") exclusive If |TRUE|, use exclusive selection -- cgit From bdb81afab3e5c43a33267666c2689feb284f6b52 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 25 May 2024 20:37:33 +0800 Subject: refactor(lua): rewrite vim.highlight.range() (#28986) - Use getregionpos(). - Use a single extmark for non-blockwise selection. --- 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 3d8453c5a2..64a3014388 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -646,8 +646,8 @@ vim.highlight.range({bufnr}, {ns}, {higroup}, {start}, {finish}, {opts}) • {finish} (`integer[]|string`) End of region as a (line, column) tuple or string accepted by |getpos()| • {opts} (`table?`) A table with the following fields: - • {regtype}? (`string`, default: `'charwise'`) Type of - range. See |setreg()| + • {regtype}? (`string`, default: `'v'` i.e. charwise) Type + of range. See |getregtype()| • {inclusive}? (`boolean`, default: `false`) Indicates whether the range is end-inclusive • {priority}? (`integer`, default: -- cgit From fdeb01cd77404aba446c67af32134a2ff793a14b Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Sat, 25 May 2024 12:44:39 +0000 Subject: feat(main): expand file ~\ or ~/ prefix on Windows (#28515) In command_line_scan() for MSWIN, expand "~\" or "~/" prefixed paths to the USERPROFILE environment variable for the user's profile directory. Fix #23901 Signed-off-by: Rafael Kitover --- runtime/doc/news.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 708e127136..2d4017e3c4 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -87,7 +87,9 @@ DEFAULTS EDITOR -• TODO +* On Windows, filename arguments on the command-line prefixed with "~\" or + "~/" are now expanded to the user's profile directory, not a relative path + to a literal "~" directory. EVENTS -- cgit From f03b1622ad1b8e2df16504631f05e7577e217854 Mon Sep 17 00:00:00 2001 From: Mathias Fußenegger Date: Sat, 25 May 2024 21:22:41 +0200 Subject: fix(lsp): handle nil root_dir in health check (#29007) The root directory could show up as something like: Root directory: ~/path/to/cwd/v:null Despite being `nil` --- 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 50fffca497..a66b577b11 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -996,7 +996,7 @@ Lua module: vim.lsp.client *lsp-client* if the client supports workspace folders. It can be `null` if the client supports workspace folders but none are configured. - • {root_dir} (`string`) + • {root_dir} (`string?`) • {attached_buffers} (`table`) • {commands} (`table`) Table of command name to function which is -- cgit From 3d39ea3ea9b6e66640e59731d155d731218e7e62 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 26 May 2024 07:11:50 +0800 Subject: vim-patch:9.1.0442: hare runtime files outdated (#29011) Problem: hare runtime files outdated Solution: runtime(hare): update hare.vim to match upstream (Amelia Clarke) closes: vim/vim#14836 https://github.com/vim/vim/commit/35dfe58a540e2fb0eff953630f8e4fcbf4bc26ca Co-authored-by: Amelia Clarke --- runtime/doc/filetype.txt | 6 ++++ runtime/doc/ft_hare.txt | 77 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 runtime/doc/ft_hare.txt (limited to 'runtime/doc') diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 5eae78744c..eddf14014a 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -602,6 +602,12 @@ The mapping can be disabled with: > let g:no_gprof_maps = 1 +HARE *ft-hare* + +Since the text for this plugin is rather long it has been put in a separate +file: |ft_hare.txt|. + + JAVA *ft-java-plugin* Whenever the variable "g:ftplugin_java_source_path" is defined and its value diff --git a/runtime/doc/ft_hare.txt b/runtime/doc/ft_hare.txt new file mode 100644 index 0000000000..937c5e0961 --- /dev/null +++ b/runtime/doc/ft_hare.txt @@ -0,0 +1,77 @@ +*ft_hare.txt* Support for the Hare programming language + +============================================================================== +CONTENTS *hare* + +1. Introduction |hare-intro| +2. Filetype plugin |hare-plugin| +3. Settings |hare-settings| + +============================================================================== +INTRODUCTION *hare-intro* + +This plugin provides syntax highlighting, indentation, and other functionality +for the Hare programming language. Support is also provided for README files +inside Hare modules, but this must be enabled by setting |g:filetype_haredoc|. + +============================================================================== +FILETYPE PLUGIN *hare-plugin* + +This plugin automatically sets the value of 'path' to include the contents of +the HAREPATH environment variable, allowing commands such as |gf| to directly +open standard library or third-party modules. If HAREPATH is not set, it +defaults to the recommended paths for most Unix-like filesystems, namely +/usr/src/hare/stdlib and /usr/src/hare/third-party. + +============================================================================== +SETTINGS *hare-settings* + +This plugin provides a small number of variables that you can define in your +vimrc to configure its behavior. + + *g:filetype_haredoc* +This plugin is able to automatically detect Hare modules and set the "haredoc" +filetype for any README files. As the recursive directory search used as a +heuristic has a minor performance impact, this feature is disabled by default +and must be specifically opted into: > + let g:filetype_haredoc = 1 +< +See |g:haredoc_search_depth| for ways to tweak the searching behavior. + + *g:hare_recommended_style* +The following options are set by default, in accordance with the official Hare +style guide: > + setlocal noexpandtab + setlocal shiftwidth=0 + setlocal softtabstop=0 + setlocal tabstop=8 + setlocal textwidth=80 +< +To disable this behavior: > + let g:hare_recommended_style = 0 +< + *g:hare_space_error* +By default, trailing whitespace and tabs preceded by space characters are +highlighted as errors. This is automatically turned off when in insert mode. +To disable this highlighting completely: > + let g:hare_space_error = 0 +< + *g:haredoc_search_depth* +By default, when |g:filetype_haredoc| is enabled, only the current directory +and its immediate subdirectories are searched for Hare files. The maximum +search depth may be adjusted with: > + let g:haredoc_search_depth = 2 +< + Value Effect~ + 0 Only search the current directory. + 1 Search the current directory and immediate + subdirectories. + 2 Search the current directory and two levels of + subdirectories. + +The maximum search depth can be set to any integer, but using values higher +than 2 is not recommended, and will likely provide no tangible benefit in most +situations. + +============================================================================== + vim:tw=78:ts=8:noet:ft=help:norl: -- cgit From 48251134ee59a3e2f0aeb89608fa820c21b25d4f Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Mon, 27 May 2024 08:08:23 -0500 Subject: perf: add fast path to vim.validate (#28977) For many small/simple functions (like those found in shared.lua), the runtime of vim.validate can far exceed the runtime of the function itself. Add an "overload" to vim.validate that uses a simple assertion pattern, rather than parsing a full "validation spec". --- runtime/doc/lua.txt | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 64a3014388..fd0cd3252f 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2366,7 +2366,26 @@ 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). Specs are + Validate function arguments. + + This function has two valid forms: + 1. vim.validate(name: str, value: any, type: string, optional?: bool) + 2. vim.validate(spec: table) + + Form 1 validates that argument {name} with value {value} has the type + {type}. {type} must be a value returned by |lua-type()|. If {optional} is + true, then {value} may be null. This form is significantly faster and + should be preferred for simple cases. + + Example: >lua + function vim.startswith(s, prefix) + vim.validate('s', s, 'string') + vim.validate('prefix', prefix, 'string') + ... + end +< + + Form 2 validates a parameter specification (types and values). Specs are evaluated in alphanumeric order, until the first failure. Usage example: >lua -- cgit From ff097f2091e7a970e5b12960683b4dade5563040 Mon Sep 17 00:00:00 2001 From: Maria José Solano Date: Sun, 4 Feb 2024 14:13:23 -0800 Subject: feat(lsp): completion side effects --- runtime/doc/lsp.txt | 26 ++++++++++++++++++++++++++ runtime/doc/news.txt | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 50fffca497..0e165e6f54 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1604,6 +1604,32 @@ save({lenses}, {bufnr}, {client_id}) *vim.lsp.codelens.save()* • {client_id} (`integer`) +============================================================================== +Lua module: vim.lsp.completion *lsp-completion* + +*vim.lsp.completion.BufferOpts* + + Fields: ~ + • {autotrigger}? (`boolean`) Whether to trigger completion + automatically. Default: false + + + *vim.lsp.completion.enable()* +enable({enable}, {client_id}, {bufnr}, {opts}) + Enables or disables completions from the given language client in the + given buffer. + + Parameters: ~ + • {enable} (`boolean`) True to enable, false to disable + • {client_id} (`integer`) Client ID + • {bufnr} (`integer`) Buffer handle, or 0 for the current buffer + • {opts} (`vim.lsp.completion.BufferOpts?`) See + |vim.lsp.completion.BufferOpts|. + +trigger() *vim.lsp.completion.trigger()* + Trigger LSP completion in the current buffer. + + ============================================================================== Lua module: vim.lsp.inlay_hint *lsp-inlay_hint* diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 708e127136..439316f62e 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -95,7 +95,8 @@ EVENTS LSP -• TODO +• Completion side effects (including snippet expansion, execution of commands + and application of additional text edits) is now built-in. LUA -- cgit From 90a4b1a59cf0c204cb39ec7789ab8783626e449d Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 28 May 2024 03:07:13 -0700 Subject: refactor: deprecate vim.region() #28416 Problem: `vim.region()` is redundant with `getregionpos()`. Solution: Deprecate `vim.region()`. --- runtime/doc/deprecated.txt | 2 ++ runtime/doc/lua.txt | 24 ------------------------ runtime/doc/news-0.10.txt | 2 +- 3 files changed, 3 insertions(+), 25 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index 646ba72bd8..be220fc307 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -19,6 +19,8 @@ API - nvim_subscribe() Plugins must maintain their own "multicast" channels list. - nvim_unsubscribe() Plugins must maintain their own "multicast" channels list. +LUA +- vim.region() Use |getregionpos()| instead. ------------------------------------------------------------------------------ DEPRECATED IN 0.10 *deprecated-0.10* diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index fd0cd3252f..36d6e0d41e 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -1708,30 +1708,6 @@ vim.print({...}) *vim.print()* • |vim.inspect()| • |:=| - *vim.region()* -vim.region({bufnr}, {pos1}, {pos2}, {regtype}, {inclusive}) - Gets a dict of line segment ("chunk") positions for the region from `pos1` - to `pos2`. - - Input and output positions are byte positions, (0,0)-indexed. "End of - line" column position (for example, |linewise| visual selection) is - returned as |v:maxcol| (big number). - - Parameters: ~ - • {bufnr} (`integer`) Buffer number, or 0 for current buffer - • {pos1} (`integer[]|string`) Start of region as a (line, column) - tuple or |getpos()|-compatible string - • {pos2} (`integer[]|string`) End of region as a (line, column) - tuple or |getpos()|-compatible string - • {regtype} (`string`) |setreg()|-style selection type - • {inclusive} (`boolean`) Controls whether the ending column is - inclusive (see also 'selection'). - - Return: ~ - (`table`) region Dict of the form `{linenr = {startcol,endcol}}`. - `endcol` is exclusive, and whole lines are returned as - `{startcol,endcol} = {0,-1}`. - vim.schedule_wrap({fn}) *vim.schedule_wrap()* Returns a function which calls {fn} via |vim.schedule()|. diff --git a/runtime/doc/news-0.10.txt b/runtime/doc/news-0.10.txt index 8a0e7e92e7..d611eee242 100644 --- a/runtime/doc/news-0.10.txt +++ b/runtime/doc/news-0.10.txt @@ -307,7 +307,7 @@ The following new features were added. 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. + • vim.region() can use a string accepted by |getpos()| as position. • Options: • 'winfixbuf' keeps a window focused onto a specific buffer -- cgit From 8ba73f0e4cc6c82032a348a1d6c8d794ed150fd7 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Tue, 28 May 2024 08:51:44 -0500 Subject: feat(diagnostic): add vim.diagnostic.jump() (#26745) Deprecate vim.diagnostic.goto_prev() and vim.diagnostic.goto_next() in favor of a unified vim.diagnostic.jump() interface. We cannot name the function "goto()" because some of our tooling (luacheck and stylua) fail to parse it, presumably because "goto" is a keyword in newer versions of Lua. vim.diagnostic.jump() also allows moving to a specific diagnostic and moving by multiple diagnostics at a time (useful for creating mappings that use v:count). --- runtime/doc/deprecated.txt | 17 +++++++-- runtime/doc/diagnostic.txt | 91 ++++++++++++++++++++-------------------------- 2 files changed, 53 insertions(+), 55 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index be220fc307..6c6585d76e 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -22,6 +22,20 @@ API LUA - vim.region() Use |getregionpos()| instead. +DIAGNOSTICS +- *vim.diagnostic.goto_next()* Use |vim.diagnostic.jump()| with `{count = 1}` instead. +- *vim.diagnostic.goto_prev()* Use |vim.diagnostic.jump()| with `{count = -1}` instead. +- *vim.diagnostic.get_next_pos()* + Use the "lnum" and "col" fields from the return value of + |vim.diagnostic.get_next()| instead. +- *vim.diagnostic.get_prev_pos()* + Use the "lnum" and "col" fields from the return value of + |vim.diagnostic.get_prev()| instead. +- The "win_id" parameter used by various functions is deprecated in favor of + "winid" |winid| +- The "cursor_position" parameter of |vim.diagnostic.JumpOpts| is renamed to + "pos" + ------------------------------------------------------------------------------ DEPRECATED IN 0.10 *deprecated-0.10* @@ -204,9 +218,6 @@ internally and are no longer exposed as part of the API. Instead, use - *vim.lsp.diagnostic.set_underline()* - *vim.lsp.diagnostic.set_virtual_text()* -Configuring |diagnostic-signs| with |:sign-define| or |sign_define()| is no -longer supported. Use the "signs" key of |vim.diagnostic.config()| instead. - LSP FUNCTIONS - *vim.lsp.buf.server_ready()* Use |LspAttach| instead, depending on your use-case. "Server ready" is not diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index 36616b9a0d..be9e54d6cd 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -378,28 +378,37 @@ Lua module: vim.diagnostic *diagnostic-api* • {severity}? (`vim.diagnostic.SeverityFilter`) See |diagnostic-severity|. -*vim.diagnostic.GotoOpts* +*vim.diagnostic.JumpOpts* Extends: |vim.diagnostic.GetOpts| Configuration table with the following keys: Fields: ~ - • {cursor_position}? (`{[1]:integer,[2]:integer}`, default: current cursor position) - Cursor position as a `(row, col)` tuple. See - |nvim_win_get_cursor()|. - • {wrap}? (`boolean`, default: `true`) Whether to loop - around file or not. Similar to 'wrapscan'. - • {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 - table, pass the table as the {opts} parameter to - |vim.diagnostic.open_float()|. Unless overridden, - the float will show diagnostics at the new cursor - position (as if "cursor" were passed to the - "scope" option). - • {win_id}? (`integer`, default: `0`) Window ID + • {diagnostic}? (`vim.Diagnostic`) The diagnostic to jump to. Mutually + exclusive with {count}, {namespace}, and {severity}. + See |vim.Diagnostic|. + • {count}? (`integer`) The number of diagnostics to move by, + starting from {pos}. A positive integer moves forward + by {count} diagnostics, while a negative integer moves + backward by {count} diagnostics. Mutually exclusive + with {diagnostic}. + • {pos}? (`{[1]:integer,[2]:integer}`) Cursor position as a + `(row, col)` tuple. See |nvim_win_get_cursor()|. Used + to find the nearest diagnostic when {count} is used. + Only used when {count} is non-nil. Default is the + current cursor position. + • {wrap}? (`boolean`, default: `true`) Whether to loop around + file or not. Similar to 'wrapscan'. + • {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 table, pass the table as the {opts} + parameter to |vim.diagnostic.open_float()|. Unless + overridden, the float will show diagnostics at the new + cursor position (as if "cursor" were passed to the + "scope" option). + • {winid}? (`integer`, default: `0`) Window ID *vim.diagnostic.NS* @@ -678,52 +687,20 @@ get_next({opts}) *vim.diagnostic.get_next()* Get the next diagnostic closest to the cursor position. Parameters: ~ - • {opts} (`vim.diagnostic.GotoOpts?`) See |vim.diagnostic.GotoOpts|. + • {opts} (`vim.diagnostic.JumpOpts?`) See |vim.diagnostic.JumpOpts|. Return: ~ (`vim.Diagnostic?`) Next diagnostic. See |vim.Diagnostic|. -get_next_pos({opts}) *vim.diagnostic.get_next_pos()* - Return the position of the next diagnostic in the current buffer. - - Parameters: ~ - • {opts} (`vim.diagnostic.GotoOpts?`) See |vim.diagnostic.GotoOpts|. - - Return: ~ - (`table|false`) Next diagnostic position as a `(row, col)` tuple or - false if no next diagnostic. - get_prev({opts}) *vim.diagnostic.get_prev()* Get the previous diagnostic closest to the cursor position. Parameters: ~ - • {opts} (`vim.diagnostic.GotoOpts?`) See |vim.diagnostic.GotoOpts|. + • {opts} (`vim.diagnostic.JumpOpts?`) See |vim.diagnostic.JumpOpts|. Return: ~ (`vim.Diagnostic?`) Previous diagnostic. See |vim.Diagnostic|. -get_prev_pos({opts}) *vim.diagnostic.get_prev_pos()* - Return the position of the previous diagnostic in the current buffer. - - Parameters: ~ - • {opts} (`vim.diagnostic.GotoOpts?`) See |vim.diagnostic.GotoOpts|. - - Return: ~ - (`table|false`) Previous diagnostic position as a `(row, col)` tuple - or `false` if there is no prior diagnostic. - -goto_next({opts}) *vim.diagnostic.goto_next()* - Move to the next diagnostic. - - Parameters: ~ - • {opts} (`vim.diagnostic.GotoOpts?`) See |vim.diagnostic.GotoOpts|. - -goto_prev({opts}) *vim.diagnostic.goto_prev()* - Move to the previous diagnostic in the current buffer. - - Parameters: ~ - • {opts} (`vim.diagnostic.GotoOpts?`) See |vim.diagnostic.GotoOpts|. - hide({namespace}, {bufnr}) *vim.diagnostic.hide()* Hide currently displayed diagnostics. @@ -753,6 +730,16 @@ is_enabled({filter}) *vim.diagnostic.is_enabled()* Return: ~ (`boolean`) +jump({opts}) *vim.diagnostic.jump()* + Move to a diagnostic. + + Parameters: ~ + • {opts} (`vim.diagnostic.JumpOpts`) See |vim.diagnostic.JumpOpts|. + + Return: ~ + (`vim.Diagnostic?`) The diagnostic that was moved to. See + |vim.Diagnostic|. + *vim.diagnostic.match()* match({str}, {pat}, {groups}, {severity_map}, {defaults}) Parse a diagnostic from a string. @@ -792,7 +779,7 @@ open_float({opts}) *vim.diagnostic.open_float()* Return (multiple): ~ (`integer?`) float_bufnr - (`integer?`) win_id + (`integer?`) winid reset({namespace}, {bufnr}) *vim.diagnostic.reset()* Remove all diagnostics from the given namespace. -- cgit From e6cfcaed184d4ecdc8a8638429e1bd9e1b3251dc Mon Sep 17 00:00:00 2001 From: Maria José Solano Date: Sat, 25 May 2024 10:23:05 -0700 Subject: feat(snippet): add default keymaps during snippet session --- runtime/doc/news.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 439316f62e..f1b402c92e 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -85,6 +85,12 @@ DEFAULTS - |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()| +• Snippet: + - `` in Insert and Select mode maps to |vim.snippet.jump({ direction = 1 })| + when a snippet is active and jumpable forwards. + - `` in Insert and Select mode maps to |vim.snippet.jump({ direction = -1 })| + when a snippet is active and jumpable backwards. + EDITOR • TODO -- cgit From 1c6d9200521acb2329be55ab8bec3056deade66a Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Tue, 28 May 2024 13:24:16 -0500 Subject: feat(defaults): use vim.diagnostic.jump() for default mappings (#29066) This allows the mappings to work with a count and also enables new ]D and [D mappings to go to the last/first diagnostic in the buffer. --- runtime/doc/news.txt | 7 +++++-- runtime/doc/tagsrch.txt | 16 ++++++++++++---- runtime/doc/vim_diff.txt | 2 ++ 3 files changed, 19 insertions(+), 6 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index b5ba2921e6..ceb638a459 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -34,11 +34,14 @@ API DEFAULTS -• TODO +• |]d-default| and |[d-default| accept a count. +• |[D-default| and |]D-default| jump to the first and last diagnostic in the + current buffer, respectively. EDITOR -• The order in which signs are placed was changed. Higher priority signs will now appear left of lower priority signs. +• 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/tagsrch.txt b/runtime/doc/tagsrch.txt index ef1654d365..8b2813785f 100644 --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -781,15 +781,15 @@ CTRL-W i Open a new window, with the cursor on the first line count'th matching line is displayed. *[d-default* - Mapped to |vim.diagnostic.goto_prev()| by default. - |default-mappings| + Jumps to the previous diagnostic in the current buffer + by default. |vim.diagnostic.jump()| |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| + Jumps to the next diagnostic in the current buffer by + default. |vim.diagnostic.jump()| |default-mappings| *:ds* *:dsearch* :[range]ds[earch][!] [count] [/]string[/] @@ -803,9 +803,17 @@ CTRL-W i Open a new window, with the cursor on the first line displayed for the found lines. The search starts from the beginning of the file. + *[D-default* + Jumps to the first diagnostic in the current buffer by + default. |vim.diagnostic.jump()| |default-mappings| + *]D* ]D like "[D", but start at the current cursor position. + *]D-default* + Jumps to the last diagnostic in the current buffer by + default. |vim.diagnostic.jump()| |default-mappings| + *:dli* *:dlist* :[range]dli[st][!] [/]string[/] Like `[D` and `]D`, but search in [range] lines diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 5d894bb5e1..ac20948f14 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -145,6 +145,8 @@ of these in your config by simply removing the mapping, e.g. ":unmap Y". - |i_CTRL-S| - ]d |]d-default| - [d |[d-default| +- [D |[D-default| +- ]D |]D-default| - d |CTRL-W_d-default| - Nvim LSP client defaults |lsp-defaults| - K |K-lsp-default| -- cgit From efa45832ea02e777ce3f5556ef3cd959c164ec24 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Tue, 28 May 2024 14:54:50 -0500 Subject: feat: add "jump" options to vim.diagnostic.config() (#29067) Problem: There is no easy way to configure the behavior of the default diagnostic "jump" mappings. For example, some users way want to show the floating window, and some may not (likewise, some way want to only move between warnings/errors, or disable the "wrap" parameter). Solution: Add a "jump" table to vim.diagnostic.config() that sets default values for vim.diagnostic.jump(). Alternatives: Users can override the default mappings to use the exact options to vim.diagnostic.jump() that they want, but this has a couple issues: - While the default mappings are not complicated, they are also not trivial, so overriding them requires users to understand implementation details (specifically things like setting "count" properly). - If plugins want to change the default mappings, or configure the behavior in any way (e.g. floating window display), it becomes even harder for users to tweak specific behavior. vim.diagnostic.config() already works quite well as the "entry point" for tuning knobs with diagnostic UI elements, so this fits in nicely and composes well with existing mental models and idioms. --- runtime/doc/diagnostic.txt | 18 ++++++++++++++++-- runtime/doc/news.txt | 5 +++++ 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index be9e54d6cd..2438c48154 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -381,7 +381,8 @@ Lua module: vim.diagnostic *diagnostic-api* *vim.diagnostic.JumpOpts* Extends: |vim.diagnostic.GetOpts| - Configuration table with the following keys: + Configuration table with the keys listed below. Some parameters can have + their default values changed with |vim.diagnostic.config()|. Fields: ~ • {diagnostic}? (`vim.Diagnostic`) The diagnostic to jump to. Mutually @@ -419,7 +420,7 @@ Lua module: vim.diagnostic *diagnostic-api* • {disabled}? (`boolean`) *vim.diagnostic.Opts* - Each of the configuration options below accepts one of the following: + Many of the configuration options below accept one of the following: • `false`: Disable this feature • `true`: Enable this feature, use default settings. • `table`: Enable this feature with overrides. Use an empty table to use @@ -450,6 +451,9 @@ Lua module: vim.diagnostic *diagnostic-api* displayed before lower severities (e.g. ERROR is displayed before WARN). Options: • {reverse}? (boolean) Reverse sort order + • {jump}? (`vim.diagnostic.Opts.Jump`) Default values for + |vim.diagnostic.jump()|. See + |vim.diagnostic.Opts.Jump|. *vim.diagnostic.Opts.Float* @@ -509,6 +513,16 @@ Lua module: vim.diagnostic *diagnostic-api* • {focus_id}? (`string`) • {border}? (`string`) see |nvim_open_win()|. +*vim.diagnostic.Opts.Jump* + + Fields: ~ + • {float}? (`boolean|vim.diagnostic.Opts.Float`) Default value of + the {float} parameter of |vim.diagnostic.jump()|. + • {wrap}? (`boolean`) Default value of the {wrap} parameter of + |vim.diagnostic.jump()|. + • {severity}? (`vim.diagnostic.SeverityFilter`) Default value of the + {severity} parameter of |vim.diagnostic.jump()|. + *vim.diagnostic.Opts.Signs* Fields: ~ diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index ceb638a459..13e4b23ea1 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -38,6 +38,11 @@ DEFAULTS • |[D-default| and |]D-default| jump to the first and last diagnostic in the current buffer, respectively. +DIAGNOSTICS + +• |vim.diagnostic.config()| accepts a "jump" table to specify defaults for + |vim.diagnostic.jump()|. + EDITOR • The order in which signs are placed was changed. Higher priority signs will -- cgit From 5c33815448e11b514678f39cecc74e68131d4628 Mon Sep 17 00:00:00 2001 From: Mathias Fußenegger Date: Thu, 30 May 2024 10:46:26 +0200 Subject: refactor(lsp): replace util.buf_versions with changedtick (#28943) `lsp.util.buf_versions` was already derived from changedtick (`on_lines` from `buf_attach` synced the version) As far as I can tell there is no need to keep track of the state in a separate table. --- runtime/doc/deprecated.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index 6c6585d76e..3b3e6afa9e 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -22,6 +22,9 @@ API LUA - vim.region() Use |getregionpos()| instead. +LSP +- *vim.lsp.util.buf_versions* Use |b:changedtick| instead. + DIAGNOSTICS - *vim.diagnostic.goto_next()* Use |vim.diagnostic.jump()| with `{count = 1}` instead. - *vim.diagnostic.goto_prev()* Use |vim.diagnostic.jump()| with `{count = -1}` instead. -- cgit From 07af492f635c51d44d02d8012611cc5e11a4af19 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Fri, 31 May 2024 12:07:31 +0200 Subject: vim-patch:9.1.0453: filetype: rasi files are not recognized Problem: filetype: rasi files are not recognized Solution: regonize '*.rasi' files as rasi filetype, include a filetype and syntax plugin (Pierrick Guillaume) ported from: https://github.com/Fymyte/rasi.vim closes: vim/vim#14821 https://github.com/vim/vim/commit/280e5b13ca568ed592a894140bf1ac74356f4b33 Co-authored-by: Pierrick Guillaume --- runtime/doc/syntax.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 06d7ad8f7e..fc55569a1c 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -2575,6 +2575,13 @@ To highlight R code in knitr chunk headers, add to your |vimrc|: > let rrst_syn_hl_chunk = 1 +RASI *rasi.vim* *ft-rasi-syntax* + +Rasi stands for Rofi Advanced Style Information. It is used by the program +`rofi` to style the rendering of the search window. The language is heavily +inspired by CSS stylesheet. Files with the following extensions are recognized +as rasi files: .rasi. + READLINE *readline.vim* *ft-readline-syntax* The readline library is primarily used by the BASH shell, which adds quite a -- cgit From 9b3dfa3ac0dbc823c00a23ed7bd57dc0f0782a3f Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Fri, 31 May 2024 12:33:00 +0200 Subject: vim-patch:9.1.0454: minor issues in test_filetype with rasi test Problem: minor issues in test_filetype with rasi test (after 9.1.0453) Solution: re-sort test_filetype, fix wrong syntax.txt help tags https://github.com/vim/vim/commit/f3dd6f617c65a9b939697362efe6833eb2778612 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 fc55569a1c..cf553d6707 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -2578,7 +2578,7 @@ To highlight R code in knitr chunk headers, add to your |vimrc|: > RASI *rasi.vim* *ft-rasi-syntax* Rasi stands for Rofi Advanced Style Information. It is used by the program -`rofi` to style the rendering of the search window. The language is heavily +rofi to style the rendering of the search window. The language is heavily inspired by CSS stylesheet. Files with the following extensions are recognized as rasi files: .rasi. -- cgit From 6566a59b3a6c8dabfa40f8debd0de96d875825e9 Mon Sep 17 00:00:00 2001 From: Ilia Choly Date: Fri, 31 May 2024 08:41:10 -0400 Subject: refactor(lsp): use predefined types in util function signatures (#29095) --- runtime/doc/lsp.txt | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index a78a16968f..c4856c6818 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1832,8 +1832,8 @@ apply_text_document_edit({text_document_edit}, {index}, {offset_encoding}) document. Parameters: ~ - • {text_document_edit} (`table`) a `TextDocumentEdit` object - • {index} (`integer`) Optional index of the edit, if from + • {text_document_edit} (`lsp.TextDocumentEdit`) + • {index} (`integer?`) Optional index of the edit, if from a list of edits (or nil, if not from a list) • {offset_encoding} (`string?`) @@ -1845,7 +1845,7 @@ apply_text_edits({text_edits}, {bufnr}, {offset_encoding}) Applies a list of text edits to a buffer. Parameters: ~ - • {text_edits} (`table`) list of `TextEdit` objects + • {text_edits} (`lsp.TextEdit[]`) • {bufnr} (`integer`) Buffer id • {offset_encoding} (`string`) utf-8|utf-16|utf-32 @@ -1857,7 +1857,7 @@ apply_workspace_edit({workspace_edit}, {offset_encoding}) Applies a `WorkspaceEdit`. Parameters: ~ - • {workspace_edit} (`table`) `WorkspaceEdit` + • {workspace_edit} (`lsp.WorkspaceEdit`) • {offset_encoding} (`string`) utf-8|utf-16|utf-32 (required) See also: ~ @@ -1875,8 +1875,7 @@ buf_highlight_references({bufnr}, {references}, {offset_encoding}) Parameters: ~ • {bufnr} (`integer`) Buffer id - • {references} (`table`) List of `DocumentHighlight` objects to - highlight + • {references} (`lsp.DocumentHighlight[]`) objects to highlight • {offset_encoding} (`string`) One of "utf-8", "utf-16", "utf-32". See also: ~ @@ -1910,8 +1909,8 @@ convert_input_to_markdown_lines({input}, {contents}) Parameters: ~ • {input} (`lsp.MarkedString|lsp.MarkedString[]|lsp.MarkupContent`) - • {contents} (`table?`) List of strings to extend with converted lines. - Defaults to {}. + • {contents} (`string[]?`) List of strings to extend with converted + lines. Defaults to {}. Return: ~ (`string[]`) extended with lines of converted markdown. @@ -1924,15 +1923,16 @@ convert_signature_help_to_markdown_lines({signature_help}, {ft}, {triggers}) Converts `textDocument/signatureHelp` response to markdown lines. Parameters: ~ - • {signature_help} (`table`) Response of `textDocument/SignatureHelp` + • {signature_help} (`lsp.SignatureHelp`) Response of + `textDocument/SignatureHelp` • {ft} (`string?`) filetype that will be use as the `lang` for the label markdown code block • {triggers} (`table?`) list of trigger characters from the lsp server. used to better determine parameter offsets Return (multiple): ~ - (`table?`) table list of lines of converted markdown. - (`table?`) table of active hl + (`string[]?`) table list of lines of converted markdown. + (`number[]?`) table of active hl See also: ~ • https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_signatureHelp @@ -1954,7 +1954,7 @@ jump_to_location({location}, {offset_encoding}, {reuse_win}) Jumps to a location. Parameters: ~ - • {location} (`table`) (`Location`|`LocationLink`) + • {location} (`lsp.Location|lsp.LocationLink`) • {offset_encoding} (`string?`) utf-8|utf-16|utf-32 • {reuse_win} (`boolean?`) Jump to existing window if buffer is already open. @@ -2019,7 +2019,8 @@ make_formatting_params({options}) cursor position. Parameters: ~ - • {options} (`table?`) with valid `FormattingOptions` entries + • {options} (`lsp.FormattingOptions?`) with valid `FormattingOptions` + entries Return: ~ (`lsp.DocumentFormattingParams`) object @@ -2059,7 +2060,7 @@ make_position_params({window}, {offset_encoding}) `window` Return: ~ - (`table`) `TextDocumentPositionParams` object + (`lsp.TextDocumentPositionParams`) See also: ~ • https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentPositionParams @@ -2090,7 +2091,7 @@ make_text_document_params({bufnr}) • {bufnr} (`integer?`) Buffer handle, defaults to current Return: ~ - (`table`) `TextDocumentIdentifier` + (`lsp.TextDocumentIdentifier`) See also: ~ • https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentIdentifier @@ -2100,8 +2101,11 @@ make_workspace_params({added}, {removed}) Create the workspace params Parameters: ~ - • {added} (`table`) - • {removed} (`table`) + • {added} (`lsp.WorkspaceFolder[]`) + • {removed} (`lsp.WorkspaceFolder[]`) + + Return: ~ + (`lsp.WorkspaceFoldersChangeEvent`) *vim.lsp.util.open_floating_preview()* open_floating_preview({contents}, {syntax}, {opts}) @@ -2145,7 +2149,7 @@ preview_location({location}, {opts}) *vim.lsp.util.preview_location()* definition) Parameters: ~ - • {location} (`table`) a single `Location` or `LocationLink` + • {location} (`lsp.Location|lsp.LocationLink`) • {opts} (`table`) Return (multiple): ~ @@ -2175,7 +2179,7 @@ show_document({location}, {offset_encoding}, {opts}) Shows document and optionally jumps to the location. Parameters: ~ - • {location} (`table`) (`Location`|`LocationLink`) + • {location} (`lsp.Location|lsp.LocationLink`) • {offset_encoding} (`string?`) utf-8|utf-16|utf-32 • {opts} (`table?`) options • reuse_win (boolean) Jump to existing window if @@ -2200,7 +2204,7 @@ stylize_markdown({bufnr}, {contents}, {opts}) Parameters: ~ • {bufnr} (`integer`) - • {contents} (`table`) of lines to show in window + • {contents} (`string[]`) of lines to show in window • {opts} (`table`) with optional fields • height of floating window • width of floating window -- cgit From 4cff4185647c17b1a397c4c26ff7d8b0738f6396 Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Thu, 30 May 2024 19:57:47 -0500 Subject: fix(vim.text): remove assert from vim.text.hexdecode Instead, return nil plus an error message if the input is invalid. --- runtime/doc/lua.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 36d6e0d41e..8e600adeb9 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -4385,8 +4385,9 @@ vim.text.hexdecode({enc}) *vim.text.hexdecode()* Parameters: ~ • {enc} (`string`) String to decode - Return: ~ - (`string`) Decoded string + Return (multiple): ~ + (`string?`) Decoded string + (`string?`) Error message, if any vim.text.hexencode({str}) *vim.text.hexencode()* Hex encode a string. -- cgit From 50f6d364c661b88a1edc5ffc8e284d1c0ff70810 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 1 Jun 2024 14:47:18 +0800 Subject: vim-patch:0bdc5d8: runtime(doc): Add ft_hare.txt to Reference Manual TOC (#29120) while at it, also re-align ft_context.txt with the rest of the list. closes: vim/vim#14863 https://github.com/vim/vim/commit/0bdc5d8241335c3451f629eed7a3734021d41679 Co-authored-by: h-east --- runtime/doc/help.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/doc') diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index 43f80101ed..685bce2553 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -127,6 +127,7 @@ PROGRAMMING LANGUAGE SUPPORT |filetype| Settings for specific types of files |quickfix| Commands for a quick edit-compile-fix cycle |ft_ada.txt| Ada filetype plugin +|ft_hare.txt| Filetype plugin for Hare |ft_ps1.txt| PowerShell filetype plugin |ft_raku.txt| Raku filetype plugin |ft_rust.txt| Rust filetype plugin -- cgit From 7a8f42dc036f3bc6e8b106c580e0cd50dbed465e Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 2 Jun 2024 06:06:12 +0800 Subject: vim-patch:e299591: runtime(doc): clarify 'shortmess' flag "S" (#29131) fixes: vim/vim#14893 https://github.com/vim/vim/commit/e299591498a20c5c587364e4df57f947dfc02897 Co-authored-by: Christian Brabandt --- runtime/doc/options.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index edda46e197..a48ebd7199 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -5459,8 +5459,8 @@ A jump table for the options with a short description can be found at |Q_op|. message; also for quickfix message (e.g., ":cn") s don't give "search hit BOTTOM, continuing at TOP" or *shm-s* "search hit TOP, continuing at BOTTOM" messages; when using - the search count do not show "W" after the count message (see - S below) + the search count do not show "W" before the count message + (see |shm-S| below) t truncate file message at the start if it is too long *shm-t* to fit on the command-line, "<" will appear in the left most column; ignored in Ex mode @@ -5482,7 +5482,11 @@ A jump table for the options with a short description can be found at |Q_op|. `:silent` was used for the command; note that this also affects messages from 'autoread' reloading S do not show search count message when searching, e.g. *shm-S* - "[1/5]" + "[1/5]". When the "S" flag is not present (e.g. search count + is shown), the "search hit BOTTOM, continuing at TOP" and + "search hit TOP, continuing at BOTTOM" messages are only + indicated by a "W" (Mnemonic: Wrapped) letter before the + search count statistics. This gives you the opportunity to avoid that a change between buffers requires you to hit , but still gives as useful a message as -- cgit From 2f5b8a009280eba995aecf67d1e8d99b7c72c51c Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 4 Jun 2024 09:39:28 +0200 Subject: vim-patch:9.1.0464: no whitespace padding in commentstring option in ftplugins Problem: no whitespace padding in commentstring option in ftplugins Solution: Change default to include whitespace padding, update existing filetype plugins with the new default value (Riley Bruins) closes: vim/vim#14843 https://github.com/vim/vim/commit/0a0830624a260660c7fa692ecb7e6e5de09114ba Co-authored-by: Riley Bruins --- 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 a48ebd7199..20e825329a 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1442,8 +1442,8 @@ 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*/". Used for |commenting| and to - add markers for folding, see |fold-marker|. + comment text, and should be padded with a space when possible. + Used for |commenting| and to add markers for folding, see |fold-marker|. *'complete'* *'cpt'* *E535* 'complete' 'cpt' string (default ".,w,b,u,t") -- cgit From 8cbb1f20e557461c8417583a7f69d53aaaef920b Mon Sep 17 00:00:00 2001 From: Ilia Choly Date: Tue, 4 Jun 2024 09:06:02 -0400 Subject: refactor(lua): use tuple syntax everywhere #29111 --- runtime/doc/diagnostic.txt | 25 ++++++++++++------------- runtime/doc/lua.txt | 4 ++-- runtime/doc/treesitter.txt | 6 +++--- 3 files changed, 17 insertions(+), 18 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index 2438c48154..c7bb02e7f1 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -393,11 +393,11 @@ Lua module: vim.diagnostic *diagnostic-api* by {count} diagnostics, while a negative integer moves backward by {count} diagnostics. Mutually exclusive with {diagnostic}. - • {pos}? (`{[1]:integer,[2]:integer}`) Cursor position as a - `(row, col)` tuple. See |nvim_win_get_cursor()|. Used - to find the nearest diagnostic when {count} is used. - Only used when {count} is non-nil. Default is the - current cursor position. + • {pos}? (`[integer,integer]`) Cursor position as a `(row, col)` + tuple. See |nvim_win_get_cursor()|. Used to find the + nearest diagnostic when {count} is used. Only used when + {count} is non-nil. Default is the current cursor + position. • {wrap}? (`boolean`, default: `true`) Whether to loop around file or not. Similar to 'wrapscan'. • {severity}? (`vim.diagnostic.SeverityFilter`) See @@ -467,18 +467,18 @@ Lua module: vim.diagnostic *diagnostic-api* current cursor position (`cursor`). Shorthand versions are also accepted (`c` for `cursor`, `l` for `line`, `b` for `buffer`). - • {pos}? (`integer|{[1]:integer,[2]:integer}`) If {scope} is - "line" or "cursor", use this position rather than - the cursor position. If a number, interpreted as a - line number; otherwise, a (row, col) tuple. + • {pos}? (`integer|[integer,integer]`) If {scope} is "line" + or "cursor", use this position rather than the + cursor position. If a number, interpreted as a line + number; otherwise, a (row, col) tuple. • {severity_sort}? (`boolean|{reverse?:boolean}`, default: `false`) Sort diagnostics by severity. Overrides the setting from |vim.diagnostic.config()|. • {severity}? (`vim.diagnostic.SeverityFilter`) See |diagnostic-severity|. Overrides the setting from |vim.diagnostic.config()|. - • {header}? (`string|{[1]:string,[2]:any}`) String to use as the - header for the floating window. If a table, it is + • {header}? (`string|[string,any]`) String to use as the header + for the floating window. If a table, it is interpreted as a `[text, hl_group]` tuple. Overrides the setting from |vim.diagnostic.config()|. • {source}? (`boolean|'if_many'`) Include the diagnostic source @@ -591,8 +591,7 @@ Lua module: vim.diagnostic *diagnostic-api* < • {hl_mode}? (`'replace'|'combine'|'blend'`) See |nvim_buf_set_extmark()|. - • {virt_text}? (`{[1]:string,[2]:any}[]`) See - |nvim_buf_set_extmark()|. + • {virt_text}? (`[string,any][]`) See |nvim_buf_set_extmark()|. • {virt_text_pos}? (`'eol'|'overlay'|'right_align'|'inline'`) See |nvim_buf_set_extmark()|. • {virt_text_win_col}? (`integer`) See |nvim_buf_set_extmark()|. diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 36d6e0d41e..e2fcac1bda 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -834,8 +834,8 @@ vim.spell.check({str}) *vim.spell.check()* • {str} (`string`) Return: ~ - (`{[1]: string, [2]: 'bad'|'rare'|'local'|'caps', [3]: integer}[]`) - List of tuples with three items: + (`[string, 'bad'|'rare'|'local'|'caps', 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 diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 0b84bb60d4..25b070b310 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -764,9 +764,9 @@ get_node({opts}) *vim.treesitter.get_node()* • {opts} (`table?`) Optional keyword arguments: • {bufnr} (`integer?`) Buffer number (nil or 0 for current buffer) - • {pos} (`{ [1]: integer, [2]: integer }?`) 0-indexed (row, - col) tuple. Defaults to cursor position in the current - window. Required if {bufnr} is not the current buffer + • {pos} (`[integer, integer]?`) 0-indexed (row, col) tuple. + Defaults to cursor position in the current window. Required + if {bufnr} is not the current buffer • {lang} (`string?`) Parser language. (default: from buffer filetype) • {ignore_injections} (`boolean?`) Ignore injected languages -- cgit From 164338330b74e6e7c7cbb61e49c810dd82599236 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 5 Jun 2024 14:44:31 +0800 Subject: vim-patch:9.1.0463: no fuzzy-matching support for insert-completion Problem: no fuzzy-matching support for insert-completion Solution: enable insert-mode completion with fuzzy-matching using :set completopt+=fuzzy (glepnir). closes: vim/vim#14878 https://github.com/vim/vim/commit/a218cc6cdabae1113647b817c4eefc2b60a6902f Co-authored-by: glepnir --- runtime/doc/options.txt | 11 ++++++++--- runtime/doc/pattern.txt | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 20e825329a..e9fa53ca97 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1517,6 +1517,10 @@ A jump table for the options with a short description can be found at |Q_op|. completion in the preview window. Only works in combination with "menu" or "menuone". + popup Show extra information about the currently selected + completion in a popup window. Only works in combination + with "menu" or "menuone". Overrides "preview". + noinsert Do not insert any text for a match until the user selects a match from the menu. Only works in combination with "menu" or "menuone". No effect if "longest" is present. @@ -1525,9 +1529,10 @@ A jump table for the options with a short description can be found at |Q_op|. select one from the menu. Only works in combination with "menu" or "menuone". - popup Show extra information about the currently selected - completion in a popup window. Only works in combination - with "menu" or "menuone". Overrides "preview". + fuzzy Enable |fuzzy-matching| for completion candidates. This + allows for more flexible and intuitive matching, where + characters can be skipped and matches can be found even + if the exact sequence is not typed. *'completeslash'* *'csl'* 'completeslash' 'csl' string (default "") diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 1ef182127c..67ef769203 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1494,5 +1494,7 @@ the matching positions and the fuzzy match scores. The "f" flag of `:vimgrep` enables fuzzy matching. +To enable fuzzy matching for |ins-completion|, add the "fuzzy" value to the +'completeopt' option. vim:tw=78:ts=8:noet:ft=help:norl: -- cgit From c2e836c41cabef3c5e269b5f6401f272112c75e1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 5 Jun 2024 15:01:23 +0800 Subject: vim-patch:2a2c4ff: runtime(doc): clarify how fuzzy 'completeopt' should work related: vim/vim#14912 https://github.com/vim/vim/commit/2a2c4fffd7e04f74b316209404767f128684a9e1 Co-authored-by: Christian Brabandt --- runtime/doc/options.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index e9fa53ca97..c33b8ac03c 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1532,7 +1532,10 @@ A jump table for the options with a short description can be found at |Q_op|. fuzzy Enable |fuzzy-matching| for completion candidates. This allows for more flexible and intuitive matching, where characters can be skipped and matches can be found even - if the exact sequence is not typed. + if the exact sequence is not typed. Only makes a + difference how completion candidates are reduced from the + list of alternatives, but not how the candidates are + collected (using different completion types). *'completeslash'* *'csl'* 'completeslash' 'csl' string (default "") -- cgit From 1d4e894403638a94ac58766cdcbc7f3128db318b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 6 Jun 2024 05:50:44 +0800 Subject: vim-patch:9.1.0469: Cannot have buffer-local value for 'completeopt' Problem: Cannot have buffer-local value for 'completeopt' (Nick Jensen). Solution: Make 'completeopt' global-local (zeertzjq). Also for some reason test Test_ColonEight_MultiByte seems to be failing sporadically now. Let's mark it as flaky. fixes: vim/vim#5487 closes: vim/vim#14922 https://github.com/vim/vim/commit/529b9ad62a0e843ee56ef609aef7e51b7dc8a4c8 --- 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 c33b8ac03c..f02d3c9741 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1495,7 +1495,7 @@ A jump table for the options with a short description can be found at |Q_op|. *'completeopt'* *'cot'* 'completeopt' 'cot' string (default "menu,preview") - global + global or local to buffer |global-local| A comma-separated list of options for Insert mode completion |ins-completion|. The supported values are: -- cgit From 78d3f4742872f535ebc75500afde4858985c40d8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 6 Jun 2024 06:40:11 +0800 Subject: vim-patch:92f4e91: runtime(vim): Update base-syntax, allow whitespace before :substitute pattern (#29210) Allow whitespace between the :substitute command and its pattern argument. Although unusual, it is supported and there are examples in the wild. Match Vi compatible :substitute commands like :s\/{string}/. See :help E1270. fixes: vim/vim#14920 closes: vim/vim#14923 https://github.com/vim/vim/commit/92f4e915908962da2c1969a8d60f1563e06ee00e Co-authored-by: Doug Kearns --- runtime/doc/syntax.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index cf553d6707..1e3dfe1e32 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -3332,7 +3332,7 @@ embedded script highlighting they wish to have. > This option is disabled by default. *g:vimsyn_folding* -Some folding is now supported with syntax/vim.vim: > +Some folding is now supported with when 'foldmethod' is set to "syntax": > g:vimsyn_folding == 0 or doesn't exist: no syntax-based folding g:vimsyn_folding =~ 'a' : augroups @@ -3343,6 +3343,11 @@ Some folding is now supported with syntax/vim.vim: > g:vimsyn_folding =~ 'P' : fold python script g:vimsyn_folding =~ 'r' : fold ruby script < + +By default, g:vimsyn_folding is unset. Concatenate the indicated characters +to support folding of multiple syntax constructs; i.e. +g:vimsyn_folding = "fh" will enable folding of both functions and heredocs. + *g:vimsyn_noerror* Not all error highlighting that syntax/vim.vim does may be correct; Vim script is a difficult language to highlight correctly. A way to suppress error -- cgit From cb6c0fda718e4503fc1bfc49a9fe92411f5f9005 Mon Sep 17 00:00:00 2001 From: sus-domesticus <134197728+sus-domesticus@users.noreply.github.com> Date: Thu, 6 Jun 2024 17:16:43 +0300 Subject: feat(editorconfig): add support for spelling_language (#28638) --- runtime/doc/editorconfig.txt | 4 ++++ runtime/doc/news.txt | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/editorconfig.txt b/runtime/doc/editorconfig.txt index 0b20c77801..eef14ed51c 100644 --- a/runtime/doc/editorconfig.txt +++ b/runtime/doc/editorconfig.txt @@ -78,6 +78,10 @@ root *editorconfig.root* directories. This property must be at the top-level of the `.editorconfig` file (i.e. it must not be within a glob section). +spelling_language *editorconfig.spelling_language* + A code of the format ss or ss-TT, where ss is an ISO 639 language code and + TT is an ISO 3166 territory identifier. Sets the 'spelllang' option. + tab_width *editorconfig.tab_width* The display size of a single tab character. Sets the 'tabstop' option. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 13e4b23ea1..2fed1b6b29 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -128,7 +128,8 @@ PERFORMANCE PLUGINS -• TODO +• EditorConfig + • spelling_language property is now supported. STARTUP -- cgit From 8c5af0eb85a3932f6ca018d2aa681521369a26be Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Fri, 7 Jun 2024 04:55:14 +0200 Subject: docs: misc (#28837) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Danymat Co-authored-by: Gregory Anders Co-authored-by: Jakub Okoński Co-authored-by: John L. Villalovos Co-authored-by: Maria José Solano Co-authored-by: Michaili K Co-authored-by: TheLeoP Co-authored-by: Tobias Schmitz Co-authored-by: W20MC <157727813+W20MC@users.noreply.github.com> Co-authored-by: Will Hopkins Co-authored-by: Yifan Hu <141280278+b0ae989c@users.noreply.github.com> Co-authored-by: glepnir Co-authored-by: prljav <74116121+prljav@users.noreply.github.com> --- runtime/doc/api.txt | 14 +++++++------- runtime/doc/diagnostic.txt | 7 ++++--- runtime/doc/gui.txt | 2 +- runtime/doc/lsp.txt | 10 +++++----- runtime/doc/lua-guide.txt | 1 - runtime/doc/map.txt | 1 - runtime/doc/quickref.txt | 1 + runtime/doc/sign.txt | 15 ++++++--------- 8 files changed, 24 insertions(+), 27 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 38960e1bc2..577329ad00 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -2138,14 +2138,14 @@ nvim_buf_attach({buffer}, {send_buffer}, {opts}) *nvim_buf_attach()* • |api-buffer-updates-lua| nvim_buf_call({buffer}, {fun}) *nvim_buf_call()* - call a function with buffer as temporary current buffer + Call a function with buffer as temporary current buffer. This temporarily switches current buffer to "buffer". If the current - window already shows "buffer", the window is not switched If a window - inside the current tabpage (including a float) already shows the buffer - One of these windows will be set as current window temporarily. Otherwise - a temporary scratch window (called the "autocmd window" for historical - reasons) will be used. + window already shows "buffer", the window is not switched. If a window + inside the current tabpage (including a float) already shows the buffer, + then one of these windows will be set as current window temporarily. + Otherwise a temporary scratch window (called the "autocmd window" for + historical reasons) will be used. This is useful e.g. to call Vimscript functions that only work with the current buffer/window currently, like |termopen()|. @@ -2831,7 +2831,7 @@ nvim_set_decoration_provider({ns_id}, {opts}) ["buf", bufnr, tick] < • on_win: called when starting to redraw a specific window. > - ["win", winid, bufnr, topline, botline] + ["win", winid, bufnr, toprow, botrow] < • on_line: called for each buffer line being redrawn. (The interaction with fold lines is subject to change) > diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index c7bb02e7f1..68dc9d6549 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -516,10 +516,11 @@ Lua module: vim.diagnostic *diagnostic-api* *vim.diagnostic.Opts.Jump* Fields: ~ - • {float}? (`boolean|vim.diagnostic.Opts.Float`) Default value of - the {float} parameter of |vim.diagnostic.jump()|. - • {wrap}? (`boolean`) Default value of the {wrap} parameter of + • {float}? (`boolean|vim.diagnostic.Opts.Float`, default: false) + Default value of the {float} parameter of |vim.diagnostic.jump()|. + • {wrap}? (`boolean`, default: true) Default value of the {wrap} + parameter of |vim.diagnostic.jump()|. • {severity}? (`vim.diagnostic.SeverityFilter`) Default value of the {severity} parameter of |vim.diagnostic.jump()|. diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index a64d722177..104413ce0d 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -221,7 +221,7 @@ is right aligned, and the "O" is underlined, to indicate it is the shortcut. *:am* *:amenu* *:an* *:anoremenu* The ":amenu" command can be used to define menu entries for all modes at once, -expect for Terminal mode. To make the command work correctly, a character is +except for Terminal mode. To make the command work correctly, a character is automatically inserted for some modes: mode inserted appended ~ Normal nothing nothing diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index c4856c6818..4ddf82706b 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -514,10 +514,10 @@ LspAttach *LspAttach* callback = function(args) local bufnr = args.buf local client = vim.lsp.get_client_by_id(args.data.client_id) - if client.server_capabilities.completionProvider then + if client.supports_method("textDocument/completion") then vim.bo[bufnr].omnifunc = "v:lua.vim.lsp.omnifunc" end - if client.server_capabilities.definitionProvider then + if client.supports_method("textDocument/definition") then vim.bo[bufnr].tagfunc = "v:lua.vim.lsp.tagfunc" end end, @@ -874,13 +874,13 @@ start({config}, {opts}) *vim.lsp.start()* • {config} (`vim.lsp.ClientConfig`) Configuration for the server. See |vim.lsp.ClientConfig|. • {opts} (`table?`) Optional keyword arguments - • {reuse_client} + • {reuse_client}? (`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). + • {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). diff --git a/runtime/doc/lua-guide.txt b/runtime/doc/lua-guide.txt index e8757a1859..5f06d51f42 100644 --- a/runtime/doc/lua-guide.txt +++ b/runtime/doc/lua-guide.txt @@ -225,7 +225,6 @@ Vimscript are automatically converted: end vim.fn.jobstart('ls', { on_stdout = print_stdout }) - print(vim.fn.printf('Hello from %s', 'Lua')) < This works for both |builtin-functions| and |user-function|s. diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 9ec34d5d52..f5cbb7b732 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1381,7 +1381,6 @@ completion can be enabled: -complete=arglist file names in argument list -complete=augroup autocmd groups -complete=buffer buffer names - -complete=behave :behave suboptions -complete=color color schemes -complete=command Ex command (and arguments) -complete=compiler compilers diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index c0d00d16cb..5eea9baa20 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -898,6 +898,7 @@ Short explanation of each option: *option-list* 'tagstack' 'tgst' push tags onto the tag stack 'term' name of the terminal 'termbidi' 'tbidi' terminal takes care of bi-directionality +'termguicolors' 'tgc' enable 24-bit RGB color in the TUI 'textwidth' 'tw' maximum width of text that is being inserted 'thesaurus' 'tsr' list of thesaurus files for keyword completion 'thesaurusfunc' 'tsrfu' function to be used for thesaurus completion diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt index 6fa260be40..a64ba0ea1c 100644 --- a/runtime/doc/sign.txt +++ b/runtime/doc/sign.txt @@ -67,15 +67,12 @@ sign group allows Vim plugins to use unique signs without interfering with other plugins using signs. *sign-priority* -Each placed sign is assigned a priority value. When multiple signs are placed -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 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. +Each placed sign is assigned a priority value independently of the sign group. +The default priority for a sign is 10. When multiple signs that each have an +icon or text are placed on the same line, signs are ordered with decreasing +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 6e45cd7f0026ee33b8c397b810dcfe5b4678bbd8 Mon Sep 17 00:00:00 2001 From: Mathias Fußenegger Date: Fri, 7 Jun 2024 11:36:46 +0200 Subject: fix(lsp): revert buf_versions deprecation/replacement (#29217) * Revert "fix(lsp): account for changedtick version gap on modified reset (#29170)" This reverts commit 2e6d295f799c27372e5c0c44727fa613c81717fd. * Revert "refactor(lsp): replace util.buf_versions with changedtick (#28943)" This reverts commit 5c33815448e11b514678f39cecc74e68131d4628. --- runtime/doc/deprecated.txt | 3 --- 1 file changed, 3 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index 3b3e6afa9e..6c6585d76e 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -22,9 +22,6 @@ API LUA - vim.region() Use |getregionpos()| instead. -LSP -- *vim.lsp.util.buf_versions* Use |b:changedtick| instead. - DIAGNOSTICS - *vim.diagnostic.goto_next()* Use |vim.diagnostic.jump()| with `{count = 1}` instead. - *vim.diagnostic.goto_prev()* Use |vim.diagnostic.jump()| with `{count = -1}` instead. -- cgit From f3632e14e3a75114415050ab01c2d04a06036009 Mon Sep 17 00:00:00 2001 From: altermo <107814000+altermo@users.noreply.github.com> Date: Fri, 7 Jun 2024 17:33:40 +0200 Subject: feat: get/set namespace properties #28728 ref https://github.com/neovim/neovim/pull/28432 ref https://github.com/neovim/neovim/issues/28469 --- runtime/doc/api.txt | 35 +++++++++-------------------------- runtime/doc/news-0.10.txt | 2 -- runtime/doc/news.txt | 2 +- 3 files changed, 10 insertions(+), 29 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 577329ad00..f92a69af4e 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -2758,8 +2758,6 @@ 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 (EXPERIMENTAL) enables "scoping" for the - extmark. See |nvim__win_add_ns()| Return: ~ Id of the created/updated extmark @@ -2841,41 +2839,26 @@ nvim_set_decoration_provider({ns_id}, {opts}) ["end", tick] < -nvim__win_add_ns({window}, {ns_id}) *nvim__win_add_ns()* +nvim__ns_get({ns_id}) *nvim__ns_get()* 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. + Get the properties for namespace Parameters: ~ - • {window} Window handle, or 0 for current window - • {ns_id} Namespace - - Return: ~ - true if the namespace was added, else false - -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: ~ - • {window} Window handle, or 0 for current window - • {ns_id} the namespace to remove + • {ns_id} Namespace Return: ~ - true if the namespace was removed, else false + Map defining the namespace properties, see |nvim__ns_set()| -nvim__win_get_ns({window}) *nvim__win_get_ns()* +nvim__ns_set({ns_id}, {opts}) *nvim__ns_set()* EXPERIMENTAL: this API will change in the future. - Gets the namespace scopes for a given window. + Set some properties for namespace Parameters: ~ - • {window} Window handle, or 0 for current window - - Return: ~ - a list of namespaces ids + • {ns_id} Namespace + • {opts} Optional parameters to set: + • wins: a list of windows to be scoped in ============================================================================== diff --git a/runtime/doc/news-0.10.txt b/runtime/doc/news-0.10.txt index d611eee242..bc868c1099 100644 --- a/runtime/doc/news-0.10.txt +++ b/runtime/doc/news-0.10.txt @@ -155,8 +155,6 @@ The following new features were added. • |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. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 2fed1b6b29..b316cc7b04 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -83,7 +83,7 @@ The following new features were added. API -• TODO +• |nvim__ns_set()| can set properties for a namespace DEFAULTS -- cgit From 6592873f773b4c358ea950bfcfa8cbc3fc3bc8cc Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 8 Jun 2024 10:49:15 +0200 Subject: feat(help): use treesitter for table of contents Problem: Creating the table of contents for `gO` is complicated. Solution: Use treesitter instead. --- runtime/doc/help.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index 685bce2553..fefead7fc9 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -188,7 +188,7 @@ Local additions ~ *local-additions* ------------------------------------------------------------------------------ -*bars* Bars example +Bars example *bars* Now that you've jumped here with CTRL-] or a double mouse click, you can use CTRL-T, CTRL-O, g, or to go back to where you were. @@ -200,5 +200,5 @@ You can use CTRL-] on any word (even if it is not within "|") and Nvim will try to find help for it. Especially for options in single quotes, e.g. 'hlsearch'. ------------------------------------------------------------------------------- + vim:tw=78:isk=!-~,^*,^\|,^\":ts=8:noet:ft=help:norl: -- cgit From a156038d7015e8349ca8886d52eee189941fc0cf Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 8 Jun 2024 17:12:16 +0200 Subject: docs: fix more treesitter parsing errors --- runtime/doc/ft_sql.txt | 6 +++--- runtime/doc/index.txt | 4 ++-- runtime/doc/usr_29.txt | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/ft_sql.txt b/runtime/doc/ft_sql.txt index 241fa4bd74..1dbac66db0 100644 --- a/runtime/doc/ft_sql.txt +++ b/runtime/doc/ft_sql.txt @@ -293,7 +293,7 @@ loaded by Vim: > ftplugin/sql.vim syntax/sqlinformix.vim indent/sql.vim -> +< Notice indent/sqlinformix.sql was not loaded. There is no indent file for Informix, Vim loads the default files if the specified files does not exist. @@ -349,7 +349,7 @@ The defaults static maps are: > The use of "" can be user chosen by using the following in your |init.vim| as it may not work properly on all platforms: > let g:ftplugin_sql_omni_key = '' -> +< The static maps (which are based on the syntax highlight groups) follow this format: > imap k :call sqlcomplete#Map('sqlKeyword') @@ -664,7 +664,7 @@ your |init.vim|: > filetype is changed temporarily to SQL, the sqlcompletion plugin will cache the syntax groups listed in the List specified in this option. -> + ------------------------------------------------------------------------------ 4.5 SQL Maps *sql-completion-maps* diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 79f10b33f1..05c8b94d94 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -366,7 +366,7 @@ tag char note action in Normal mode ~ or start of putted text |`]| `] 1 cursor to the end of last operated text or end of putted text -|``| `` 1 cursor to the position before latest jump +|``| "``" 1 cursor to the position before latest jump |`{| `{ 1 cursor to the start of the current paragraph |`}| `} 1 cursor to the end of the current paragraph |a| a 2 append text after the cursor N times @@ -1136,7 +1136,7 @@ tag command action ~ |:!!| :!! repeat last ":!" command |:#| :# same as ":number" |:&| :& repeat last ":substitute" -|:star| :* use the last Visual area, like :'<,'> +|:star| :* use the last Visual area, like ":'<,'>" |:<| :< shift lines one 'shiftwidth' left |:=| := print the last line number |:>| :> shift lines one 'shiftwidth' right diff --git a/runtime/doc/usr_29.txt b/runtime/doc/usr_29.txt index dd8598a3a0..9929be5079 100644 --- a/runtime/doc/usr_29.txt +++ b/runtime/doc/usr_29.txt @@ -87,7 +87,7 @@ The ":tags" command shows the list of tags that you traversed through: 1 1 write_line 8 write_block.c ~ 2 1 write_char 7 write_line.c ~ > ~ -> +< Now to go back. The CTRL-T command goes to the preceding tag. In the example above you get back to the "write_line" function, in the call to "write_char". This command takes a count argument that indicates how many tags to jump -- cgit From 40329f32d809302196ffd3f47b4d01a1d67f5a9b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 10 Jun 2024 06:47:30 +0800 Subject: vim-patch:9c4389a: runtime(doc): Fix small style issues (#29263) closes: vim/vim#14942 https://github.com/vim/vim/commit/9c4389acc307943a2cd754ecbec3834810d152e4 Co-authored-by: h-east --- runtime/doc/mbyte.txt | 2 +- runtime/doc/quickfix.txt | 2 +- runtime/doc/syntax.txt | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt index 0a7e0baad3..a8c5670352 100644 --- a/runtime/doc/mbyte.txt +++ b/runtime/doc/mbyte.txt @@ -686,7 +686,7 @@ You might want to select the font used for the menus. Unfortunately this doesn't always work. See the system specific remarks below, and 'langmenu'. -USING UTF-8 IN X-Windows *utf-8-in-xwindows* +USING UTF-8 IN X-WINDOWS *utf-8-in-xwindows* You need to specify a font to be used. For double-wide characters another font is required, which is exactly twice as wide. There are three ways to do diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 5d3c0cbdc2..897e503fc4 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1296,7 +1296,7 @@ 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` +- or setting them in `b:pandoc_compiler_args` or `g:pandoc_compiler_args`. PERL *quickfix-perl* *compiler-perl* diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 1e3dfe1e32..61028c791d 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -466,14 +466,14 @@ ASTRO *astro.vim* *ft-astro-syntax* Configuration The following variables control certain syntax highlighting features. -You can add them to your .vimrc: > +You can add them to your .vimrc. + +To enables TypeScript and TSX for ".astro" files (default "disable"): > let g:astro_typescript = "enable" < -Enables TypeScript and TSX for ".astro" files. Default Value: "disable" > +To enables Stylus for ".astro" files (default "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. @@ -1437,7 +1437,7 @@ Note: Syntax folding might slow down syntax highlighting significantly, especially for large files. -HTML/OS (by Aestiva) *htmlos.vim* *ft-htmlos-syntax* +HTML/OS (BY AESTIVA) *htmlos.vim* *ft-htmlos-syntax* The coloring scheme for HTML/OS works as follows: -- cgit From 20f22f75ee629ae2db4cd99e730fa0af26553177 Mon Sep 17 00:00:00 2001 From: Tom Praschan <13141438+tom-anders@users.noreply.github.com> Date: Mon, 10 Jun 2024 03:14:55 +0200 Subject: feat(lsp): include end_col, end_lnum in vim.lsp.buf.locations_to_items #29164 --- runtime/doc/lsp.txt | 2 ++ runtime/doc/news.txt | 1 + 2 files changed, 3 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 4ddf82706b..ca9dfd0350 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1983,7 +1983,9 @@ locations_to_items({locations}, {offset_encoding}) (`table[]`) A list of objects with the following fields: • {filename} (`string`) • {lnum} (`integer`) 1-indexed line number + • {end_lnum} (`integer`) 1-indexed end line number • {col} (`integer`) 1-indexed column + • {end_col} (`integer`) 1-indexed end column • {text} (`string`) • {user_data} (`lsp.Location|lsp.LocationLink`) diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index b316cc7b04..2ff6b0302c 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -113,6 +113,7 @@ LSP • Completion side effects (including snippet expansion, execution of commands and application of additional text edits) is now built-in. +• |vim.lsp.util.locations_to_items()| sets `end_col` and `end_lnum` fields. LUA -- cgit From 5e49ef0af3cb8dba658e5d0dc6a807f8edebf590 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Tue, 11 Jun 2024 12:05:18 +0100 Subject: refactor(lua): improve type annotations --- runtime/doc/diagnostic.txt | 1 - runtime/doc/lua.txt | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index 68dc9d6549..05af2eddc3 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -363,7 +363,6 @@ Lua module: vim.diagnostic *diagnostic-api* • {message} (`string`) The diagnostic text • {source}? (`string`) The source of the diagnostic • {code}? (`string|integer`) The diagnostic code - • {_tags}? (`{ deprecated: boolean, unnecessary: boolean}`) • {user_data}? (`any`) arbitrary data plugins can add • {namespace}? (`integer`) diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index e2fcac1bda..72babb067e 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -981,6 +981,9 @@ vim.str_byteindex({str}, {index}, {use_utf16}) *vim.str_byteindex()* • {index} (`integer`) • {use_utf16} (`boolean?`) + Return: ~ + (`integer`) + vim.str_utf_end({str}, {index}) *vim.str_utf_end()* Gets the distance (in bytes) from the last byte of the codepoint (character) that {index} points to. -- cgit From e947f226bebef1310af39ce3d93d7bb87e85d757 Mon Sep 17 00:00:00 2001 From: Will Hopkins Date: Sat, 1 Jun 2024 00:18:59 -0700 Subject: fix(types): use vararg return type annotation build(types): allow vararg returns in function types --- 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 72babb067e..fe2abfe956 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -4082,10 +4082,10 @@ Iter:map({f}) *Iter:map()* < Parameters: ~ - • {f} (`fun(...):any`) Mapping function. Takes all values returned from - the previous stage in the pipeline as arguments and returns one - or more new values, which are used in the next pipeline stage. - Nil return values are filtered from the output. + • {f} (`fun(...):...:any`) Mapping function. Takes all values returned + from the previous stage in the pipeline as arguments and returns + one or more new values, which are used in the next pipeline + stage. Nil return values are filtered from the output. Return: ~ (`Iter`) -- cgit From 3ad977f01d97e84b576e6965c5c9e4f75c10cb35 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:18:06 -0500 Subject: feat(terminal): add support for copying with OSC 52 in embedded terminal (#29117) When libvterm receives the OSC 52 escape sequence it ignores it because Nvim does not set any selection callbacks. Install selection callbacks that forward to the clipboard provider, so that setting the clipboard with OSC 52 in the embedded terminal writes to the system clipboard using the configured clipboard provider. --- runtime/doc/news.txt | 3 ++- runtime/doc/nvim_terminal_emulator.txt | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 2ff6b0302c..455b38b5fa 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -138,7 +138,8 @@ STARTUP TERMINAL -• TODO +• The |terminal| now understands the OSC 52 escape sequence to write to the + system clipboard (copy). Querying with OSC 52 (paste) is not supported. TREESITTER diff --git a/runtime/doc/nvim_terminal_emulator.txt b/runtime/doc/nvim_terminal_emulator.txt index a6ebc7e958..81bcd89146 100644 --- a/runtime/doc/nvim_terminal_emulator.txt +++ b/runtime/doc/nvim_terminal_emulator.txt @@ -164,7 +164,22 @@ directory indicated in the request. >lua 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\\" + printf "\033]7;file://./foo/bar\033\\" + +OSC 52: write to system clipboard *terminal-osc52* + +Applications in the :terminal buffer can write to the system clipboard by +emitting an OSC 52 sequence. Example: > + + printf '\033]52;;%s\033\\' "$(echo -n 'Hello world' | base64)" + +Nvim uses the configured |clipboard| provider to write to the system +clipboard. Reading from the system clipboard with OSC 52 is not supported, as +this would allow any arbitrary program in the :terminal to read the user's +clipboard. + +OSC 52 sequences sent from the :terminal buffer do not emit a |TermRequest| +event. The event is handled directly by Nvim and is not forwarded to plugins. ============================================================================== Status Variables *terminal-status* -- cgit From bbe69b4022b577a801653991a8b7f7f2ab869e97 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 12 Jun 2024 10:23:09 +0800 Subject: vim-patch:959c3c8: runtime(vim): Update base-syntax, configurable comment string highlighting (vim/vim#14931) Allow highlighting of strings within comments to be disabled by setting g:vimsyn_comment_strings to false. https://github.com/vim/vim/commit/959c3c887b2e52c7141b2a09a53634481911b1b7 Co-authored-by: dkearns --- runtime/doc/syntax.txt | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 61028c791d..ded5e46d07 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -3327,28 +3327,31 @@ 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 == 'lpPr' : support embedded lua, perl, python and ruby + g:vimsyn_embed == 'lpPr' : support embedded Lua, Perl, Python and Ruby < This option is disabled by default. *g:vimsyn_folding* - Some folding is now supported with when 'foldmethod' is set to "syntax": > 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_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 < By default, g:vimsyn_folding is unset. Concatenate the indicated characters -to support folding of multiple syntax constructs; i.e. -g:vimsyn_folding = "fh" will enable folding of both functions and heredocs. +to support folding of multiple syntax constructs (e.g., +g:vimsyn_folding = "fh" will enable folding of both functions and heredocs). + + *g:vimsyn_comment_strings* +By default, strings are highlighted inside comments. This may be disabled by +setting g:vimsyn_comment_strings to false. - *g:vimsyn_noerror* + *g:vimsyn_noerror* Not all error highlighting that syntax/vim.vim does may be correct; Vim script is a difficult language to highlight correctly. A way to suppress error highlighting is to put the following line in your |vimrc|: > -- cgit From d73910d7f6126441ffa432bc72c15827f9a0a90b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 12 Jun 2024 11:07:22 +0800 Subject: vim-patch:b4e648a: runtime(doc): fix typos in syntax.txt (#29293) https://github.com/vim/vim/commit/b4e648a0066940e0e8b513ff2e7347b5a3473694 Co-authored-by: Ken Takata --- runtime/doc/syntax.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index ded5e46d07..8e38827e87 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -468,10 +468,10 @@ Configuration The following variables control certain syntax highlighting features. You can add them to your .vimrc. -To enables TypeScript and TSX for ".astro" files (default "disable"): > +To enable TypeScript and TSX for ".astro" files (default "disable"): > let g:astro_typescript = "enable" < -To enables Stylus for ".astro" files (default "disable"): > +To enable Stylus for ".astro" files (default "disable"): > let g:astro_stylus = "enable" < NOTE: You need to install an external plugin to support stylus in astro files. -- cgit From 72155121006bca884e154e935640054f2e090367 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 12 Jun 2024 11:44:38 +0800 Subject: vim-patch:210b39c: runtime(doc): clarify documentation for "v" position at line() (#29296) Problem: the previous documentation falsely states that "v" always refers to the start of a visual area. In fact, the reference of "v" and "." complement each other. If the cursor is at the start of a (characterwise) visual area, then "v" refers to the end of the area. Solution: be more verbose and explicit about the connection between "." and "v" and also refer to |v_o| which many vim users will be familiar with for visual areas. https://github.com/vim/vim/commit/210b39c2d686d875e2464ca1f42131453dc6bd41 Co-authored-by: Peter Aronoff --- runtime/doc/builtin.txt | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 1a762c6ec0..8ee01d6156 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -4102,10 +4102,21 @@ line({expr} [, {winid}]) *line()* display isn't updated, e.g. in silent Ex mode) w$ last line visible in current window (this is one less than "w0" if no lines are visible) - v In Visual mode: the start of the Visual area (the - cursor is the end). When not in Visual mode - returns the cursor position. Differs from |'<| in - that it's updated right away. + v When not in Visual mode, returns the cursor + position. In Visual mode, returns the other end + of the Visual area. A good way to think about + this is that in Visual mode "v" and "." complement + each other. While "." refers to the cursor + position, "v" refers to where |v_o| would move the + cursor. As a result, you can use "v" and "." + together to work on all of a selection in + characterwise visual mode. If the cursor is at + the end of a characterwise visual area, "v" refers + to the start of the same visual area. And if the + cursor is at the start of a characterwise visual + area, "v" refers to the end of the same visual + area. "v" differs from |'<| and |'>| in that it's + updated right away. Note that a mark in another file can be used. The line number then applies to another buffer. To get the column number use |col()|. To get both use -- cgit From 3e09fbdf82a181f1c0be1513fd50a17bf5b0a754 Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Tue, 11 Jun 2024 11:10:34 -0500 Subject: feat(highlight): add StatusLineTerm and StatusLineTermNC groups These highlight groups are used for the statusline in :terminal windows. By default they link to StatusLine and StatusLineNC (respectively), so there is no visual difference unless a colorscheme defines these groups separately. --- runtime/doc/syntax.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 8e38827e87..1b981da2fc 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -5107,6 +5107,11 @@ SpellRare Word that is recognized by the spellchecker as one that is StatusLine Status line of current window. *hl-StatusLineNC* StatusLineNC Status lines of not-current windows. + *hl-StatusLineTerm* +StatusLineTerm Status line of |terminal| window. + *hl-StatusLineTermNC* +StatusLineTermNC + Status line of non-current |terminal| window. *hl-TabLine* TabLine Tab pages line, not active tab page label. *hl-TabLineFill* -- cgit From d38912b59f97a4da0a2d0a24af226e6dd27e9b2c Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Tue, 11 Jun 2024 11:10:34 -0500 Subject: refactor(terminal): move :terminal defaults to _defaults.lua --- runtime/doc/news.txt | 2 ++ runtime/doc/syntax.txt | 2 +- runtime/doc/vim_diff.txt | 21 ++++++++++----------- 3 files changed, 13 insertions(+), 12 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 455b38b5fa..4addbf84c3 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -140,6 +140,8 @@ TERMINAL • The |terminal| now understands the OSC 52 escape sequence to write to the system clipboard (copy). Querying with OSC 52 (paste) is not supported. +• |hl-StatusLineTerm| and |hl-StatusLineTermNC| define highlights for the + status line in |terminal| windows. TREESITTER diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 1b981da2fc..9fc415a158 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -5111,7 +5111,7 @@ StatusLineNC Status lines of not-current windows. StatusLineTerm Status line of |terminal| window. *hl-StatusLineTermNC* StatusLineTermNC - Status line of non-current |terminal| window. + Status line of non-current |terminal| windows. *hl-TabLine* TabLine Tab pages line, not active tab page label. *hl-TabLineFill* diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index ac20948f14..a6f08402f6 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -166,6 +166,14 @@ nvim_terminal: when 'background' is "light". While this may not reflect the actual foreground/background color, it permits 'background' to be retained for a nested Nvim instance running in the terminal emulator. +- TermOpen: Sets default options for |terminal| buffers: + - 'nomodifiable' + - 'undolevels' set to -1 + - 'textwidth' set to 0 + - 'nowrap' + - 'nolist' + - 'winhighlight' uses |hl-StatusLineTerm| and |hl-StatusLineTermNC| in + place of |hl-StatusLine| and |hl-StatusLineNC| nvim_cmdwin: - CmdwinEnter: Limits syntax sync to maxlines=1 in the |cmdwin|. @@ -538,6 +546,8 @@ Highlight groups: - 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|). +- |hl-StatusLineTerm| |hl-StatusLineTermNC| are implemented as 'winhighlight' + window-local highlights which are set by the default |TermOpen| handler. Macro (|recording|) behavior: - Replay of a macro recorded during :lmap produces the same actions as when it @@ -665,17 +675,6 @@ Events: - *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 - hi StatusLineTerm ctermfg=black ctermbg=green - hi StatusLineTermNC ctermfg=green - autocmd TermOpen,WinEnter * if &buftype=='terminal' - \|setlocal winhighlight=StatusLine:StatusLineTerm,StatusLineNC:StatusLineTermNC - \|else|setlocal winhighlight=|endif -< - Options: - *'aleph'* *'al'* - antialias -- cgit From fab3d4721ffb5109c2c30633605af30d37d7d229 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 13 Jun 2024 04:31:59 +0800 Subject: vim-patch:02f3eba: runtime(doc): deduplicate getpos(), line(), col(), virtcol() Move the main description to getpos() and link to that from the other functions. closes: vim/vim#14970 https://github.com/vim/vim/commit/02f3ebacfbfa1f892347d7532278f24620e68300 --- runtime/doc/builtin.txt | 113 +++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 59 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 8ee01d6156..7ccfe2f1b3 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -701,33 +701,31 @@ clearmatches([{win}]) *clearmatches()* col({expr} [, {winid}]) *col()* The result is a Number, which is the byte index of the column - position given with {expr}. The accepted positions are: - . the cursor position - $ the end of the cursor line (the result is the - number of bytes in the cursor line plus one) - 'x position of mark x (if the mark is not set, 0 is - returned) - v In Visual mode: the start of the Visual area (the - cursor is the end). When not in Visual mode - returns the cursor position. Differs from |'<| in - that it's updated right away. + position given with {expr}. + For accepted positions see |getpos()|. Additionally {expr} can be [lnum, col]: a |List| with the line and column number. Most useful when the column is "$", to get the last column of a specific line. When "lnum" or "col" is out of range then col() returns zero. + With the optional {winid} argument the values are obtained for that window instead of the current window. + To get the line number use |line()|. To get both use |getpos()|. + For the screen column position use |virtcol()|. For the character position use |charcol()|. + Note that only marks in the current file can be used. + Examples: >vim echo col(".") " column of cursor echo col("$") " length of cursor line plus one echo col("'t") " column of mark t echo col("'" .. markname) " column of mark markname -< The first column is 1. Returns 0 if {expr} is invalid or when +< + The first column is 1. Returns 0 if {expr} is invalid or when the window with ID {winid} is not found. For an uppercase mark the column may actually be in another buffer. @@ -2739,9 +2737,34 @@ getpid() *getpid()* This is a unique number, until Vim exits. getpos({expr}) *getpos()* - Get the position for String {expr}. For possible values of - {expr} see |line()|. For getting the cursor position see - |getcurpos()|. + Get the position for String {expr}. + The accepted values for {expr} are: + . The cursor position. + $ The last line in the current buffer. + 'x Position of mark x (if the mark is not set, 0 is + returned). + w0 First line visible in current window (one if the + display isn't updated, e.g. in silent Ex mode). + w$ Last line visible in current window (this is one + less than "w0" if no lines are visible). + v When not in Visual mode, returns the cursor + position. In Visual mode, returns the other end + of the Visual area. A good way to think about + this is that in Visual mode "v" and "." complement + each other. While "." refers to the cursor + position, "v" refers to where |v_o| would move the + cursor. As a result, you can use "v" and "." + together to work on all of a selection in + characterwise Visual mode. If the cursor is at + the end of a characterwise Visual area, "v" refers + to the start of the same Visual area. And if the + cursor is at the start of a characterwise Visual + area, "v" refers to the end of the same Visual + area. "v" differs from |'<| and |'>| in that it's + updated right away. + Note that a mark in another file can be used. The line number + then applies to another buffer. + The result is a |List| with four numbers: [bufnum, lnum, col, off] "bufnum" is zero, unless a mark like '0 or 'A is used, then it @@ -2752,19 +2775,24 @@ getpos({expr}) *getpos()* it is the offset in screen columns from the start of the character. E.g., a position within a or after the last character. - Note that for '< and '> Visual mode matters: when it is "V" - (visual line mode) the column of '< is zero and the column of - '> is a large number equal to |v:maxcol|. + + For getting the cursor position see |getcurpos()|. The column number in the returned List is the byte position within the line. To get the character position in the line, use |getcharpos()|. + + Note that for '< and '> Visual mode matters: when it is "V" + (visual line mode) the column of '< is zero and the column of + '> is a large number equal to |v:maxcol|. A very large column number equal to |v:maxcol| can be returned, in which case it means "after the end of the line". If {expr} is invalid, returns a list with all zeros. + This can be used to save and restore the position of a mark: >vim let save_a_mark = getpos("'a") " ... call setpos("'a", save_a_mark) + < Also see |getcharpos()|, |getcurpos()| and |setpos()|. getqflist([{what}]) *getqflist()* @@ -4091,39 +4119,16 @@ libcallnr({libname}, {funcname}, {argument}) *libcallnr()* < line({expr} [, {winid}]) *line()* - The result is a Number, which is the line number of the file - position given with {expr}. The {expr} argument is a string. - The accepted positions are: - . the cursor position - $ the last line in the current buffer - 'x position of mark x (if the mark is not set, 0 is - returned) - w0 first line visible in current window (one if the - display isn't updated, e.g. in silent Ex mode) - w$ last line visible in current window (this is one - less than "w0" if no lines are visible) - v When not in Visual mode, returns the cursor - position. In Visual mode, returns the other end - of the Visual area. A good way to think about - this is that in Visual mode "v" and "." complement - each other. While "." refers to the cursor - position, "v" refers to where |v_o| would move the - cursor. As a result, you can use "v" and "." - together to work on all of a selection in - characterwise visual mode. If the cursor is at - the end of a characterwise visual area, "v" refers - to the start of the same visual area. And if the - cursor is at the start of a characterwise visual - area, "v" refers to the end of the same visual - area. "v" differs from |'<| and |'>| in that it's - updated right away. - Note that a mark in another file can be used. The line number - then applies to another buffer. + See |getpos()| for accepted positions. + To get the column number use |col()|. To get both use |getpos()|. + With the optional {winid} argument the values are obtained for that window instead of the current window. + Returns 0 for invalid values of {expr} and {winid}. + Examples: >vim echo line(".") " line number of the cursor echo line(".", winid) " idem, in window "winid" @@ -8746,7 +8751,7 @@ virtcol({expr} [, {list} [, {winid}]]) *virtcol()* set to 8, it returns 8. |conceal| is ignored. For the byte position use |col()|. - For the use of {expr} see |col()|. + For the use of {expr} see |getpos()| and |col()|. When 'virtualedit' is used {expr} can be [lnum, col, off], where "off" is the offset in screen columns from the start of @@ -8756,18 +8761,6 @@ virtcol({expr} [, {list} [, {winid}]]) *virtcol()* beyond the end of the line can be returned. Also see |'virtualedit'| - The accepted positions are: - . the cursor position - $ the end of the cursor line (the result is the - number of displayed characters in the cursor line - plus one) - 'x position of mark x (if the mark is not set, 0 is - returned) - v In Visual mode: the start of the Visual area (the - cursor is the end). When not in Visual mode - returns the cursor position. Differs from |'<| in - that it's updated right away. - If {list} is present and non-zero then virtcol() returns a List with the first and last screen position occupied by the character. @@ -8786,7 +8779,9 @@ virtcol({expr} [, {list} [, {winid}]]) *virtcol()* " With text " there", with 't at 'h': echo virtcol("'t") " returns 6 -< The first column is 1. 0 or [0, 0] is returned for an error. +< + The first column is 1. 0 or [0, 0] is returned for an error. + A more advanced example that echoes the maximum length of all lines: >vim echo max(map(range(1, line('$')), "virtcol([v:val, '$'])")) -- cgit From 6ba152168787e2cf7d197d8f2d682daaca0c94cf Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 14 Jun 2024 04:45:12 +0800 Subject: vim-patch:d353d27: runtime(doc): restore description of "$" in col() and virtcol() (vim/vim#14981) These are different from line() and getpos(). https://github.com/vim/vim/commit/d353d2782032b91498601afefee4256592f48074 --- runtime/doc/builtin.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 7ccfe2f1b3..1472296bd9 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -703,6 +703,8 @@ col({expr} [, {winid}]) *col()* The result is a Number, which is the byte index of the column position given with {expr}. For accepted positions see |getpos()|. + When {expr} is "$", it means the end of the cursor line, so + the result is the number of bytes in the cursor line plus one. Additionally {expr} can be [lnum, col]: a |List| with the line and column number. Most useful when the column is "$", to get the last column of a specific line. When "lnum" or "col" is @@ -2742,7 +2744,7 @@ getpos({expr}) *getpos()* . The cursor position. $ The last line in the current buffer. 'x Position of mark x (if the mark is not set, 0 is - returned). + returned for all values). w0 First line visible in current window (one if the display isn't updated, e.g. in silent Ex mode). w$ Last line visible in current window (this is one @@ -2792,8 +2794,8 @@ getpos({expr}) *getpos()* let save_a_mark = getpos("'a") " ... call setpos("'a", save_a_mark) - -< Also see |getcharpos()|, |getcurpos()| and |setpos()|. +< + Also see |getcharpos()|, |getcurpos()| and |setpos()|. getqflist([{what}]) *getqflist()* Returns a |List| with all the current quickfix errors. Each @@ -8752,6 +8754,8 @@ virtcol({expr} [, {list} [, {winid}]]) *virtcol()* For the byte position use |col()|. For the use of {expr} see |getpos()| and |col()|. + When {expr} is "$", it means the end of the cursor line, so + the result is the number of cells in the cursor line plus one. When 'virtualedit' is used {expr} can be [lnum, col, off], where "off" is the offset in screen columns from the start of -- cgit From dc4037f612c6f3bbc76890adfa638d48ec238eee Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 13 Jun 2024 14:08:50 +0800 Subject: vim-patch:9.1.0476: Cannot see matched text in popup menu Problem: Cannot see matched text in popup menu Solution: Introduce 2 new highlighting groups: PmenuMatch and PmenuMatchSel (glepnir) closes: vim/vim#14694 https://github.com/vim/vim/commit/40c1c3317d92f8c2adadf744fab72e4458e2a9fa Co-authored-by: glepnir --- runtime/doc/syntax.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 9fc415a158..ac4dc6286c 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -5076,6 +5076,11 @@ PmenuExtraSel Popup menu: Selected item "extra text". PmenuSbar Popup menu: Scrollbar. *hl-PmenuThumb* PmenuThumb Popup menu: Thumb of the scrollbar. + *hl-PmenuMatch* +PmenuMatch Popup menu: Matched text in normal item + *hl-PmenuMatchSel* +PmenuMatchSel Popup menu: Matched text in selected item + *hl-Question* Question |hit-enter| prompt and yes/no questions. *hl-QuickFixLine* -- cgit From e2ef5330252b3b52b816503cdcb01934b68f43a0 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 14 Jun 2024 04:28:41 +0800 Subject: vim-patch:9.1.0479: fuzzy_match_str_with_pos() does unnecessary list operations Problem: fuzzy_match_str_with_pos() does unnecessary list operations. Solution: Use fuzzy_match() directly (zeertzjq). closes: vim/vim#14987 https://github.com/vim/vim/commit/2f95ca9fcef8495d60e298ac2cd6d702b90bfb18 N/A patch: vim-patch:9.1.0478: potential deref of NULL pointer in fuzzy_match_str_with_pos --- runtime/doc/syntax.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index ac4dc6286c..53c8846a85 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -5080,7 +5080,6 @@ PmenuThumb Popup menu: Thumb of the scrollbar. PmenuMatch Popup menu: Matched text in normal item *hl-PmenuMatchSel* PmenuMatchSel Popup menu: Matched text in selected item - *hl-Question* Question |hit-enter| prompt and yes/no questions. *hl-QuickFixLine* -- cgit From f557a985ef47057398899a7270beb26e8f71771c Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 15 Jun 2024 06:04:13 +0800 Subject: vim-patch:d6d4e13: runtime(doc): rewrite mkdir() doc and simplify {flags} meaning related: vim/vim#14991 https://github.com/vim/vim/commit/d6d4e1333659c0d2acee3133819498d014df47de Co-authored-by: Christian Brabandt --- runtime/doc/builtin.txt | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 1472296bd9..3740bcf5db 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -4994,17 +4994,14 @@ mkdir({name} [, {flags} [, {prot}]]) *mkdir()* *E73 When {flags} is present it must be a string. An empty string has no effect. - If {flags} contains "p" then intermediate directories are - created as necessary. - - If {flags} contains "D" then {name} is deleted at the end of - the current function, as with: >vim - defer delete({name}, 'd') -< - If {flags} contains "R" then {name} is deleted recursively at - the end of the current function, as with: >vim - defer delete({name}, 'rf') -< Note that when {name} has more than one part and "p" is used + {flags} can contain these character flags: + "p" intermediate directories will be created as necessary + "D" {name} will be deleted at the end of the current + function, but not recursively |defer| + "R" {name} will be deleted recursively at the end of the + current function |defer| + + Note that when {name} has more than one part and "p" is used some directories may already exist. Only the first one that is created and what it contains is scheduled to be deleted. E.g. when using: >vim -- cgit From b969e3e0b994db8bf5a5aba498f36ae4ab2555c1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 15 Jun 2024 06:08:45 +0800 Subject: vim-patch:c509c00: runtime(doc): fix wrong helptag for :defer https://github.com/vim/vim/commit/c509c009bbc07eff678a9239a5813398e180f019 Co-authored-by: Christian Brabandt --- 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 3740bcf5db..edf12a1a6d 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -4997,9 +4997,9 @@ mkdir({name} [, {flags} [, {prot}]]) *mkdir()* *E73 {flags} can contain these character flags: "p" intermediate directories will be created as necessary "D" {name} will be deleted at the end of the current - function, but not recursively |defer| + function, but not recursively |:defer| "R" {name} will be deleted recursively at the end of the - current function |defer| + current function |:defer| Note that when {name} has more than one part and "p" is used some directories may already exist. Only the first one that -- cgit From 6e28589e00a32045d5a62654151299802e40fdb0 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 15 Jun 2024 01:04:27 +0200 Subject: docs: misc (#29229) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ilia Choly Co-authored-by: Jose Pedro Oliveira Co-authored-by: Maria José Solano Co-authored-by: zeertzjq --- runtime/doc/api.txt | 6 +++--- runtime/doc/builtin.txt | 38 +++++++++++++++++++------------------- runtime/doc/lsp.txt | 2 +- runtime/doc/syntax.txt | 4 +--- runtime/doc/treesitter.txt | 2 ++ 5 files changed, 26 insertions(+), 26 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index f92a69af4e..a7b59f20bc 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -2800,7 +2800,7 @@ nvim_set_decoration_provider({ns_id}, {opts}) Note: this function should not be called often. Rather, the callbacks themselves can be used to throttle unneeded callbacks. the `on_start` callback can return `false` to disable the provider until the next redraw. - Similarly, return `false` in `on_win` will skip the `on_lines` calls for + Similarly, return `false` in `on_win` will skip the `on_line` calls for that window (but any extmarks set in `on_win` will still be used). A plugin managing multiple sources of decoration should ideally only set one provider, and merge the sources internally. You can use multiple `ns_id` @@ -2809,10 +2809,10 @@ nvim_set_decoration_provider({ns_id}, {opts}) Note: doing anything other than setting extmarks is considered experimental. Doing things like changing options are not explicitly forbidden, but is likely to have unexpected consequences (such as 100% CPU - consumption). doing `vim.rpcnotify` should be OK, but `vim.rpcrequest` is + consumption). Doing `vim.rpcnotify` should be OK, but `vim.rpcrequest` is quite dubious for the moment. - Note: It is not allowed to remove or update extmarks in 'on_line' + Note: It is not allowed to remove or update extmarks in `on_line` callbacks. Attributes: ~ diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index edf12a1a6d..1e0df1918b 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -2993,8 +2993,8 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()* difference if the buffer is displayed in a window with different 'virtualedit' or 'list' values. - Examples: > - :xnoremap + Examples: >vim + xnoremap \ echom getregion( \ getpos('v'), getpos('.'), #{ type: mode() }) < @@ -4647,19 +4647,19 @@ matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict}]) *matchbufline()* Examples: >vim " Assuming line 3 in buffer 5 contains "a" - :echo matchbufline(5, '\<\k\+\>', 3, 3) - [{'lnum': 3, 'byteidx': 0, 'text': 'a'}] + echo matchbufline(5, '\<\k\+\>', 3, 3) +< `[{'lnum': 3, 'byteidx': 0, 'text': 'a'}]` >vim " Assuming line 4 in buffer 10 contains "tik tok" - :echo matchbufline(10, '\<\k\+\>', 1, 4) - [{'lnum': 4, 'byteidx': 0, 'text': 'tik'}, {'lnum': 4, 'byteidx': 4, 'text': 'tok'}] -< + echo matchbufline(10, '\<\k\+\>', 1, 4) +< `[{'lnum': 4, 'byteidx': 0, 'text': 'tik'}, {'lnum': 4, 'byteidx': 4, 'text': 'tok'}]` + If {submatch} is present and is v:true, then submatches like "\1", "\2", etc. are also returned. Example: >vim " Assuming line 2 in buffer 2 contains "acd" - :echo matchbufline(2, '\(a\)\?\(b\)\?\(c\)\?\(.*\)', 2, 2 + echo matchbufline(2, '\(a\)\?\(b\)\?\(c\)\?\(.*\)', 2, 2 \ {'submatches': v:true}) - [{'lnum': 2, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}] -< The "submatches" List always contains 9 items. If a submatch +< `[{'lnum': 2, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]` + The "submatches" List always contains 9 items. If a submatch is not found, then an empty string is returned for that submatch. @@ -4819,17 +4819,17 @@ matchstrlist({list}, {pat} [, {dict}]) *matchstrlist()* option settings on the pattern. Example: >vim - :echo matchstrlist(['tik tok'], '\<\k\+\>') - [{'idx': 0, 'byteidx': 0, 'text': 'tik'}, {'idx': 0, 'byteidx': 4, 'text': 'tok'}] - :echo matchstrlist(['a', 'b'], '\<\k\+\>') - [{'idx': 0, 'byteidx': 0, 'text': 'a'}, {'idx': 1, 'byteidx': 0, 'text': 'b'}] -< + echo matchstrlist(['tik tok'], '\<\k\+\>') +< `[{'idx': 0, 'byteidx': 0, 'text': 'tik'}, {'idx': 0, 'byteidx': 4, 'text': 'tok'}]` >vim + echo matchstrlist(['a', 'b'], '\<\k\+\>') +< `[{'idx': 0, 'byteidx': 0, 'text': 'a'}, {'idx': 1, 'byteidx': 0, 'text': 'b'}]` + If "submatches" is present and is v:true, then submatches like "\1", "\2", etc. are also returned. Example: >vim - :echo matchstrlist(['acd'], '\(a\)\?\(b\)\?\(c\)\?\(.*\)', + echo matchstrlist(['acd'], '\(a\)\?\(b\)\?\(c\)\?\(.*\)', \ #{submatches: v:true}) - [{'idx': 0, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}] -< The "submatches" List always contains 9 items. If a submatch +< `[{'idx': 0, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]` + The "submatches" List always contains 9 items. If a submatch is not found, then an empty string is returned for that submatch. @@ -6054,7 +6054,7 @@ screencol() *screencol()* the following mappings: >vim nnoremap GG ":echom " .. screencol() .. "\n" nnoremap GG :echom screencol() - noremap GG echom screencol() + noremap GG echom screencol() < screenpos({winid}, {lnum}, {col}) *screenpos()* diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index ca9dfd0350..7b5eee0a14 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1679,7 +1679,7 @@ is_enabled({filter}) *vim.lsp.inlay_hint.is_enabled()* Query whether inlay hint is enabled in the {filter}ed scope Parameters: ~ - • {filter} (`table`) Optional filters |kwargs|, or `nil` for all. + • {filter} (`table?`) Optional filters |kwargs|, or `nil` for all. • {bufnr} (`integer?`) Buffer number, or 0 for current buffer, or nil for all. diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 53c8846a85..4a1588a910 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -5014,7 +5014,6 @@ IncSearch 'incsearch' highlighting; also used for the text replaced with ":s///c". *hl-Substitute* Substitute |:substitute| replacement text highlighting. - *hl-LineNr* LineNr Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set. @@ -5034,7 +5033,6 @@ CursorLineSign Like SignColumn when 'cursorline' is set for the cursor line. *hl-MatchParen* MatchParen Character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt| - *hl-ModeMsg* ModeMsg 'showmode' message (e.g., "-- INSERT --"). *hl-MsgArea* @@ -5084,7 +5082,7 @@ PmenuMatchSel Popup menu: Matched text in selected item Question |hit-enter| prompt and yes/no questions. *hl-QuickFixLine* QuickFixLine Current |quickfix| item in the quickfix window. Combined with - |hl-CursorLine| when the cursor is there. + |hl-CursorLine| when the cursor is there. *hl-Search* Search Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out. diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 25b070b310..ed514cb722 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -22,9 +22,11 @@ search for in the `parser` runtime directory. Nvim includes these parsers: +- Bash - C - Lua - Markdown +- Python - Vimscript - Vimdoc - Treesitter query files |ft-query-plugin| -- cgit From c5e3321aa14d323cb91a69de42ec0d66bef58a30 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 15 Jun 2024 22:26:36 +0800 Subject: vim-patch:f4bc59c: runtime(doc): add another tag for vim-shebang feature (#29356) related: vim/vim#15011 https://github.com/vim/vim/commit/f4bc59c4f67786e967db48e944c2cce2c0da8dc1 Co-authored-by: Christian Brabandt --- runtime/doc/various.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 0287271d4c..63fca2c1aa 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -140,7 +140,7 @@ gx Opens the current filepath or URL (decided by :[range]# [count] [flags] synonym for :number. - *:#!* + *:#!* *vim-shebang* :#!{anything} Ignored, so that you can start a Vim script with: > #!vim -S echo "this is a Vim script" -- cgit From 7e65f3757bdbe41bbf022b05b6869ad6e7febe0d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 16 Jun 2024 06:08:36 +0800 Subject: docs: document 'list' behavior when 'listchars' excludes "tab" (#29360) --- runtime/doc/options.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index f02d3c9741..d0c2f20685 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -3842,6 +3842,9 @@ A jump table for the options with a short description can be found at |Q_op|. between tabs and spaces and for trailing blanks. Further changed by the 'listchars' option. + When 'listchars' does not contain "tab" field, tabs are shown as "^I" + or "<09>", like how unprintable characters are displayed. + The cursor is displayed at the start of the space a Tab character occupies, not at the end as usual in Normal mode. To get this cursor position while displaying Tabs with spaces, use: >vim -- cgit From ad70c9892d5b5ebcc106742386c99524f074bcea Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Sat, 15 Jun 2024 05:46:43 +0200 Subject: feat(column)!: rework 'statuscolumn' %r/l items Problem: A custom 'statuscolumn' needs to check a bunch of options and placed signs to replicate the default number column. Solution: Rework %l item to include the necessary logic to mimic the default number column. Remove now redundant %r item. --- runtime/doc/news.txt | 5 ++++- runtime/doc/options.txt | 10 +++------- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 4addbf84c3..848a642774 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -62,7 +62,10 @@ LUA OPTIONS -• TODO +• The 'statuscolumn' `%l` item can now be used as a number column segment that + changes according to related options. It takes care of alignment, 'number', + 'relativenumber' and 'signcolumn' set to "number". The now redundant `%r` item + is no longer treated specially for 'statuscolumn'. PLUGINS diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index f02d3c9741..244465ed6e 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -5951,8 +5951,7 @@ A jump table for the options with a short description can be found at |Q_op|. Some of the items from the 'statusline' format are different for 'statuscolumn': - %l line number of currently drawn line - %r relative line number of currently drawn line + %l line number column for currently drawn line %s sign column for currently drawn line %C fold column for currently drawn line @@ -5979,11 +5978,8 @@ A jump table for the options with a short description can be found at |Q_op|. handler should be written with this in mind. Examples: >vim - " Relative number with bar separator and click handlers: - set statuscolumn=%@SignCb@%s%=%T%@NumCb@%r│%T - - " Right aligned relative cursor line number: - let &stc='%=%{v:relnum?v:relnum:v:lnum} ' + " Line number with bar separator and click handlers: + set statuscolumn=%@SignCb@%s%=%T%@NumCb@%l│%T " Line numbers in hexadecimal for non wrapped part of lines: let &stc='%=%{v:virtnum>0?"":printf("%x",v:lnum)} ' -- cgit From c3cb56d8ec2cab6842a8678c84d7fed4776822ca Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 16 Jun 2024 17:00:30 +0200 Subject: vim-patch:0ddab58: runtime(java): Add a config variable for commonly used compiler options The value of g:javac_makeprg_params, if set, is added to the value of 'makeprg' as an option string. closes: vim/vim#14999 https://github.com/vim/vim/commit/0ddab582fa13d1d653800494e45ecfba00974a18 Co-authored-by: Doug Kearns --- runtime/doc/quickfix.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 897e503fc4..9ac7492b9b 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1288,6 +1288,13 @@ g:compiler_gcc_ignore_unmatched_lines commands run from make are generating false positives. +JAVAC *compiler-javac* + +Commonly used compiler options can be added to 'makeprg' by setting the +g:javac_makeprg_params variable. For example: > + let g:javac_makeprg_params = "-Xlint:all -encoding utf-8" +< + PANDOC *quickfix-pandoc* *compiler-pandoc* The Pandoc compiler plugin expects that an output file type extension is -- cgit From c429c5f86fb8286bbb28e96985d9cc212155201b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 18 Jun 2024 05:49:33 +0800 Subject: vim-patch:9.1.0495: Matched text isn't highlighted in cmdline pum Problem: Matched text isn't highlighted in cmdline pum. Solution: Use cmdline completion pattern in cmdline mode. (zeertzjq) closes: vim/vim#15029 https://github.com/vim/vim/commit/d8c9340fc67ca19f82ec3e77ec38296424e758cf Cherry-pick syntax.txt change from runtime update. --- runtime/doc/syntax.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 4a1588a910..e73d5d442f 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -5075,9 +5075,9 @@ PmenuSbar Popup menu: Scrollbar. *hl-PmenuThumb* PmenuThumb Popup menu: Thumb of the scrollbar. *hl-PmenuMatch* -PmenuMatch Popup menu: Matched text in normal item +PmenuMatch Popup menu: Matched text in normal item. *hl-PmenuMatchSel* -PmenuMatchSel Popup menu: Matched text in selected item +PmenuMatchSel Popup menu: Matched text in selected item. *hl-Question* Question |hit-enter| prompt and yes/no questions. *hl-QuickFixLine* -- cgit From a46991e1c6ff769d2381d87886ac4f7397ab25c3 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 18 Jun 2024 07:00:32 +0800 Subject: docs(news): fix inconsistencies (#29381) --- runtime/doc/lua.txt | 4 ++-- runtime/doc/news.txt | 23 ++++++++++------------- 2 files changed, 12 insertions(+), 15 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 3bfd1d1885..39a047cbab 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -4330,7 +4330,7 @@ vim.snippet.active({filter}) *vim.snippet.active()* 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)' + return 'lua vim.snippet.jump(1)' else return '' end @@ -4364,7 +4364,7 @@ vim.snippet.jump({direction}) *vim.snippet.jump()* 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)' + return 'lua vim.snippet.jump(1)' else return '' end diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 848a642774..4f9f0248df 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -90,27 +90,28 @@ API DEFAULTS -• 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()| +• Mappings: + • |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()| • Snippet: - - `` in Insert and Select mode maps to |vim.snippet.jump({ direction = 1 })| + • `` in Insert and Select mode maps to `vim.snippet.jump({ direction = 1 })` when a snippet is active and jumpable forwards. - - `` in Insert and Select mode maps to |vim.snippet.jump({ direction = -1 })| + • `` in Insert and Select mode maps to `vim.snippet.jump({ direction = -1 })` when a snippet is active and jumpable backwards. EDITOR -* On Windows, filename arguments on the command-line prefixed with "~\" or +• On Windows, filename arguments on the command-line prefixed with "~\" or "~/" are now expanded to the user's profile directory, not a relative path to a literal "~" directory. EVENTS -• TODO +• |CompleteDone| now sets the `reason` key in `v:event` which specifies the reason + for completion being done. LSP @@ -158,10 +159,6 @@ UI • TODO - -• |CompleteDone| now sets the `reason` key in `v:event` which specifies the reason - for completion being done. - ============================================================================== CHANGED FEATURES *news-changed* -- cgit From 7ce261c064e921467e200f20318b9efbacc75eba Mon Sep 17 00:00:00 2001 From: Yi Ming Date: Tue, 18 Jun 2024 07:04:40 +0800 Subject: docs(lsp): format the handwritten part #29295 --- runtime/doc/lsp.txt | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 7b5eee0a14..ba826f5f7e 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -220,26 +220,26 @@ Each response handler has this signature: > function(err, result, ctx, config) < Parameters: ~ - - {err} (table|nil) Error info dict, or `nil` if the request - completed. - - {result} (Result | Params | nil) `result` key of the |lsp-response| or - `nil` if the request failed. - - {ctx} (table) Table of calling state associated with the - handler, with these keys: - - {method} (string) |lsp-method| name. - - {client_id} (number) |vim.lsp.Client| identifier. - - {bufnr} (Buffer) Buffer handle. - - {params} (table|nil) Request parameters table. - - {version} (number) Document version at time of - request. Handlers can compare this to the - current document version to check if the - response is "stale". See also |b:changedtick|. - - {config} (table) Handler-defined configuration table, which allows - users to customize handler behavior. - For an example, see: - |vim.lsp.diagnostic.on_publish_diagnostics()| - To configure a particular |lsp-handler|, see: - |lsp-handler-configuration| + • {err} (`table|nil`) Error info dict, or `nil` if the request + completed. + • {result} (`Result|Params|nil`) `result` key of the |lsp-response| or + `nil` if the request failed. + • {ctx} (`table`) Table of calling state associated with the + handler, with these keys: + • {method} (`string`) |lsp-method| name. + • {client_id} (`number`) |vim.lsp.Client| identifier. + • {bufnr} (`Buffer`) Buffer handle. + • {params} (`table|nil`) Request parameters table. + • {version} (`number`) Document version at time of + request. Handlers can compare this to the + current document version to check if the + response is "stale". See also |b:changedtick|. + • {config} (`table`) Handler-defined configuration table, which allows + users to customize handler behavior. + For an example, see: + |vim.lsp.diagnostic.on_publish_diagnostics()| + To configure a particular |lsp-handler|, see: + |lsp-handler-configuration| Returns: ~ Two values `result, err` where `err` is shaped like an RPC error: > -- cgit From 9d200c78a5e97720ba8a697c4cc0990fdafbc39f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 18 Jun 2024 07:11:17 +0800 Subject: vim-patch:ca47114: runtime(doc): improve the vim-shebang example (#29382) https://github.com/vim/vim/commit/ca471145321fa8089071330b7637ad3950ac4f11 Co-authored-by: Christian Brabandt --- runtime/doc/various.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 63fca2c1aa..9afb871d93 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -143,9 +143,15 @@ gx Opens the current filepath or URL (decided by *:#!* *vim-shebang* :#!{anything} Ignored, so that you can start a Vim script with: > #!vim -S - echo "this is a Vim script" - quit + let mylogbook='$HOME/logbook.md' + exe $':e {mylogbook}' + $ + put ='## ' .. strftime('%d. %b %Y') + norm! o < + Make that script executable and run it to create a + new diary entry. + *:z* *E144* :[range]z[+-^.=][count] Display several lines of text surrounding the line specified with [range], or around the current line -- cgit From 2791fd4e1722fd45fa0f4261879046e8d397645a Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 18 Jun 2024 19:44:46 +0200 Subject: vim-patch:26de90c: runtime(nohlsearch): include the the simple nohlsearch package fixes: vim/vim#15039 closes: vim/vim#15042 https://github.com/vim/vim/commit/26de90c6312cf16d7a4f2b6942befb4e1f14b960 Co-authored-by: Maxim Kim --- runtime/doc/pattern.txt | 6 +++++- runtime/doc/usr_05.txt | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 67ef769203..8ec02276cc 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -141,13 +141,17 @@ CTRL-C Interrupt current (search) command. executing autocommands |autocmd-searchpat|. Same thing for when invoking a user function. + While typing the search pattern the current match will be shown if the 'incsearch' option is on. Remember that you still have to finish the search command with to actually position the cursor at the displayed match. Or use to abandon the search. + *nohlsearch-auto* All matches for the last used search pattern will be highlighted if you set -the 'hlsearch' option. This can be suspended with the |:nohlsearch| command. +the 'hlsearch' option. This can be suspended with the |:nohlsearch| command +or auto suspended with nohlsearch plugin. See |nohlsearch-install|. + When 'shortmess' does not include the "S" flag, Vim will automatically show an index, on which the cursor is. This can look like this: > diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt index 076a50c582..f6324a12d5 100644 --- a/runtime/doc/usr_05.txt +++ b/runtime/doc/usr_05.txt @@ -234,6 +234,21 @@ an archive or as a repository. For an archive you can follow these steps: Here "fancytext" is the name of the package, it can be anything else. + +Adding nohlsearch package *nohlsearch-install* + +Load the plugin with this command: > + packadd nohlsearch +< +Automatically execute |:nohlsearch| after 'updatetime' or getting into |Insert| mode. +Thus assuming default updatetime, hlsearch would be suspended/turned off after +4 seconds of idle time. + +To disable the effect of the plugin after is has been loaded: > + au! nohlsearch +< + + More information about packages can be found here: |packages|. ============================================================================== -- cgit From 14aba679670a6485596c60fa5eb1df92ecae8a1b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 19 Jun 2024 07:32:53 +0800 Subject: vim-patch:8.2.4724: current instance of last search pattern not easily spotted Problem: Current instance of last search pattern not easily spotted. Solution: Add CurSearch highlighting. (closes vim/vim#10133) https://github.com/vim/vim/commit/a43993897aa372159f682df37562f159994dc85c Some code is superseded by later patches that are already ported. Co-authored-by: LemonBoy --- runtime/doc/news.txt | 2 ++ runtime/doc/syntax.txt | 5 +++-- runtime/doc/vim_diff.txt | 2 -- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 4f9f0248df..840f860e3f 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -47,6 +47,8 @@ EDITOR • The order in which signs are placed was changed. Higher priority signs will now appear left of lower priority signs. +• |hl-CurSearch| now behaves the same as Vim and no longer updates on every + cursor movement. EVENTS diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index e73d5d442f..afc230e112 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -4969,8 +4969,9 @@ ColorColumn Used for the columns set with 'colorcolumn'. Conceal Placeholder characters substituted for concealed text (see 'conceallevel'). *hl-CurSearch* -CurSearch Used for highlighting a search pattern under the cursor - (see 'hlsearch'). +CurSearch Current match for the last search pattern (see 'hlsearch'). + Note: This is correct after a search, but may get outdated if + changes are made or the screen is redrawn. *hl-Cursor* *hl-lCursor* Cursor Character under the cursor. lCursor Character under the cursor when |language-mapping| diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index a6f08402f6..a51ffcf004 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -539,8 +539,6 @@ Functions: Highlight groups: - |hl-ColorColumn|, |hl-CursorColumn| are lower priority than most other groups -- |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. -- cgit From b48192af37aa39d55e73420e3838cb63f471da99 Mon Sep 17 00:00:00 2001 From: Yinzuo Jiang Date: Wed, 19 Jun 2024 21:23:21 +0800 Subject: vim-patch:partial:9.1.0497: termdebug can be further improved Problem: termdebug can be further improved Solution: refactor save/restore, update docs, add a new save/restore test (Ubaldo Tiberi) closes: vim/vim#15032 https://github.com/vim/vim/commit/a48637c105ce5ccf6f3296958c889d15dc3faaa4 Co-authored-by: Ubaldo Tiberi --- runtime/doc/nvim_terminal_emulator.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/nvim_terminal_emulator.txt b/runtime/doc/nvim_terminal_emulator.txt index 81bcd89146..5b728078eb 100644 --- a/runtime/doc/nvim_terminal_emulator.txt +++ b/runtime/doc/nvim_terminal_emulator.txt @@ -462,6 +462,9 @@ If there is no g:termdebug_config you can use: >vim let g:termdebug_use_prompt = 1 < Mappings ~ +The termdebug plugin enables a few default mappings. All those mappings +are reset to their original values once the termdebug session concludes. + *termdebug_map_K* *termdebug-mappings* The K key is normally mapped to |:Evaluate| unless a buffer local (|:map-local|) mapping to K already exists. If you do not want this use: >vim -- cgit From ceea6898a8bdcb6c4cfe06b8dc4739c144e6b1f8 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 19 Jun 2024 09:45:40 -0700 Subject: fix(gen_help_html): handle delimiter, heading #29415 Problem: vimdoc grammar added new forms that are not handled in our HTML generator. https://github.com/neovim/tree-sitter-vimdoc/pull/134 Solution: Update `gen_help_html.lua`. Fixes #29277 --- runtime/doc/usr_21.txt | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/usr_21.txt b/runtime/doc/usr_21.txt index 4ae72bbe84..8671f04ba2 100644 --- a/runtime/doc/usr_21.txt +++ b/runtime/doc/usr_21.txt @@ -303,21 +303,21 @@ use, and save this in a session. Then you can go back to this layout whenever you want. For example, this is a nice layout to use: > - +----------------------------------------+ - | VIM - main help file | - | | - |Move around: Use the cursor keys, or "h| - |help.txt================================| - |explorer | | - |dir |~ | - |dir |~ | - |file |~ | - |file |~ | - |file |~ | - |file |~ | - |~/=========|[No File]===================| - | | - +----------------------------------------+ + +----------------------------------------+ + | VIM - main help file | + | | + |Move around: Use the cursor keys, or "h| + |help.txt================================| + |explorer | | + |dir |~ | + |dir |~ | + |file |~ | + |file |~ | + |file |~ | + |file |~ | + |~/=========|[No File]===================| + | | + +----------------------------------------+ < This has a help window at the top, so that you can read this text. The narrow vertical window on the left contains a file explorer. This is a Vim plugin @@ -448,9 +448,9 @@ trust the files you are editing: > :set nomodeline -Use this format for the modeline: +Use this format for the modeline: > - any-text vim:set {option}={value} ... : any-text ~ + any-text vim:set {option}={value} ... : any-text The "any-text" indicates that you can put any text before and after the part that Vim will use. This allows making it look like a comment, like what was @@ -462,9 +462,9 @@ using something like "gvim:" will not work. typing the ":set" command, except that you need to insert a backslash before a colon (otherwise it would be seen as the end of the modeline). -Another example: +Another example: > - // vim:set textwidth=72 dir=c\:\tmp: use c:\tmp here ~ + // vim:set textwidth=72 dir=c\:\tmp: use c:\tmp here There is an extra backslash before the first colon, so that it's included in the ":set" command. The text after the second colon is ignored, thus a remark -- cgit From 38a1d41ac08d1fe5688cdcac1e1e181f0cd82a5f Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 19 Jun 2024 20:04:09 +0200 Subject: vim-patch:aeca717: runtime(nohlsearch): simplify mapping Use instead of with execute(...)[-1] closes: vim/vim#15047 https://github.com/vim/vim/commit/aeca7176f3b7bdc2d698938062f6cad802fea783 Co-authored-by: Maxim Kim --- runtime/doc/usr_05.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt index f6324a12d5..aa7dd8d05c 100644 --- a/runtime/doc/usr_05.txt +++ b/runtime/doc/usr_05.txt @@ -244,7 +244,7 @@ Automatically execute |:nohlsearch| after 'updatetime' or getting into |Insert| Thus assuming default updatetime, hlsearch would be suspended/turned off after 4 seconds of idle time. -To disable the effect of the plugin after is has been loaded: > +To disable the effect of the plugin after it has been loaded: > au! nohlsearch < -- cgit From af0021f990bfd9681e8889ef217d26a89fadf5f0 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 20 Jun 2024 17:45:41 +0800 Subject: vim-patch:9.1.0505: filetype: Faust files are not recognized (#29426) Problem: filetype: Faust files are not recognized Solution: Detect '*.lib' files as Faust filetype, add detection for '*.dsp' files (Faust or Make), remove '*.lib' from Cobol filetype (PowerUser64) closes: vim/vim#14894 https://github.com/vim/vim/commit/aa61b8a9087e9cd999ef07e0d87b60f43d68f2c6 Co-authored-by: PowerUser64 --- runtime/doc/filetype.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/doc') diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index eddf14014a..70bbd02790 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -147,6 +147,7 @@ variables can be used to overrule the filetype used for certain extensions: `*.csh` g:filetype_csh |ft-csh-syntax| `*.dat` g:filetype_dat `*.def` g:filetype_def + `*.dsp` g:filetype_dsp `*.f` g:filetype_f |ft-forth-syntax| `*.frm` g:filetype_frm |ft-form-syntax| `*.fs` g:filetype_fs |ft-forth-syntax| -- cgit From b923fcbaf06276051372c17177a9970c4adc8e3d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 20 Jun 2024 20:16:53 +0800 Subject: build(vim-patch.sh): don't ignore changes to version*.txt (#29425) Suggest adding them to news.txt instead. Also don't ignore changes to intro.txt and sponsor.txt, as they don't change much these days, and it's necessary to consider whether to include their changes in Nvim's intro.txt. --- runtime/doc/news-0.9.txt | 20 +++++++++++--------- runtime/doc/news.txt | 3 ++- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news-0.9.txt b/runtime/doc/news-0.9.txt index 7905d6c3e3..3b078cf2cd 100644 --- a/runtime/doc/news-0.9.txt +++ b/runtime/doc/news-0.9.txt @@ -92,7 +92,7 @@ The following new APIs or features were added. showing a text representation of the nodes in a language tree for the current buffer. -• |'statuscolumn'| option to customize the area to the side of a window, +• 'statuscolumn' option to customize the area to the side of a window, normally containing the fold, sign and number columns. This new option follows the 'statusline' syntax and can be used to transform the line numbers, create mouse click callbacks for |signs|, introduce a custom margin or separator etc. @@ -129,15 +129,17 @@ The following new APIs or features were added. • When using Nvim inside tmux 3.2 or later, the default clipboard provider will now copy to the system clipboard. |provider-clipboard| -• |'showcmdloc'| option to display the 'showcmd' information in the - status line or tab line. A new %S statusline item is available to place - the 'showcmd' text in a custom 'statusline'. Useful for when |'cmdheight'| - is set to 0. +• 'showcmdloc' option to display the 'showcmd' information in the status + line or tab line. A new %S statusline item is available to place the + 'showcmd' text in a custom 'statusline'. Useful for when 'cmdheight' is set + to 0. -• |'splitkeep'| option to control the scroll behavior of horizontal splits. +• 'splitkeep' option to control the scroll behavior of horizontal splits. -• |'diffopt'| now includes a `linematch` option to enable a second-stage diff - on individual hunks to provide much more accurate diffs. This option is also +• 'wildoptions' flag "fuzzy" enables |fuzzy-matching| during |cmdline-completion|. + +• 'diffopt' now includes a `linematch` option to enable a second-stage diff on + individual hunks to provide much more accurate diffs. This option is also available to |vim.diff()| See https://github.com/neovim/neovim/pull/14537. @@ -235,7 +237,7 @@ The following changes to existing APIs or features add new behavior. relative to the mouse. Note that the mouse doesn't update frequently without setting `vim.o.mousemoveevent = true` -• |nvim_eval_statusline()| supports evaluating the |'statuscolumn'| through a +• |nvim_eval_statusline()| supports evaluating the 'statuscolumn' through a new `opts` field: `use_statuscol_lnum`. • |nvim_buf_get_extmarks()| now accepts a -1 `ns_id` to request extmarks from diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 840f860e3f..81d2f2aa24 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -109,6 +109,7 @@ EDITOR • On Windows, filename arguments on the command-line prefixed with "~\" or "~/" are now expanded to the user's profile directory, not a relative path to a literal "~" directory. +• |hl-PmenuMatch| and |hl-PmenuMatchSel| show matched text in completion popup. EVENTS @@ -127,7 +128,7 @@ LUA OPTIONS -• TODO +• 'completeopt' flag "fuzzy" enables |fuzzy-matching| during |ins-completion|. PERFORMANCE -- cgit From 86ea42ce265a5a9df2843b04e8036268593825b9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 21 Jun 2024 06:29:13 +0800 Subject: vim-patch:9.1.0507: hard to detect cursor movement in the command line Problem: hard to detect cursor movement in the command line Solution: Add the CursorMovedC autocommand (Shougo Matsushita) closes: vim/vim#15040 https://github.com/vim/vim/commit/d09521476f41dd8dbddb25b7acd0b299f9bf94d3 Co-authored-by: Shougo Matsushita --- runtime/doc/autocmd.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index ca816851dd..d0768c6f8c 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -522,6 +522,13 @@ CursorMoved After the cursor was moved in Normal or Visual Careful: This is triggered very often, don't do anything that the user does not expect or that is slow. + *CursorMovedC* +CursorMovedC After the cursor was moved in the command + line. Be careful not to mess up the + command line, it may cause Vim to lock up. + is set to a single character, + indicating the type of command-line. + |cmdwin-char| *CursorMovedI* CursorMovedI After the cursor was moved in Insert mode. Not triggered when the popup menu is visible. -- cgit From f45403db19d888266d1cc04756bfef20a26f9f7f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 21 Jun 2024 14:11:05 +0800 Subject: vim-patch:9.1.0511: CursorMovedC triggered wrongly with setcmdpos() Problem: CursorMovedC triggered wrongly with setcmdpos() (after v9.1.0507) Solution: Remove the premature triggering. Also don't trigger when cursor didn't move. (zeertzjq) closes: vim/vim#15064 https://github.com/vim/vim/commit/bc6f96708e3678dbb27ec4192d87cf94a15d4e9a --- runtime/doc/autocmd.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index d0768c6f8c..089316aec1 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -524,7 +524,8 @@ CursorMoved After the cursor was moved in Normal or Visual that is slow. *CursorMovedC* CursorMovedC After the cursor was moved in the command - line. Be careful not to mess up the + line while the text in the command line hasn't + changed. Be careful not to mess up the command line, it may cause Vim to lock up. is set to a single character, indicating the type of command-line. -- cgit From 7306adaebc486deacf67b25a17a35272bb4b494e Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Fri, 21 Jun 2024 10:34:59 +0200 Subject: vim-patch:beb02ed: runtime(java): Optionally highlight parameterised types In the presence of parameterised types whose names begin with a capital letter and end with a less-than sign "<" that introduces a type argument or a list of comma-separated type arguments, followed by a greater-than sign ">", a variable "g:java_highlight_generics" can be defined to have some components of such types uniformly coloured (by picking highlight groups for javaGenericsC{1,2}, javaWildcardBound). For example, ------------------------------------------------------------ java.io.InputStream stream = java.io.InputStream.nullInputStream(); java.util.function.Function> updater = property -> (oldValue, newValue) -> oldValue; java.util.logging.LogManager.getLogManager() .updateConfiguration(stream, updater); ------------------------------------------------------------ Note that the diamond form and explicit type arguments do not qualify for this kind of recognition. For example, ------------------------------------------------------------ new java.util.HashSet<>().toArray(new String[0]); ------------------------------------------------------------ References: https://docs.oracle.com/javase/specs/jls/se21/html/jls-4.html#jls-4.5 https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.9 https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.12.2.1 closes: vim/vim#15050 https://github.com/vim/vim/commit/beb02ed674bc61f179c4ff71e93bdeeb44fe9c4e Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com> --- runtime/doc/syntax.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index afc230e112..3870b8d5f6 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1542,7 +1542,7 @@ Check the javaid.vim file for a list of all the packages that are supported. 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: +headers of function declarations: 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 > @@ -1560,10 +1560,14 @@ However, if you follow the Java guidelines about how functions and classes are 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 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. +If neither setting does work for you, but you would still want headers of +function declarations to be highlighted, modify the current syntax definitions +or compose new ones. + +Higher-order function types can be hard to parse by eye, so uniformly toning +down some of their components may be of value. Provided that such type names +conform to the Java naming guidelines, you may arrange it with > + :let java_highlight_generics=1 In Java 1.1 the functions System.out.println() and System.err.println() should only be used for debugging. Therefore it is possible to highlight debugging -- cgit From be999e6a0e5b251b2b37500d06636d4167334c6e Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 23 Jun 2024 12:00:49 +0200 Subject: vim-patch:01a4fb1: runtime(java): Compose "g:java_highlight_signature" and "g:java_highlight_functions" With the variables defined, distinctly highlight parts of a method declaration header: its name and parameter list parens, from its type parameters, return type, and formal parameters; and distinctly highlight parts of a lambda expression: its parameter list parens and the arrow, from its formal parameters and identifiers. closes: vim/vim#15083 https://github.com/vim/vim/commit/01a4fb104dbee6a8b7ef20394a2a7c5b49cf49ca Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com> --- runtime/doc/syntax.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 3870b8d5f6..4b49a31604 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1560,6 +1560,13 @@ However, if you follow the Java guidelines about how functions and classes are 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" +In addition, you can combine any value of "java_highlight_functions" with > + :let java_highlight_signature=1 +to have the name of a function with its parameter list parens distinctly +highlighted from its type parameters, return type, and formal parameters; and +to have the parameter list parens of a lambda expression with its arrow +distinctly highlighted from its formal parameters or identifiers. + If neither setting does work for you, but you would still want headers of function declarations to be highlighted, modify the current syntax definitions or compose new ones. -- cgit From 5581a95534e44b8714e715c925c9de2d95ae1c21 Mon Sep 17 00:00:00 2001 From: Tom Praschan <13141438+tom-anders@users.noreply.github.com> Date: Mon, 24 Jun 2024 16:54:56 +0200 Subject: feat(lsp): vim.lsp.buf.format() supports textDocument/rangesFormatting #27323 While this relies on a proposed LSP 3.18 feature, it's fully backwards compatible, so IMO there's no harm in adding this already. Looks like some servers already support for this e.g. - gopls: https://go-review.googlesource.com/c/tools/+/510235 - clangd: https://github.com/llvm/llvm-project/pull/80180 Fixes #27293 --- runtime/doc/lsp.txt | 14 +++++++++----- runtime/doc/news.txt | 3 +++ 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index ba826f5f7e..e987f266cc 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -191,6 +191,7 @@ won't run if your server doesn't support them. - textDocument/prepareTypeHierarchy - textDocument/publishDiagnostics - textDocument/rangeFormatting +- textDocument/rangesFormatting - textDocument/references - textDocument/rename - textDocument/semanticTokens/full @@ -1371,11 +1372,14 @@ format({opts}) *vim.lsp.buf.format()* (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. + • {range}? + (`{start:[integer,integer],end:[integer, integer]}|{start:[integer,integer],end:[integer,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. Can also be a list of tables that + contain `start` and `end` keys as described above, in which + case `textDocument/rangesFormatting` support is required. hover() *vim.lsp.buf.hover()* Displays hover information about the symbol under the cursor in a floating diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 81d2f2aa24..38be234b00 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -121,6 +121,9 @@ LSP • Completion side effects (including snippet expansion, execution of commands and application of additional text edits) is now built-in. • |vim.lsp.util.locations_to_items()| sets `end_col` and `end_lnum` fields. +• |vim.lsp.buf.format()| now supports passing a list of ranges + via the `range` parameter (this requires support for the + `textDocument/rangesFormatting` request). LUA -- cgit From 1922f7e32b1c61e892bf4bedaf938e8b7aa44c43 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 25 Jun 2024 06:18:57 +0800 Subject: vim-patch:ecd642a: runtime(doc): clarify, that register 1-9 will always be shifted (#29476) related: vim/vim#15077 https://github.com/vim/vim/commit/ecd642af43dc496e92020422fded717e095d4bc1 Co-authored-by: Christian Brabandt --- runtime/doc/change.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 9ff16165d7..928b834600 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1227,13 +1227,13 @@ Vim fills these registers with text from yank and delete commands. Numbered register 0 contains the text from the most recent yank command, unless the command specified another register with ["x]. Numbered register 1 contains the text deleted by the most recent delete or -change command, unless the command specified another register or the text is -less than one line (the small delete register is used then). An exception is -made for the delete operator with these movement commands: |%|, |(|, |)|, |`|, -|/|, |?|, |n|, |N|, |{| and |}|. Register "1 is always used then (this is Vi -compatible). The "- register is used as well if the delete is within a line. -Note that these characters may be mapped. E.g. |%| is mapped by the matchit -plugin. +change command (even when the command specified another register), unless the +text is less than one line (the small delete register is used then). An +exception is made for the delete operator with these movement commands: |%|, +|(|, |)|, |`|, |/|, |?|, |n|, |N|, |{| and |}|. +Register "1 is always used then (this is Vi compatible). The "- register is +used as well if the delete is within a line. Note that these characters may be +mapped. E.g. |%| is mapped by the matchit plugin. With each successive deletion or change, Vim shifts the previous contents of register 1 into register 2, 2 into 3, and so forth, losing the previous contents of register 9. -- cgit From bda63d5b97dfb333de6f4bd757dbb978906062a2 Mon Sep 17 00:00:00 2001 From: bfredl Date: Tue, 25 Jun 2024 15:33:47 +0200 Subject: refactor(typval)!: remove distinction of binary and nonbinary strings This is a breaking change which will make refactor of typval and shada code a lot easier. In particular, code that would use or check for v:msgpack_types.binary in the wild would be broken. This appears to be rarely used in existing plugins. Also some cases where v:msgpack_type.string would be used to represent a binary string of "string" type, we use a BLOB instead, which is vimscripts native type for binary blobs, and already was used for BIN formats when necessary. msgpackdump(msgpackparse(data)) no longer preserves the distinction of BIN and STR strings. This is very common behavior for language-specific msgpack bindings. Nvim uses msgpack as a tool to serialize its data. Nvim is not a tool to bit-perfectly manipulate arbitrary msgpack data out in the wild. The changed tests should indicate how behavior changes in various edge cases. --- runtime/doc/builtin.txt | 7 +------ runtime/doc/news.txt | 6 ++++++ 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 1e0df1918b..180d308ef5 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -5152,12 +5152,7 @@ msgpackparse({data}) *msgpackparse()* C parser does not support such values. float |Float|. This value cannot possibly appear in |msgpackparse()| output. - string |readfile()|-style list of strings. This value will - appear in |msgpackparse()| output if string contains - zero byte or if string is a mapping key and mapping is - being represented as special dictionary for other - reasons. - binary |String|, or |Blob| if binary string contains zero + string |String|, or |Blob| if binary string contains zero byte. This value cannot appear in |msgpackparse()| output since blobs were introduced. array |List|. This value cannot appear in |msgpackparse()| diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 38be234b00..f1c241a951 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -50,6 +50,12 @@ EDITOR • |hl-CurSearch| now behaves the same as Vim and no longer updates on every cursor movement. +VIM SCRIPT + +• |v:msgpack_types| has the type "binary" removed. |msgpackparse()| no longer + treats BIN, STR and FIXSTR as separate types. Any of these is returned as a + string if possible, or a |blob| if the value contained embedded NUL:s. + EVENTS • TODO -- cgit From e7020306a19a5211c834966ec067fff3b981bdb9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 30 Jun 2024 06:40:31 +0800 Subject: feat(jumplist): allow opting out of removing unloaded buffers (#29347) Problem: Cannot opt out of removing unloaded buffers from the jumplist. Solution: Only enable that with "unload" flag in 'jumpoptions'. --- runtime/doc/options.txt | 5 ++++- runtime/doc/vim_diff.txt | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 1b71050620..70d0bd4369 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -3619,7 +3619,7 @@ A jump table for the options with a short description can be found at |Q_op|. Otherwise only one space is inserted. *'jumpoptions'* *'jop'* -'jumpoptions' 'jop' string (default "") +'jumpoptions' 'jop' string (default "unload") global List of words that change the behavior of the |jumplist|. stack Make the jumplist behave like the tagstack. @@ -3632,6 +3632,9 @@ A jump table for the options with a short description can be found at |Q_op|. |alternate-file| or using |mark-motions| try to restore the |mark-view| in which the action occurred. + unload Remove unloaded buffers from the jumplist. + EXPERIMENTAL: this flag may change in the future. + *'keymap'* *'kmp'* 'keymap' 'kmp' string (default "") local to buffer diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index a51ffcf004..c1daf4a937 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -62,6 +62,7 @@ Defaults *nvim-defaults* - 'isfname' does not include ":" (on Windows). Drive letters are handled correctly without it. (Use |gF| for filepaths suffixed with ":line:col"). - 'joinspaces' is disabled +- 'jumpoptions' defaults to "unload" - 'langnoremap' is enabled - 'langremap' is disabled - 'laststatus' defaults to 2 (statusline is always shown) @@ -341,6 +342,7 @@ string options work. - 'inccommand' shows interactive results for |:substitute|-like commands and |:command-preview| commands - 'jumpoptions' "view" tries to restore the |mark-view| when moving through + "unload" removes unloaded buffer from the jumplist - the |jumplist|, |changelist|, |alternate-file| or using |mark-motions|. - 'laststatus' global statusline support - 'mousescroll' amount to scroll by when scrolling with a mouse -- cgit From 7f8cd91ac0f52c8046428ab029d28d528e848740 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Thu, 4 Jul 2024 11:26:32 +0200 Subject: vim-patch:2606e77: runtime(doc): rename variable for pandoc markdown support fixes: vim/vim#15141 https://github.com/vim/vim/commit/2606e7718c49fc8221dfff21b36eff632ef668a0 Co-authored-by: Christian Brabandt --- runtime/doc/syntax.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 4b49a31604..c95b6d5584 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -2045,9 +2045,9 @@ 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: > +To do so, set the *g:filetype_md* var: > - :let g:markdown_md = 'pandoc' + :let g:filetype_md = 'pandoc' The pandoc syntax plugin uses |conceal| for pretty highlighting. Default is 1 > -- cgit From 4b3be56a03695fa14ed28d6ded4cb338cbb99249 Mon Sep 17 00:00:00 2001 From: Peter Aronoff Date: Thu, 4 Jul 2024 13:15:35 -0400 Subject: fix(diagnostic): make docs agree with code (#29561) Problem: the code and docs for vim.diagnostic.JumpOpts.float send mixed signals about what the default should be. When the option is first set, in the global_diagnostic_options table, the comment clearly says that the default is false. Later in the code, in goto_diagnostic, there's a line that sets the default to true if no default is present. Finally, the docs say that the default is true. Solution: Change the docs to reflect the new default of false and fix the goto_diagnostic function. --- runtime/doc/diagnostic.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index 05af2eddc3..444829c325 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -401,7 +401,7 @@ Lua module: vim.diagnostic *diagnostic-api* file or not. Similar to 'wrapscan'. • {severity}? (`vim.diagnostic.SeverityFilter`) See |diagnostic-severity|. - • {float}? (`boolean|vim.diagnostic.Opts.Float`, default: `true`) + • {float}? (`boolean|vim.diagnostic.Opts.Float`, default: `false`) If `true`, call |vim.diagnostic.open_float()| after moving. If a table, pass the table as the {opts} parameter to |vim.diagnostic.open_float()|. Unless -- cgit From 25c59d08c4df9952c606bbc96b7b26dca429bb9c Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Thu, 4 Jul 2024 23:20:45 +0200 Subject: docs: misc (#29410) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Michael Härtl Co-authored-by: zeertzjq --- runtime/doc/support.txt | 11 ++++++----- runtime/doc/usr_05.txt | 2 +- runtime/doc/usr_toc.txt | 8 ++++---- runtime/doc/vim_diff.txt | 5 +++-- 4 files changed, 14 insertions(+), 12 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/support.txt b/runtime/doc/support.txt index 5b8b32fa16..3f9a358962 100644 --- a/runtime/doc/support.txt +++ b/runtime/doc/support.txt @@ -14,7 +14,7 @@ Supported platforms *supported-platforms* `System` `Tier` `Versions` `Tested versions` Linux 1 >= 2.6.32, glibc >= 2.12 Ubuntu 22.04 macOS (Intel) 1 >= 11 macOS 12 -macOS (M1) 2 >= 11 macOS 14 +macOS (M1) 1 >= 11 macOS 14 Windows 64-bit 1 >= Windows 10 Version 1809 Windows Server 2022 FreeBSD 1 >= 10 FreeBSD 13 OpenBSD 2 >= 7 @@ -28,10 +28,10 @@ your Windows version, run the "winver" command and look for "Version xxxx" Support types ~ * Tier 1: Officially supported and tested with CI. Any contributed patch - MUST NOT break such systems. + MUST NOT break support for such platforms. -* Tier 2: Officially supported, but not necessarily tested with CI. These - systems are maintained to the best of our ability, without being a top +* Tier 2: Officially supported, but not necessarily tested with CI. Support + for these platforms are maintained by best effort, without being a top priority. * Tier 3: Not tested and no guarantees, and not all features may work. @@ -47,7 +47,8 @@ Common Some common notes when adding support for new platforms: -Cmake is the only supported build system. The platform must be buildable with cmake. +CMake is the only supported build system. Nvim must be buildable on the +platform with CMake. All functionality related to the new platform must be implemented in its own file inside `src/nvim/os` unless it's already done in a common file, in which diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt index aa7dd8d05c..1c936d5f9d 100644 --- a/runtime/doc/usr_05.txt +++ b/runtime/doc/usr_05.txt @@ -120,7 +120,7 @@ This switches on three very clever mechanisms: *restore-cursor* *last-position-jump* > augroup RestoreCursor autocmd! - autocmd BufRead * autocmd FileType ++once + autocmd BufReadPre * autocmd FileType ++once \ let s:line = line("'\"") \ | if s:line >= 1 && s:line <= line("$") && &filetype !~# 'commit' \ && index(['xxd', 'gitrebase'], &filetype) == -1 diff --git a/runtime/doc/usr_toc.txt b/runtime/doc/usr_toc.txt index dd0d5784f5..2e70c20675 100644 --- a/runtime/doc/usr_toc.txt +++ b/runtime/doc/usr_toc.txt @@ -7,7 +7,7 @@ ============================================================================== Overview -Getting Started +Getting Started ~ |usr_01.txt| About the manuals |usr_02.txt| The first steps in Vim |usr_03.txt| Moving around @@ -21,7 +21,7 @@ Getting Started |usr_11.txt| Recovering from a crash |usr_12.txt| Clever tricks -Editing Effectively +Editing Effectively ~ |usr_20.txt| Typing command-line commands quickly |usr_21.txt| Go away and come back |usr_22.txt| Finding the file to edit @@ -36,7 +36,7 @@ Editing Effectively |usr_31.txt| Exploiting the GUI |usr_32.txt| The undo tree -Tuning Vim +Tuning Vim ~ |usr_40.txt| Make new commands |usr_41.txt| Write a Vim script |usr_42.txt| Add new menus @@ -45,7 +45,7 @@ Tuning Vim |usr_45.txt| Select your language (locale) -Reference manual +Reference manual ~ |reference_toc| More detailed information for all commands The user manual is online: diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index c1daf4a937..d7f955a654 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -341,8 +341,9 @@ string options work. - '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 - "unload" removes unloaded buffer from the jumplist +- 'jumpoptions' + - "view" tries to restore |mark-view| when moving through the jumplist. + - "unload" removes unloaded buffers from the jumplist. - the |jumplist|, |changelist|, |alternate-file| or using |mark-motions|. - 'laststatus' global statusline support - 'mousescroll' amount to scroll by when scrolling with a mouse -- cgit From 9a63ab5e3bb1bbe4c07685585251c98969308df3 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 6 Jul 2024 17:32:16 +0800 Subject: vim-patch:6a4afb1: runtime(doc): document further keys that scroll page up/down fixes: vim/vim#15107 https://github.com/vim/vim/commit/6a4afb1efca1bac5fbc0281804591cf0a52b2d81 Co-authored-by: Christian Brabandt --- runtime/doc/scroll.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/scroll.txt b/runtime/doc/scroll.txt index 29d6177213..1604c9a1d3 100644 --- a/runtime/doc/scroll.txt +++ b/runtime/doc/scroll.txt @@ -43,6 +43,8 @@ CTRL-D Scroll window Downwards in the buffer. The number of or ** ** or ** *CTRL-F* + or ** *CTRL-SHIFT-CR* ** + or *SHIFT-+* ** CTRL-F Scroll window [count] pages Forwards (downwards) in the buffer. See also 'startofline' option. When there is only one window the 'window' option @@ -80,6 +82,7 @@ CTRL-U Scroll window Upwards in the buffer. The number of or ** ** or ** *CTRL-B* + or ** *SHIFT-MINUS* CTRL-B Scroll window [count] pages Backwards (upwards) in the buffer. See also 'startofline' option. When there is only one window the 'window' option -- cgit From 285543b6aaeb402304b7eeeb5b0cec9284f5d743 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 6 Jul 2024 17:32:33 +0800 Subject: vim-patch:aaaa21b: runtime(doc): Remove wrong help tag CTRL-SHIFT-CR https://github.com/vim/vim/commit/aaaa21b58f8af2fe923368116f94832df3d273bc Co-authored-by: Christian Brabandt --- runtime/doc/scroll.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/scroll.txt b/runtime/doc/scroll.txt index 1604c9a1d3..8b727a86fb 100644 --- a/runtime/doc/scroll.txt +++ b/runtime/doc/scroll.txt @@ -43,7 +43,7 @@ CTRL-D Scroll window Downwards in the buffer. The number of or ** ** or ** *CTRL-F* - or ** *CTRL-SHIFT-CR* ** + or ** ** or *SHIFT-+* ** CTRL-F Scroll window [count] pages Forwards (downwards) in the buffer. See also 'startofline' option. -- cgit From 91e5dcae3d47e7eaf25537471288c27055fdddbe Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Sat, 6 Jul 2024 04:41:55 -0500 Subject: docs(lsp): add examples to lsp-quickstart for completion and autoformatting (#29497) Auto-completion and auto-formatting are common (though certainly not universal) features that many users want. We can document how to accomplish this in lsp-quickstart so that users that do want these features can easily find examples of how to configure them. --- runtime/doc/lsp.txt | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index e987f266cc..89ce2d2be5 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -34,16 +34,16 @@ Follow these steps to get LSP features: vim.api.nvim_create_autocmd('FileType', { -- This handler will fire when the buffer's 'filetype' is "python" pattern = 'python', - callback = function(ev) + callback = function(args) 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 + -- current buffer (`args.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'}), + root_dir = vim.fs.root(args.buf, {'setup.py', 'pyproject.toml'}), }) end, }) @@ -86,18 +86,18 @@ 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) - vim.bo[ev.buf].formatexpr = nil - vim.bo[ev.buf].omnifunc = nil - vim.keymap.del('n', 'K', { buffer = ev.buf }) + callback = function(args) + vim.bo[args.buf].formatexpr = nil + vim.bo[args.buf].omnifunc = nil + vim.keymap.del('n', 'K', { buffer = args.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. -Example: >lua +To use other LSP features, set keymaps and other buffer options on +|LspAttach|. Not all language servers provide the same capabilities. Use +capability checks to ensure you only use features supported by the language +server. Example: >lua vim.api.nvim_create_autocmd('LspAttach', { callback = function(args) @@ -105,6 +105,20 @@ Example: >lua if client.supports_method('textDocument/implementation') then -- Create a keymap for vim.lsp.buf.implementation end + + if client.supports_method('textDocument/completion') then + -- Enable auto-completion + vim.lsp.completion.enable(true, client.id, args.buf, {autotrigger = true}) + end + + if client.supports_method('textDocument/formatting') then + -- Format the current buffer on save + vim.api.nvim_create_autocmd('BufWritePre', { + buffer = args.buf, + callback = function() + vim.lsp.buf.format({bufnr = args.buf, id = client.id}) + end, + }) end, }) < -- cgit From 55e4301036bb938474fc9768c41e28df867d9286 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sat, 6 Jul 2024 11:44:19 +0200 Subject: feat(lsp): drop fswatch, use inotifywait (#29374) This patch replaces fswatch with inotifywait from inotify-toools: https://github.com/inotify-tools/inotify-tools fswatch takes ~1min to set up recursively for the Samba source code directory. inotifywait needs less than a second to do the same thing. https://github.com/emcrisostomo/fswatch/issues/321 Also it fswatch seems to be unmaintained in the meantime. Signed-off-by: Andreas Schneider --- runtime/doc/lua.txt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 39a047cbab..dfaf666874 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -543,16 +543,19 @@ 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 + *inotify-limitations* +When on Linux 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=494462 < -This will increase the limit to 100000 watches and queued events. These lines +This will increase the limit to 494462 watches and queued events. These lines can be added to `/etc/sysctl.conf` to make the changes persistent. +Note that each watch is a structure in the Kernel, thus available memory is +also a bottleneck for using inotify. In fact, a watch can take up to 1KB of +space. This means a million watches could result in 1GB of extra RAM usage. + Example: TCP echo-server *tcp-server* 1. Save this code to a file. 2. Execute it with ":luafile %". -- cgit From 5da9b49b19240bb00f338249fef84a2bf1212b49 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 7 Jul 2024 06:32:54 +0800 Subject: vim-patch:9.1.0537: signed number detection for CTRL-X/A can be improved (#29590) Problem: signed number detection for CTRL-X/A can be improved (Chris Patuzzo) Solution: Add the new "blank" value for the 'nrformat' setting. This will make Vim assume a signed number only if there is a blank in front of the sign. (distobs) fixes: vim/vim#15033 closes: vim/vim#15110 https://github.com/vim/vim/commit/25ac6d67d92e0adda53b8d44b81c15031643ca1e Co-authored-by: distobs --- runtime/doc/options.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 70d0bd4369..4bb589fb2c 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -4430,6 +4430,20 @@ A jump table for the options with a short description can be found at |Q_op|. (without "unsigned" it would become "9-2019"). Using CTRL-X on "0" or CTRL-A on "18446744073709551615" (2^64 - 1) has no effect, overflow is prevented. + blank If included, treat numbers as signed or unsigned based on + preceding whitespace. If a number with a leading dash has its + dash immediately preceded by a non-whitespace character (i.e., + not a tab or a " "), the negative sign won't be considered as + part of the number. For example: + Using CTRL-A on "14" in "Carbon-14" results in "Carbon-15" + (without "blank" it would become "Carbon-13"). + Using CTRL-X on "8" in "Carbon -8" results in "Carbon -9" + (because -8 is preceded by whitespace. If "unsigned" was + set, it would result in "Carbon -7"). + If this format is included, overflow is prevented as if + "unsigned" were set. If both this format and "unsigned" are + included, "unsigned" will take precedence. + Numbers which simply begin with a digit in the range 1-9 are always considered decimal. This also happens for numbers that are not recognized as octal or hex. -- cgit From 6a886a2511bbfd24a4d6ecc3f3a75f08a6df9de9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 7 Jul 2024 07:21:14 +0800 Subject: vim-patch:9.1.0538: not possible to assign priority when defining a sign (#29592) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: not possible to assign priority when defining a sign (Mathias Fußenegger) Solution: Add the priority argument for the :sign-define ex command and the sign_define() function (LemonBoy) Use the specified value instead of the default one (SIGN_DEF_PRIO) when no priority is explicitly specified in sign_place or :sign place. fixes: vim/vim#8334 closes: vim/vim#15124 https://github.com/vim/vim/commit/b975ddfdf96644b8df808415dee36f99abd48753 Co-authored-by: LemonBoy --- runtime/doc/builtin.txt | 4 +++- runtime/doc/sign.txt | 24 ++++++++++++++---------- 2 files changed, 17 insertions(+), 11 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 180d308ef5..3def778e58 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -7110,6 +7110,7 @@ sign_getdefined([{name}]) *sign_getdefined()* linehl highlight group used for the whole line the sign is placed in; not present if not set. name name of the sign + priority default priority value of the sign numhl highlight group used for the line number where the sign is placed; not present if not set. text text that is displayed when there is no icon @@ -7282,7 +7283,8 @@ sign_placelist({list}) *sign_placelist()* priority Priority of the sign. When multiple signs are placed on a line, the sign with the highest priority is used. If not specified, the - default value of 10 is used. See + default value of 10 is used, unless specified + otherwise by the sign definition. See |sign-priority| for more information. If {id} refers to an existing sign, then the existing sign is diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt index a64ba0ea1c..9d74f1f376 100644 --- a/runtime/doc/sign.txt +++ b/runtime/doc/sign.txt @@ -68,11 +68,12 @@ other plugins using signs. *sign-priority* Each placed sign is assigned a priority value independently of the sign group. -The default priority for a sign is 10. When multiple signs that each have an -icon or text are placed on the same line, signs are ordered with decreasing -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. +The default priority for a sign is 10, this value can be changed for different +signs by specifying a different value at definition time. When multiple signs +that each have an icon or text are placed on the same line, signs are ordered +with decreasing priority from left to right, up until the maximum width set in +'signcolumn'. Low 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. @@ -113,6 +114,9 @@ See |sign_define()| for the equivalent Vim script function. toolkit supports ~ Win32 .bmp, .ico, .cur + priority={prio} + Default priority for the sign, see |sign-priority|. + linehl={group} Highlighting group used for the whole line the sign is placed in. Most useful is defining a background color. @@ -183,11 +187,11 @@ See |sign_place()| for the equivalent Vim script function. By default, the sign is placed in the global sign group. - By default, the sign is assigned a default priority of 10. To - assign a different priority value, use "priority={prio}" to - specify a value. The priority is used to determine the sign - that is displayed when multiple signs are placed on the same - line. + By default, the sign is assigned a default priority of 10, + unless specified otherwise by the sign definition. To assign a + different priority value, use "priority={prio}" to specify a + value. The priority is used to determine the sign that is + displayed when multiple signs are placed on the same line. Examples: > :sign place 5 line=3 name=sign1 file=a.py -- cgit From 7195d331afbaae83fd58bea728353dd13b23db11 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 8 Jul 2024 06:17:46 +0800 Subject: vim-patch:b9bbf1f: runtime(doc): clarify how to re-init csv syntax file fixes: vim/vim#15161 https://github.com/vim/vim/commit/b9bbf1f04439a6cdb6d376c94852721e4ebf8300 Co-authored-by: Christian Brabandt --- runtime/doc/syntax.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index c95b6d5584..07a546cfdd 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -752,6 +752,21 @@ will be classified as tcsh, UNLESS the "filetype_csh" variable exists. If the "filetype_csh" variable exists, the filetype will be set to the value of the variable. +CSV *ft-csv-syntax* + +If you change the delimiter of the CSV file, the syntax highlighting will be +now longer match the changed file content. You will need to unlet the +following variable: > + + :unlet b:csv_delimiter + +And afterwards save and reload the file: > + + :w + :e + +Now the syntax engine should determine the newly changed csv delimiter. + CYNLIB *cynlib.vim* *ft-cynlib-syntax* -- cgit From 7b5364166c0a1696c510d61e74e1808f305c2de7 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 8 Jul 2024 06:18:49 +0800 Subject: vim-patch:fbbabbc: runtime(doc): add page-scrolling keys to index.txt Also add the newly documented keys from commit 6a4afb1efca1bac5fbc0281804591cf0a52b2d81 to index.txt which was forgotten. related: vim/vim#15107 https://github.com/vim/vim/commit/fbbabbca3319ea1b358c08f250b4582421c40600 Co-authored-by: Christian Brabandt --- runtime/doc/index.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 05c8b94d94..384b133d4e 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -196,10 +196,12 @@ tag char note action in Normal mode ~ || 1 go to N newer entry in jump list |CTRL-I| CTRL-I 1 same as || 1 same as "j" +|| 1 same as CTRL-F |CTRL-J| CTRL-J 1 same as "j" CTRL-K not used |CTRL-L| CTRL-L redraw screen || 1 cursor to the first CHAR N lines lower +|| 1 same as CTRL-F |CTRL-M| CTRL-M 1 same as |CTRL-N| CTRL-N 1 same as "j" |CTRL-O| CTRL-O 1 go to N older entry in jump list @@ -272,9 +274,11 @@ tag char note action in Normal mode ~ |star| * 1 search forward for the Nth occurrence of the ident under the cursor |+| + 1 same as +|| 1 same as CTRL-F |,| , 1 repeat latest f, t, F or T in opposite direction N times |-| - 1 cursor to the first CHAR N lines higher +|| 1 same as CTRL-B |.| . 2 repeat last change with count replaced with N |/| /{pattern} 1 search forward for the Nth occurrence of -- cgit From 435ce9921374055ed2103212bb102e2506c1e2e3 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 8 Jul 2024 06:19:12 +0800 Subject: vim-patch:9.1.0540: Unused assignment in sign_define_cmd() Problem: Unused assignment in sign_define_cmd() Solution: Remove the assignment. Also document the "priority" flag of sign_define(). (zeertzjq) closes: vim/vim#15169 https://github.com/vim/vim/commit/fc3f5dba52099d82ccc8bfe309d58a6fac01373d --- 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 3def778e58..648598fb3f 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -7063,6 +7063,7 @@ sign_define({list}) icon full path to the bitmap file for the sign. linehl highlight group used for the whole line the sign is placed in. + priority default priority value of the sign numhl highlight group used for the line number where the sign is placed. text text that is displayed when there is no icon -- cgit From 76b91106fc836ae634cdf8425d121d843d14d70a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 8 Jul 2024 06:55:21 +0800 Subject: vim-patch:9.1.0543: Behavior of CursorMovedC is strange (#29608) Problem: Behavior of CursorMovedC is strange. Solution: Also trigger when the cmdline has changed. (zeertzjq) fixes: vim/vim#15069 closes: vim/vim#15071 https://github.com/vim/vim/commit/8145620a958dbb5c82cf8f8a37556ee1ea501c6d --- runtime/doc/autocmd.txt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 089316aec1..8e5e2628de 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -524,12 +524,9 @@ CursorMoved After the cursor was moved in Normal or Visual that is slow. *CursorMovedC* CursorMovedC After the cursor was moved in the command - line while the text in the command line hasn't - changed. Be careful not to mess up the - command line, it may cause Vim to lock up. - is set to a single character, - indicating the type of command-line. - |cmdwin-char| + line. Be careful not to mess up the command + line, it may cause Vim to lock up. + expands to the |cmdline-char|. *CursorMovedI* CursorMovedI After the cursor was moved in Insert mode. Not triggered when the popup menu is visible. -- cgit From fb6c059dc55c8d594102937be4dd70f5ff51614a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 9 Jul 2024 06:41:26 +0800 Subject: vim-patch:d1c3698: runtime(doc): fix typo in :h ft-csv-syntax (#29619) closes: vim/vim#15179 https://github.com/vim/vim/commit/d1c369892d49775e3da502981d0d896c98592528 --- 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 07a546cfdd..6394cdc719 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -754,9 +754,9 @@ variable. CSV *ft-csv-syntax* -If you change the delimiter of the CSV file, the syntax highlighting will be -now longer match the changed file content. You will need to unlet the -following variable: > +If you change the delimiter of a CSV file, its syntax highlighting will no +longer match the changed file content. You will need to unlet the following +variable: > :unlet b:csv_delimiter @@ -765,7 +765,7 @@ And afterwards save and reload the file: > :w :e -Now the syntax engine should determine the newly changed csv delimiter. +Now the syntax engine should determine the newly changed CSV delimiter. CYNLIB *cynlib.vim* *ft-cynlib-syntax* -- cgit From 51d85f7ea58bd715cec1fdfa8d19826cafe7185d Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 9 Jul 2024 15:26:48 +0200 Subject: build(deps): drop unused bundled bash, python parsers and queries Problem: Neovim bundles treesitter parsers for bash and python but does not use them by default. This dilutes the messaging about the bundled parsers being required for functionality or reasonable out-of-the-box experience. It also increases the risk of query incompatibilities for no gain. Solution: Stop bundling bash and python parser and queries. --- runtime/doc/news-0.10.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news-0.10.txt b/runtime/doc/news-0.10.txt index bc868c1099..a5ded1ca22 100644 --- a/runtime/doc/news-0.10.txt +++ b/runtime/doc/news-0.10.txt @@ -347,8 +347,8 @@ The following new features were added. |default-autocmds| • Treesitter: - • Bundled parsers and queries (highlight, folds) for Markdown, Python, and - Bash. + • Bundled parser and queries (highlight, folds) for Markdown (used for LSP + hover). • |:InspectTree| shows root nodes. • |:InspectTree| now supports |folding|. • |:InspectTree| shows node ranges in 0-based instead of 1-based indexing. -- cgit From d918ebe3b8a5ee2a7ad735e2edd474cc1224ea28 Mon Sep 17 00:00:00 2001 From: Max Coplan Date: Tue, 9 Jul 2024 12:08:12 -0700 Subject: fix(diagnostic): fix backwards compatibility for goto_next and goto_prev (#29593) --- runtime/doc/deprecated.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index 6c6585d76e..d8360849dc 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -23,8 +23,8 @@ LUA - vim.region() Use |getregionpos()| instead. DIAGNOSTICS -- *vim.diagnostic.goto_next()* Use |vim.diagnostic.jump()| with `{count = 1}` instead. -- *vim.diagnostic.goto_prev()* Use |vim.diagnostic.jump()| with `{count = -1}` instead. +- *vim.diagnostic.goto_next()* Use |vim.diagnostic.jump()| with `{count=1, float=true}` instead. +- *vim.diagnostic.goto_prev()* Use |vim.diagnostic.jump()| with `{count=-1, float=true}` instead. - *vim.diagnostic.get_next_pos()* Use the "lnum" and "col" fields from the return value of |vim.diagnostic.get_next()| instead. -- cgit From 545aafbeb80eb52c182ce139800489b392a12d0d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 10 Jul 2024 08:07:16 +0800 Subject: vim-patch:9.1.0547: No way to get the arity of a Vim function (#29638) Problem: No way to get the arity of a Vim function (Austin Ziegler) Solution: Enhance get() Vim script function to return the function argument info using get(func, "arity") (LemonBoy) fixes: vim/vim#15097 closes: vim/vim#15109 https://github.com/vim/vim/commit/48b7d05a4f88c4326bd5d7a73a523f2d953b3e51 Co-authored-by: LemonBoy --- runtime/doc/builtin.txt | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 648598fb3f..334531cec7 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -2028,17 +2028,17 @@ garbagecollect([{atexit}]) *garbagecollect()* it's safe to perform. This is when waiting for the user to type a character. -get({list}, {idx} [, {default}]) *get()* +get({list}, {idx} [, {default}]) *get()* *get()-list* Get item {idx} from |List| {list}. When this item is not available return {default}. Return zero when {default} is omitted. -get({blob}, {idx} [, {default}]) +get({blob}, {idx} [, {default}]) *get()-blob* Get byte {idx} from |Blob| {blob}. When this byte is not available return {default}. Return -1 when {default} is omitted. -get({dict}, {key} [, {default}]) +get({dict}, {key} [, {default}]) *get()-dict* Get item with key {key} from |Dictionary| {dict}. When this item is not available return {default}. Return zero when {default} is omitted. Useful example: >vim @@ -2046,13 +2046,26 @@ get({dict}, {key} [, {default}]) < This gets the value of g:var_name if it exists, and uses "default" when it does not exist. -get({func}, {what}) - Get item {what} from Funcref {func}. Possible values for +get({func}, {what}) *get()-func* + Get item {what} from |Funcref| {func}. Possible values for {what} are: - "name" The function name - "func" The function - "dict" The dictionary - "args" The list with arguments + "name" The function name + "func" The function + "dict" The dictionary + "args" The list with arguments + "arity" A dictionary with information about the number of + arguments accepted by the function (minus the + {arglist}) with the following fields: + required the number of positional arguments + optional the number of optional arguments, + in addition to the required ones + varargs |TRUE| if the function accepts a + variable number of arguments |...| + + Note: There is no error, if the {arglist} of + the Funcref contains more arguments than the + Funcref expects, it's not validated. + Returns zero on error. getbufinfo([{buf}]) *getbufinfo()* -- cgit From 158ffd646d18eb26ca7e04e9cb9110305577b9c8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 10 Jul 2024 10:35:12 +0800 Subject: vim-patch:9.1.0554: :bw leaves jumplist and tagstack data around (#29639) Problem: :bw leaves jumplist and tagstack data around (Paul "Joey" Clark) Solution: Wipe jumplist and tagstack references to the wiped buffer (LemonBoy) As documented the :bwipeout command brutally deletes all the references to the buffer, so let's make it delete all the entries in the jump list and tag stack referring to the wiped-out buffer. fixes: vim/vim#8201 closes: vim/vim#15185 https://github.com/vim/vim/commit/4ff3a9b1e3ba45f9dbd0ea8c721f27d9315c4d93 Co-authored-by: LemonBoy --- runtime/doc/windows.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 4791e73929..840d8b51af 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1175,11 +1175,12 @@ list of buffers. |unlisted-buffer| :bw[ipeout][!] N1 N2 ... Like |:bdelete|, but really delete the buffer. Everything related to the buffer is lost. All marks in this buffer - become invalid, option settings are lost, etc. Don't use this + become invalid, option settings are lost, the jumplist and + tagstack data will be purged, etc. Don't use this unless you know what you are doing. Examples: > - :.+,$bwipeout " wipe out all buffers after the current - " one - :%bwipeout " wipe out all buffers + :.+,$bwipeout " wipe out all buffers after the current + " one + :%bwipeout " wipe out all buffers < :[N]bun[load][!] *:bun* *:bunload* *E515* :bun[load][!] [N] -- cgit From 15f6cf0c8f0eaf4f6ef5f1d8328afe19246ff94f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 11 Jul 2024 06:27:40 +0800 Subject: vim-patch:7a85e34: runtime(doc): fix inconsistencies in :h file-searching (#29652) closes: vim/vim#15201 https://github.com/vim/vim/commit/7a85e343d29e502f66e2c3035808911e5a843e99 --- runtime/doc/editing.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 662d89895d..09ae3b1ab1 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1623,7 +1623,7 @@ There are three different types of searching: stop-directories are appended to the path (for the 'path' option) or to the filename (for the 'tags' option) with a ';'. If you want several stop-directories separate them with ';'. If you want no stop-directory - ("search upward till the root directory) just use ';'. > + ("search upward till the root directory") just use ';'. > /usr/include/sys;/usr < will search in: > /usr/include/sys @@ -1636,7 +1636,7 @@ There are three different types of searching: If Vim's current path is /u/user_x/work/release and you do > :set path=include;/u/user_x -< and then search for a file with |gf| the file is searched in: > +< and then search for a file with |gf| the file is searched in: > /u/user_x/work/release/include /u/user_x/work/include /u/user_x/include @@ -1648,7 +1648,7 @@ There are three different types of searching: 3) Combined up/downward search: If Vim's current path is /u/user_x/work/release and you do > set path=**;/u/user_x -< and then search for a file with |gf| the file is searched in: > +< and then search for a file with |gf| the file is searched in: > /u/user_x/work/release/** /u/user_x/work/** /u/user_x/** @@ -1660,10 +1660,10 @@ There are three different types of searching: In the above example you might want to set path to: > :set path=**,/u/user_x/** -< This searches: - /u/user_x/work/release/** ~ - /u/user_x/** ~ - This searches the same directories, but in a different order. +< This searches: > + /u/user_x/work/release/** + /u/user_x/** +< This searches the same directories, but in a different order. Note that completion for ":find", ":sfind", and ":tabfind" commands do not currently work with 'path' items that contain a URL or use the double star -- cgit From 45b7a2c50335e1943a36715101e40eda5a1423f3 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 11 Jul 2024 08:02:59 +0800 Subject: vim-patch:9.1.0557: moving in the buffer list doesn't work as documented (#29653) Problem: moving in the buffer list doesn't work as documented (SenileFelineS) Solution: Skip non-help buffers, when run from normal buffers, else only move from help buffers to the next help buffer (LemonBoy) As explained in the help section for :bnext and :bprev the commands should jump from help buffers to help buffers (and from regular ones to regular ones). fixes: vim/vim#4478 closes: vim/vim#15198 https://github.com/vim/vim/commit/893eeeb44583ca33276e263165b2a6e50fd297d0 Co-authored-by: LemonBoy --- 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 f1c241a951..604515a808 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -49,6 +49,9 @@ EDITOR now appear left of lower priority signs. • |hl-CurSearch| now behaves the same as Vim and no longer updates on every cursor movement. +• Moving in the buffer list using |:bnext| and similar commands behaves as + documented and skips help buffers if run from a non-help buffer, otherwise + it moves to another help buffer. VIM SCRIPT -- cgit From 83f42aa450582594f0be044c9f0710809ef0f93d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 12 Jul 2024 07:11:54 +0800 Subject: vim-patch:9.1.0568: Cannot expand paths from 'cdpath' setting Problem: Cannot expand paths from 'cdpath' setting (Daniel Hahler) Solution: Implement 'cdpath' completion, add the new 'dir_in_path' completion type (LemonBoy) fixes vim/vim#374 closes: vim/vim#15205 https://github.com/vim/vim/commit/a20bf69a3b32024cb7809be87af33bf9dc490a19 Co-authored-by: LemonBoy --- runtime/doc/builtin.txt | 1 + runtime/doc/map.txt | 1 + 2 files changed, 2 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 334531cec7..de8bfc3aff 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -2412,6 +2412,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* customlist,{func} custom completion, defined via {func} diff_buffer |:diffget| and |:diffput| completion dir directory names + dir_in_path directory names in |'cdpath'| environment environment variable names event autocommand events expression Vim expression diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index f5cbb7b732..ce2fbda045 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1385,6 +1385,7 @@ completion can be enabled: -complete=command Ex command (and arguments) -complete=compiler compilers -complete=dir directory names + -complete=dir_in_path directory names in |'cdpath'| -complete=environment environment variable names -complete=event autocommand events -complete=expression Vim expression -- cgit From 10256bb760fcab0dc25f7eb5b0b45966cb771939 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 13 Jul 2024 04:38:37 +0800 Subject: vim-patch:74703f1: runtime(doc): remove obsolete Ex insert behavior (#29678) related: vim/vim#15120 closes: vim/vim#15228 https://github.com/vim/vim/commit/74703f1086e7815f356123736666d9930db8683a Nvim only supports Vim Ex mode, so this is long obsolete in Nvim. Co-authored-by: Mohamed Akram --- runtime/doc/insert.txt | 5 ----- 1 file changed, 5 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index 91b0d41f1c..6eda76f239 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1927,11 +1927,6 @@ These two commands will keep on asking for lines, until you type a line containing only a ".". Watch out for lines starting with a backslash, see |line-continuation|. -When in Ex mode (see |-e|) a backslash at the end of the line can be used to -insert a NUL character. To be able to have a line ending in a backslash use -two backslashes. This means that the number of backslashes is halved, but -only at the end of the line. - NOTE: These commands cannot be used with |:global| or |:vglobal|. ":append" and ":insert" don't work properly in between ":if" and ":endif", ":for" and ":endfor", ":while" and ":endwhile". -- cgit From b1aa8f5eb8a5407e869335e9987b73f8515c37e5 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 13 Jul 2024 08:56:58 +0800 Subject: vim-patch:9.1.0572: cannot specify tab page closing behaviour (#29682) Problem: cannot specify tab page closing behaviour (Gianluca Pacchiella) Solution: Add the 'tabclose' option (LemonBoy). fixes: vim/vim#5967 closes: vim/vim#15204 https://github.com/vim/vim/commit/5247b0b92e191a046b034171a3b34031e317735f Co-authored-by: LemonBoy --- runtime/doc/news.txt | 1 + runtime/doc/options.txt | 13 +++++++++++++ runtime/doc/quickref.txt | 1 + runtime/doc/tabpage.txt | 3 ++- 4 files changed, 17 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 604515a808..39b3a506ca 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -141,6 +141,7 @@ LUA OPTIONS • 'completeopt' flag "fuzzy" enables |fuzzy-matching| during |ins-completion|. +• 'tabclose' controls which tab page to focus when closing a tab page. PERFORMANCE diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 4bb589fb2c..caa6649b17 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -6343,6 +6343,19 @@ A jump table for the options with a short description can be found at |Q_op|. 'S' flag in 'cpoptions'. Only normal file name characters can be used, `/\*?[|<>` are illegal. + *'tabclose'* *'tcl'* +'tabclose' 'tcl' string (default "") + global + This option controls the behavior when closing tab pages (e.g., using + |:tabclose|). When empty Vim goes to the next (right) tab page. + + Possible values (comma-separated list): + left If included, go to the previous tab page instead of + the next one. + uselast If included, go to the previously used tab page if + possible. This option takes precedence over the + others. + *'tabline'* *'tal'* 'tabline' 'tal' string (default "") global diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 5eea9baa20..d77750b485 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -886,6 +886,7 @@ Short explanation of each option: *option-list* 'switchbuf' 'swb' sets behavior when switching to another buffer 'synmaxcol' 'smc' maximum column to find syntax items 'syntax' 'syn' syntax to be loaded for current buffer +'tabclose' 'tcl' which tab page to focus when closing a tab 'tabline' 'tal' custom format for the console tab pages line 'tabpagemax' 'tpm' maximum number of tab pages for |-p| and "tab all" 'tabstop' 'ts' number of spaces that in file uses diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index 2f50e31ee5..7bfa36e8ab 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -135,7 +135,8 @@ something else. :tabclose $ " close the last tab page :tabclose # " close the last accessed tab page -When a tab is closed the next tab page will become the current one. +When a tab is closed the next tab page will become the current one. This +behaviour can be customized using the 'tabclose' option. *:tabo* *:tabonly* :tabo[nly][!] Close all other tab pages. -- cgit From 970a27927eb31bdc735f0d7d5e3d07784486c6de Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Thu, 11 Jul 2024 15:56:52 +0530 Subject: fix(lua)!: do not use typed table for empty dict Problem: Empty dictionaries are converted into typed tables of the form `{ [true] = 6}` instead of an empty dictionary representation `{}`. This leads to incorrect table representation, along with failure in JSON encoding of such tables as currently tables with only string and number type keys can be encoded. Solution: The typed table logic has been removed from `nlua_push_Dictionary`. The typed table logic is required only for float value conversions which is already handled in `nlua_push_Float`. So, it is(was) no longer required here. Fixes neovim/neovim#29218 --- 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 39b3a506ca..2514ee8a92 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -69,7 +69,8 @@ LSP LUA -• TODO +• API functions now consistently return an empty dictionary as + |vim.empty_dict()|. Earlier, a |lua-special-tbl| was sometimes used. OPTIONS -- cgit From 9093fbdd026f088d923fea374a96a8b01ca0df3a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 14 Jul 2024 06:38:26 +0800 Subject: vim-patch:9.1.0573: ex: no implicit print for single addresses Problem: ex: no implicit print for single addresses Solution: explicitly print even during single addresses, as requested by POSIX (Mohamed Akram) See the POSIX behaviour here: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex.html#tag_20_40_13_03 Section 6b closes: vim/vim#15230 https://github.com/vim/vim/commit/c25a7084e9ae1f78c28ddcbe1fa23374cfdf1e03 Co-authored-by: Mohamed Akram --- runtime/doc/motion.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/doc') diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index e80969c583..26e4ada7d4 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -342,6 +342,7 @@ gg Goto line [count], default first line, on the first *:[range]* :[range] Set the cursor on the last line number in [range]. + In Ex mode, print the lines in [range]. [range] can also be just one line number, e.g., ":1" or ":'m". In contrast with |G| this command does not modify the -- cgit From ba36742211eea55bed2ffbca129a45023967f204 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 14 Jul 2024 08:17:49 +0800 Subject: vim-patch:9.1.0574: ex: wrong handling of commands after bar Problem: ex: wrong handling of commands after bar Solution: for :append, :insert and :change use the text after the bar as input for those commands. This is what POSIX requests. (Mohamed Akram) See the POSIX Spec: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex.html#tag_20_40_13_03 Section 12.c closes: vim/vim#15229 https://github.com/vim/vim/commit/8c446da34998f6350911e07fbfd7932412c83185 Co-authored-by: Mohamed Akram --- runtime/doc/insert.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index 6eda76f239..e12f240430 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1927,6 +1927,16 @@ These two commands will keep on asking for lines, until you type a line containing only a ".". Watch out for lines starting with a backslash, see |line-continuation|. +Text typed after a "|" command separator is used first. So the following +command in ex mode: > + :a|one + two + . + :visual + + one + two +< NOTE: These commands cannot be used with |:global| or |:vglobal|. ":append" and ":insert" don't work properly in between ":if" and ":endif", ":for" and ":endfor", ":while" and ":endwhile". -- cgit From 8b7c8a099464e8977e00f12829b1bf7334c097b0 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 14 Jul 2024 18:15:50 +0800 Subject: vim-patch:27c5598: runtime(doc): Add hint how to load termdebug from vimrc (#29704) fixes: vim/vim#15256 https://github.com/vim/vim/commit/27c55984def4c6ff7afc89958c90f6018c474b2c Co-authored-by: Christian Brabandt --- runtime/doc/nvim_terminal_emulator.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/nvim_terminal_emulator.txt b/runtime/doc/nvim_terminal_emulator.txt index 5b728078eb..10658ff4ff 100644 --- a/runtime/doc/nvim_terminal_emulator.txt +++ b/runtime/doc/nvim_terminal_emulator.txt @@ -213,6 +213,8 @@ Starting ~ *termdebug-starting* Load the plugin with this command: >vim packadd termdebug +When loading the plugin from the |vimrc| file, add the "!" attribute: >vim + packadd! termdebug < *:Termdebug* To start debugging use `:Termdebug` or `:TermdebugCommand` followed by the command name, for example: >vim -- cgit From 04c158fbec9aeeccd7bd1bb16fc8a688edadd353 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Mon, 15 Jul 2024 00:54:45 +0200 Subject: docs: misc (#29622) Co-authored-by: Christian Clason Co-authored-by: zeertzjq --- runtime/doc/builtin.txt | 2 +- runtime/doc/index.txt | 5 ++--- runtime/doc/various.txt | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index de8bfc3aff..9c59dbf713 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -3583,7 +3583,7 @@ id({expr}) *id()* Note that `v:_null_string`, `v:_null_list`, `v:_null_dict` and `v:_null_blob` have the same `id()` with different types because they are internally represented as NULL pointers. - `id()` returns a hexadecimal representanion of the pointers to + `id()` returns a hexadecimal representation of the pointers to the containers (i.e. like `0x994a40`), same as `printf("%p", {expr})`, but it is advised against counting on the exact format of the return value. diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 384b133d4e..9ee75ea950 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -401,7 +401,7 @@ tag char note action in Normal mode ~ |q| q{0-9a-zA-Z"} record typed characters into named register {0-9a-zA-Z"} (uppercase to append) |q| q (while recording) stops recording -|Q| Q replay last recorded macro +|Q| Q 2 replay last recorded register |q:| q: edit : command-line in command-line window |q/| q/ edit / command-line in command-line window |q?| q? edit ? command-line in command-line window @@ -740,7 +740,7 @@ tag char note action in Normal mode ~ search pattern and Visually select it |gP| ["x]gP 2 put the text [from register x] before the cursor N times, leave the cursor after it -|gQ| gQ switch to "Ex" mode with Vim editing +|gQ| gQ switch to "Ex" mode with Vim editing |gR| gR 2 enter Virtual Replace mode |gT| gT go to the previous tab page |gU| gU{motion} 2 make Nmove text uppercase @@ -927,7 +927,6 @@ tag command note action in Visual mode ~ |v_O| O move horizontally to other corner of area |v_P| P replace highlighted area with register contents; registers are unchanged - Q does not start Ex mode |v_R| R 2 delete the highlighted lines and start insert |v_S| S 2 delete the highlighted lines and start diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 9afb871d93..1acd6941fd 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -215,7 +215,7 @@ gx Opens the current filepath or URL (decided by This implies that an insert command must be completed (to start Insert mode, see |:startinsert|). A ":" command must be completed as well. And you can't use - "Q" or "gQ" to start Ex mode. + "gQ" to start Ex mode. The display is not updated while ":normal" is busy. -- cgit From 8703e7bd1215a1d67053fc189102391e57de6a78 Mon Sep 17 00:00:00 2001 From: Maria José Solano Date: Mon, 15 Jul 2024 12:55:57 -0700 Subject: docs(lpeg): merge upstream changes --- runtime/doc/lua.txt | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index dfaf666874..57796a4716 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -3090,7 +3090,7 @@ In addition, its regex-like interface is available as |vim.re| -Pattern:match({subject}, {init}) *Pattern:match()* +Pattern:match({subject}, {init}, {...}) *Pattern:match()* Matches the given `pattern` against the `subject` string. If the match succeeds, returns the index in the subject of the first character after the match, or the captured values (if the pattern captured any value). An @@ -3113,9 +3113,10 @@ Pattern:match({subject}, {init}) *Pattern:match()* Parameters: ~ • {subject} (`string`) • {init} (`integer?`) + • {...} (`any`) Return: ~ - (`integer|vim.lpeg.Capture?`) + (`any`) ... vim.lpeg.B({pattern}) *vim.lpeg.B()* Returns a pattern that matches only if the input string at the current @@ -3125,7 +3126,7 @@ vim.lpeg.B({pattern}) *vim.lpeg.B()* or failure. Parameters: ~ - • {pattern} (`vim.lpeg.Pattern`) + • {pattern} (`vim.lpeg.Pattern|string|integer|boolean|table`) Return: ~ (`vim.lpeg.Pattern`) @@ -3149,7 +3150,7 @@ vim.lpeg.C({patt}) *vim.lpeg.C()* < Parameters: ~ - • {patt} (`vim.lpeg.Pattern`) + • {patt} (`vim.lpeg.Pattern|string|integer|boolean|table|function`) Return: ~ (`vim.lpeg.Capture`) @@ -3200,11 +3201,11 @@ vim.lpeg.Cf({patt}, {func}) *vim.lpeg.Cf()* This capture assumes that `patt` should produce at least one capture with at least one value (of any type), which becomes the initial value of an accumulator. (If you need a specific initial value, you may prefix a - constant captureto `patt`.) For each subsequent capture, LPeg calls `func` - with this accumulator as the first argument and all values produced by the - capture as extra arguments; the first result from this call becomes the - new value for the accumulator. The final value of the accumulator becomes - the captured value. + constant capture to `patt`.) For each subsequent capture, LPeg calls + `func` with this accumulator as the first argument and all values produced + by the capture as extra arguments; the first result from this call becomes + the new value for the accumulator. The final value of the accumulator + becomes the captured value. Example: >lua local number = lpeg.R('09') ^ 1 / tonumber @@ -3215,7 +3216,7 @@ vim.lpeg.Cf({patt}, {func}) *vim.lpeg.Cf()* < Parameters: ~ - • {patt} (`vim.lpeg.Pattern`) + • {patt} (`vim.lpeg.Pattern|string|integer|boolean|table|function`) • {func} (`fun(acc, newvalue)`) Return: ~ @@ -3227,7 +3228,7 @@ vim.lpeg.Cg({patt}, {name}) *vim.lpeg.Cg()* with the given name (which can be any non-nil Lua value). Parameters: ~ - • {patt} (`vim.lpeg.Pattern`) + • {patt} (`vim.lpeg.Pattern|string|integer|boolean|table|function`) • {name} (`string?`) Return: ~ @@ -3250,8 +3251,9 @@ vim.lpeg.Cmt({patt}, {fn}) *vim.lpeg.Cmt()* function become the values produced by the capture. Parameters: ~ - • {patt} (`vim.lpeg.Pattern`) - • {fn} (`function`) + • {patt} (`vim.lpeg.Pattern|string|integer|boolean|table|function`) + • {fn} (`fun(s: string, i: integer, ...: any)`) (position: + boolean|integer, ...: any) Return: ~ (`vim.lpeg.Capture`) @@ -3290,7 +3292,7 @@ vim.lpeg.Cs({patt}) *vim.lpeg.Cs()* < Parameters: ~ - • {patt} (`vim.lpeg.Pattern`) + • {patt} (`vim.lpeg.Pattern|string|integer|boolean|table|function`) Return: ~ (`vim.lpeg.Capture`) @@ -3303,7 +3305,7 @@ vim.lpeg.Ct({patt}) *vim.lpeg.Ct()* the group name as its key. The captured value is only the table. Parameters: ~ - • {patt} (`vim.lpeg.Pattern|''`) + • {patt} (`vim.lpeg.Pattern|string|integer|boolean|table|function`) Return: ~ (`vim.lpeg.Capture`) @@ -3338,7 +3340,7 @@ vim.lpeg.locale({tab}) *vim.lpeg.locale()* Return: ~ (`vim.lpeg.Locale`) -vim.lpeg.match({pattern}, {subject}, {init}) *vim.lpeg.match()* +vim.lpeg.match({pattern}, {subject}, {init}, {...}) *vim.lpeg.match()* Matches the given `pattern` against the `subject` string. If the match succeeds, returns the index in the subject of the first character after the match, or the captured values (if the pattern captured any value). An @@ -3359,12 +3361,13 @@ vim.lpeg.match({pattern}, {subject}, {init}) *vim.lpeg.match()* < Parameters: ~ - • {pattern} (`vim.lpeg.Pattern`) + • {pattern} (`vim.lpeg.Pattern|string|integer|boolean|table|function`) • {subject} (`string`) • {init} (`integer?`) + • {...} (`any`) Return: ~ - (`integer|vim.lpeg.Capture?`) + (`any`) ... vim.lpeg.P({value}) *vim.lpeg.P()* Converts the given value into a proper pattern. The following rules are @@ -3458,7 +3461,7 @@ vim.lpeg.V({v}) *vim.lpeg.V()* < Parameters: ~ - • {v} (`string|integer`) + • {v} (`boolean|string|number|function|table|thread|userdata|lightuserdata`) Return: ~ (`vim.lpeg.Pattern`) -- cgit From c2b51e6c41c5230af21dc4d978e896ef9e8b922a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 16 Jul 2024 06:24:02 +0800 Subject: vim-patch:df62c62: runtime(doc): grammar fixes in options.txt (#29729) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes: vim/vim#15265 https://github.com/vim/vim/commit/df62c62177bd4dffce880b7a5711594865090953 Co-authored-by: Dominique Pellé --- runtime/doc/options.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index caa6649b17..7dcaa5260a 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1092,7 +1092,7 @@ A jump table for the options with a short description can be found at |Q_op|. applying 'breakindent', even if the resulting text should normally be narrower. This prevents text indented almost to the right window border - occupying lot of vertical space when broken. + occupying lots of vertical space when broken. (default: 20) shift:{n} After applying 'breakindent', the wrapped line's beginning will be shifted by the given number of @@ -3447,7 +3447,7 @@ A jump table for the options with a short description can be found at |Q_op|. in Insert mode as specified with the 'indentkeys' option. When this option is not empty, it overrules the 'cindent' and 'smartindent' indenting. When 'lisp' is set, this option is - is only used when 'lispoptions' contains "expr:1". + only used when 'lispoptions' contains "expr:1". The expression is evaluated with |v:lnum| set to the line number for which the indent is to be computed. The cursor is also in this line when the expression is evaluated (but it may be moved around). @@ -3699,7 +3699,7 @@ A jump table for the options with a short description can be found at |Q_op|. part can be in one of two forms: 1. A list of pairs. Each pair is a "from" character immediately followed by the "to" character. Examples: "aA", "aAbBcC". - 2. A list of "from" characters, a semi-colon and a list of "to" + 2. A list of "from" characters, a semicolon and a list of "to" characters. Example: "abc;ABC" Example: "aA,fgh;FGH,cCdDeE" Special characters need to be preceded with a backslash. These are @@ -3767,7 +3767,7 @@ A jump table for the options with a short description can be found at |Q_op|. update use |:redraw|. This may occasionally cause display errors. It is only meant to be set temporarily when performing an operation where redrawing may cause - flickering or cause a slow down. + flickering or cause a slowdown. *'linebreak'* *'lbr'* *'nolinebreak'* *'nolbr'* 'linebreak' 'lbr' boolean (default off) @@ -4610,7 +4610,7 @@ A jump table for the options with a short description can be found at |Q_op|. set path+= < To use an environment variable, you probably need to replace the separator. Here is an example to append $INCL, in which directory - names are separated with a semi-colon: >vim + names are separated with a semicolon: >vim let &path = &path .. "," .. substitute($INCL, ';', ',', 'g') < Replace the ';' with a ':' or whatever separator is used. Note that this doesn't work when $INCL contains a comma or white space. @@ -5470,7 +5470,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'shortmess' 'shm' string (default "ltToOCF") global This option helps to avoid all the |hit-enter| prompts caused by file - messages, for example with CTRL-G, and to avoid some other messages. + messages, for example with CTRL-G, and to avoid some other messages. It is a list of flags: flag meaning when present ~ l use "999L, 888B" instead of "999 lines, 888 bytes" *shm-l* @@ -5879,7 +5879,7 @@ A jump table for the options with a short description can be found at |Q_op|. minus two. timeout:{millisec} Limit the time searching for suggestions to - {millisec} milli seconds. Applies to the following + {millisec} milliseconds. Applies to the following methods. When omitted the limit is 5000. When negative there is no limit. -- cgit From a0fd51c1e2db17ab21e2a2c907b232d05dfffc88 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 15 Jul 2024 20:02:22 +0200 Subject: vim-patch:1cc4cae: runtime(typst): Add typst runtime files closes: vim/vim#15234 https://github.com/vim/vim/commit/1cc4cae961a7b49608ef7bd56837cc723d49db4d Co-authored-by: Gregory Anders --- runtime/doc/filetype.txt | 4 ++++ runtime/doc/quickfix.txt | 11 +++++++++++ runtime/doc/syntax.txt | 9 +++++++++ 3 files changed, 24 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 70bbd02790..c20651a775 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -991,6 +991,10 @@ You can change the default by defining the variable g:tex_flavor to the format let g:tex_flavor = "latex" Currently no other formats are recognized. +TYPST *ft-typst-plugin* + + *g:typst_conceal* +When |TRUE| the Typst filetype plugin will set the 'conceallevel' option to 2. VIM *ft-vim-plugin* diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 9ac7492b9b..7090694dc6 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1372,6 +1372,17 @@ shells and OSes and also does not allow to use other available TeX options, if any. If your TeX doesn't support "-interaction=nonstopmode", please report it with different means to express \nonstopmode from the command line. +TYPST COMPILER *compiler-typst* + +Vim includes a compiler plugin for Typst files. This compiler is enabled +automatically in Typst buffers by the Typst filetype plugin |ft-typst-plugin|. +Run |:make| to compile the current Typst file. + + *g:typst_cmd* +By default Vim will use "typst" as the command to run the Typst compiler. This +can be changed by setting the |g:typst_cmd| variable: > + let g:typst_cmd = "/path/to/other/command" + ============================================================================= 7. The error format *error-file-format* diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 6394cdc719..fd510eb772 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -3335,6 +3335,15 @@ are highlighted. To disable set it to zero in your .vimrc: > < The default value is 1. +TYPST *ft-typst-syntax* + + *g:typst_embedded_languages* +Typst files can embed syntax highlighting for other languages by setting the +|g:typst_embedded_languages| variable. This variable is a list of language +names whose syntax definitions will be included in Typst files. Example: > + + let g:typst_embedded_languages = ['python', 'r'] + VIM *vim.vim* *ft-vim-syntax* *g:vimsyn_minlines* *g:vimsyn_maxlines* There is a trade-off between more accurate syntax highlighting versus screen -- cgit From 118ae7e5ed6cfab6a49ec70c21da2b850161289c Mon Sep 17 00:00:00 2001 From: altermo <107814000+altermo@users.noreply.github.com> Date: Thu, 11 Jul 2024 18:16:51 +0200 Subject: fix(tohtml): support ranges again --- runtime/doc/lua.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 57796a4716..c1ffc41c24 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -4412,7 +4412,7 @@ vim.text.hexencode({str}) *vim.text.hexencode()* Lua module: tohtml *vim.tohtml* -:TOhtml {file} *:TOhtml* +:[range]TOhtml {file} *:TOhtml* Converts the buffer shown in the current window to HTML, opens the generated HTML in a new split window, and saves its contents to {file}. If {file} is not given, a temporary file (created by |tempname()|) is used. @@ -4434,6 +4434,8 @@ tohtml.tohtml({winid}, {opt}) *tohtml.tohtml.tohtml()* • {width}? (`integer`, default: 'textwidth' if non-zero or window width otherwise) Width used for items which are either right aligned or repeat a character infinitely. + • {range}? (`integer[]`, default: entire buffer) Range of + rows to use. Return: ~ (`string[]`) -- cgit From 61ea4665916909853cf74256a6b350a680f08565 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 16 Jul 2024 22:23:44 +0200 Subject: vim-patch:9.1.0592: runtime: filetype: Mediawiki files are not recognized Problem: filetype: Mediawiki files are not recognized Solution: detect "*.mw" and "*.wiki" as mediawiki filetype, include basic syntax and filetype plugins. (AvidSeeker) closes: vim/vim#15266 https://github.com/vim/vim/commit/b5844104ab1259e061e023ea6259e4eb002e7170 Co-authored-by: AvidSeeker --- runtime/doc/syntax.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index fd510eb772..1be01088e1 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1847,6 +1847,17 @@ have the following in your vimrc: > let filetype_m = "mma" +MEDIAWIKI *ft-mediawiki-syntax* + +Be default, syntax highlighting includes basic HTML tags like style and +headers |html.vim|. For strict Mediawiki syntax highlighting: > + + let g:html_no_rendering = 1 + +If HTML highlighting is desired, terminal-based text formatting such as bold +and italic is possible by: > + + let g:html_style_rendering = 1 MODULA2 *modula2.vim* *ft-modula2-syntax* -- cgit From c146580e9d9fb0d99410665bd42b1edd7405738e Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 16 Jul 2024 22:26:43 +0200 Subject: vim-patch:6a54dcb: runtime(gdscript): add recommended indent options to ftplugin related: vim/vim#15264 https://github.com/vim/vim/commit/6a54dcbbd68e70ee067348d1d9c1898befc56972 Co-authored-by: markmacode --- runtime/doc/filetype.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index c20651a775..2d2cafb494 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -586,6 +586,17 @@ any #lang directive overrides, use the following command: > let g:freebasic_lang = "fblite" +GDSCRIPT *ft-gdscript-plugin* + +By default the following options are set, based on Godot official docs: > + + setlocal noexpandtab softtabstop=0 shiftwidth=0 + +To disable this behavior, set the following variable in your vimrc: > + + let g:gdscript_recommended_style = 0 + + GIT COMMIT *ft-gitcommit-plugin* One command, :DiffGitCached, is provided to show a diff of the current commit -- cgit From 5d8220bda0b668cdaf6d89cdf6fa4ba11e853034 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 16 Jul 2024 22:28:32 +0200 Subject: vim-patch:3e07d5a: runtime(go): add recommended indent options to ftplugin related: vim/vim#15264 https://github.com/vim/vim/commit/3e07d5aef19ac34a61b9d58c2e0698351d392f52 Co-authored-by: markmacode --- runtime/doc/filetype.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 2d2cafb494..cdb6f1d7f0 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -604,6 +604,17 @@ in the preview window. It is equivalent to calling "git diff --cached" plus any arguments given to the command. +GO *ft-go-plugin* + +By default the following options are set, based on Golang official docs: > + + setlocal noexpandtab softtabstop=0 shiftwidth=0 + +To disable this behavior, set the following variable in your vimrc: > + + let g:go_recommended_style = 0 + + GPROF *ft-gprof-plugin* The gprof filetype plugin defines a mapping to jump from a function -- cgit From 8e590cae83c321445a598fcd87bb31b6187402f7 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 16 Jul 2024 22:29:39 +0200 Subject: vim-patch:9.1.0593: filetype: Asymptote files are not recognized Problem: filetype: Asymptote files are not recognized Solution: detect '*.asy' files as asy filetype, include ftplugin and syntax plugin (AvidSeeker). Reference: https://asymptote.sourceforge.io/ closes: vim/vim#15252 https://github.com/vim/vim/commit/3088ef094da721dac8c0363a6c9e14eaf9313929 Co-authored-by: AvidSeeker --- runtime/doc/syntax.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 1be01088e1..4d301bcb80 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -489,6 +489,25 @@ For Visual Basic use: > :let g:filetype_asa = "aspvbs" :let g:filetype_asp = "aspvbs" +ASYMPTOTE *asy.vim* *ft-asy-syntax* + +By default, only basic Asymptote keywords are highlighted. To highlight +extended geometry keywords: > + + :let g:asy_syn_plain = 1 + +and for highlighting keywords related to 3D constructions: > + + :let g:asy_syn_three = 1 + +By default, Asymptote-defined colors (e.g: lightblue) are highlighted. To +highlight TeX-defined colors (e.g: BlueViolet) use: > + + :let g:asy_syn_texcolors = 1 + +or for Xorg colors (e.g: AliceBlue): > + + :let g:asy_syn_x11colors = 1 BAAN *baan.vim* *baan-syntax* -- cgit From 18f1a3aaa5e28421ebe631346e5cca6f75c9b104 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 18 Jul 2024 08:08:56 +0800 Subject: vim-patch:c1b3984: runtime(doc): minor updates. (#29778) closes: vim/vim#15280 https://github.com/vim/vim/commit/c1b3984a7b3cd6adcd1f43e558cb04fad1af3182 Co-authored-by: Shane Harper --- runtime/doc/builtin.txt | 30 +++++++++++++++++------------- runtime/doc/eval.txt | 5 +++-- runtime/doc/gui.txt | 2 +- runtime/doc/quickfix.txt | 4 ++-- runtime/doc/various.txt | 4 ++-- 5 files changed, 25 insertions(+), 20 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 9c59dbf713..dbae18eca5 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -169,16 +169,17 @@ assert_equal({expected}, {actual} [, {msg}]) *assert_equal()* added to |v:errors| and 1 is returned. Otherwise zero is returned. |assert-return| The error is in the form "Expected {expected} but got - {actual}". When {msg} is present it is prefixed to that. + {actual}". When {msg} is present it is prefixed to that, along + with the location of the assert when run from a script. There is no automatic conversion, the String "4" is different from the Number 4. And the number 4 is different from the Float 4.0. The value of 'ignorecase' is not used here, case always matters. Example: >vim - assert_equal('foo', 'bar') -< Will result in a string to be added to |v:errors|: - test.vim line 12: Expected 'foo' but got 'bar' ~ + call assert_equal('foo', 'bar', 'baz') +< Will add the following to |v:errors|: + test.vim line 12: baz: Expected 'foo' but got 'bar' ~ assert_equalfile({fname-one}, {fname-two}) *assert_equalfile()* When the files {fname-one} and {fname-two} do not contain @@ -240,7 +241,8 @@ assert_false({actual} [, {msg}]) *assert_false()* When {actual} is not false an error message is added to |v:errors|, like with |assert_equal()|. The error is in the form "Expected False but got {actual}". - When {msg} is present it is prepended to that. + When {msg} is present it is prepended to that, along + with the location of the assert when run from a script. Also see |assert-return|. A value is false when it is zero. When {actual} is not a @@ -258,7 +260,8 @@ assert_match({pattern}, {actual} [, {msg}]) *assert_match()* When {pattern} does not match {actual} an error message is added to |v:errors|. Also see |assert-return|. The error is in the form "Pattern {pattern} does not match - {actual}". When {msg} is present it is prefixed to that. + {actual}". When {msg} is present it is prefixed to that, + along with the location of the assert when run from a script. {pattern} is used as with |expr-=~|: The matching is always done like 'magic' was set and 'cpoptions' is empty, no matter what @@ -298,7 +301,8 @@ assert_true({actual} [, {msg}]) *assert_true()* Also see |assert-return|. A value is |TRUE| when it is a non-zero number or |v:true|. When {actual} is not a number or |v:true| the assert fails. - When {msg} is given it precedes the default message. + When {msg} is given it precedes the default message, along + with the location of the assert when run from a script. atan({expr}) *atan()* Return the principal value of the arc tangent of {expr}, in @@ -4587,10 +4591,10 @@ matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]]) matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]]) *matchaddpos()* Same as |matchadd()|, but requires a list of positions {pos} instead of a pattern. This command is faster than |matchadd()| - because it does not require to handle regular expressions and - sets buffer line boundaries to redraw screen. It is supposed - to be used when fast match additions and deletions are - required, for example to highlight matching parentheses. + because it does not handle regular expressions and it sets + buffer line boundaries to redraw screen. It is supposed to be + used when fast match additions and deletions are required, for + example to highlight matching parentheses. *E5030* *E5031* {pos} is a list of positions. Each position can be one of these: @@ -7630,8 +7634,8 @@ spellsuggest({word} [, {max} [, {capital}]]) *spellsuggest()* split({string} [, {pattern} [, {keepempty}]]) *split()* Make a |List| out of {string}. When {pattern} is omitted or - empty each white-separated sequence of characters becomes an - item. + empty each white space separated sequence of characters + becomes an item. Otherwise the string is split where {pattern} matches, removing the matched characters. 'ignorecase' is not used here, add \c to ignore case. |/\c| diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 7b4dba5a50..8e52b55bc7 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2166,9 +2166,10 @@ text... let lconst[0] = 2 " Error! let lconst[1][0] = 'b' " OK < *E995* - |:const| does not allow to for changing a variable. > + It is an error to specify an existing variable with + :const. > :let x = 1 - :const x = 2 " Error! + :const x = 1 " Error! < *E996* Note that environment variables, option values and register values cannot be used here, since they cannot diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index 104413ce0d..7e65ab6108 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -548,7 +548,7 @@ name and all existing submenus below it are affected. Examples for Menus *menu-examples* -Here is an example on how to add menu items with menu's! You can add a menu +Here is an example on how to add menu items with menus! You can add a menu item for the keyword under the cursor. The register "z" is used. > :nmenu Words.Add\ Var wb"zye:menu! Words.z z diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 7090694dc6..17c12e7a8d 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1080,8 +1080,8 @@ commands can be combined to create a NewGrep command: > :vim[grep][!] {pattern} {file} ... Like above, but instead of enclosing the pattern in a - non-ID character use a white-separated pattern. The - pattern must start with an ID character. + non-ID character use a white space separated pattern. + The pattern must start with an ID character. Example: > :vimgrep Error *.c < diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 1acd6941fd..9dd84ec4b0 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -28,8 +28,8 @@ CTRL-L Clears and redraws the screen. The redraw may happen :redr[aw][!] Redraws pending screen updates now, or the entire screen if "!" is included. To CLEAR the screen use |:mode| or |CTRL-L|. - Useful to update the screen during a script or - function (or a mapping if 'lazyredraw' set). + It can be used to redraw the screen in a script + or function (or a mapping if |'lazyredraw'| is set). See also |nvim__redraw()|. *:redraws* *:redrawstatus* -- cgit From f61efe3fe77c9a517dccb9fd5ff7f16c0660ced4 Mon Sep 17 00:00:00 2001 From: Evgeni Chasnovski Date: Thu, 18 Jul 2024 18:26:27 +0300 Subject: perf(filetype): implement parent pattern pre-matching (#29660) Problem: calling `vim.filetype.match()` has performance bottleneck in that it has to match a lot of Lua patterns against several versions of input file name. This might be the problem if users need to call it synchronously a lot of times. Solution: add "parent pattern pre-matching" which can be used to quickly reject several potential pattern matches at (usually rare) cost of adding time for one extra Lua pattern match. "Parent pattern" is a manually added/tracked grouping of filetype patterns which should have two properties: - Match at least the same set of strings as its filetype patterns. But not too much more. - Be fast to match. For them to be effective, group should consist from at least three filetype patterns. Example: for a filetpye pattern ".*/etc/a2ps/.*%.cfg", both "/etc/" and "%.cfg" are good parent patterns (prefer the one which can group more filetype patterns). After this commit, `vim.filetype.match()` on most inputs runs ~3.4 times faster (while some inputs may see less impact if they match many parent patterns). --- runtime/doc/dev_vimpatch.txt | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/dev_vimpatch.txt b/runtime/doc/dev_vimpatch.txt index d6e4ced054..6d450424c5 100644 --- a/runtime/doc/dev_vimpatch.txt +++ b/runtime/doc/dev_vimpatch.txt @@ -302,4 +302,40 @@ used in new documentation: - `{Only when compiled with ...}`: the vast majority of features have been made non-optional (see https://github.com/neovim/neovim/wiki/Introduction) +============================================================================== +FILETYPE DETECTION *dev-vimpatch-filetype* + +Nvim's filetype detection behavior matches Vim, but is implemented as part of +|vim.filetype| (see $VIMRUNTIME/lua/vim/filetype.lua). + +Pattern matching has several differences: +- It is done using explicit Lua patterns (without implicit anchoring) instead + of Vim regexes: > + "*/debian/changelog" -> "/debian/changelog$" + "*/bind/db.*" -> "/bind/db%." +< +- Filetype patterns are grouped by their parent pattern to improve matching + performance. For this to work properly, parent pattern should: + - Match at least the same set of strings as filetype patterns inside it. + But not too much more. + - Be fast to match. + + When adding a new filetype with pattern matching, consider the following: + - If there is already a group with appropriate parent pattern, use it. + - If there can be a fast and specific enough pattern to group at least + 3 filetype patterns, add it as a separate grouped entry. + + Good new parent pattern should be: + - Fast. Good rule of thumb is that it should be a short explicit string + (i.e. no quantifiers or character sets). + - Specific. Good rules of thumb (from best to worst): + - Full directory name (like "/etc/", "/log/"). + - Part of a rare enough directory name (like "/conf", "git/"). + - String reasonably rarely used in real full paths (like "nginx"). + + Example: + - Filetype pattern: ".*/etc/a2ps/.*%.cfg" + - Good parent: "/etc/"; "%.cfg$" + - Bad parent: "%." - fast, not specific; "/a2ps/.*%." - slow, specific + vim:tw=78:ts=8:noet:ft=help:norl: -- cgit From f73904f9d6b6129c6358e2a54521abda271127db Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 19 Jul 2024 12:12:13 +0800 Subject: vim-patch:eb6d733: runtime(doc): fix more inconsistencies in assert function docs (#29796) related: https://github.com/vim/vim/pull/15280#issuecomment-2233771449 closes: vim/vim#15285 https://github.com/vim/vim/commit/eb6d733bef312a0634770e023e8a41f0347f1503 --- runtime/doc/builtin.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index dbae18eca5..08a9022aff 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -169,8 +169,8 @@ assert_equal({expected}, {actual} [, {msg}]) *assert_equal()* added to |v:errors| and 1 is returned. Otherwise zero is returned. |assert-return| The error is in the form "Expected {expected} but got - {actual}". When {msg} is present it is prefixed to that, along - with the location of the assert when run from a script. + {actual}". When {msg} is present it is prefixed to that, + along with the location of the assert when run from a script. There is no automatic conversion, the String "4" is different from the Number 4. And the number 4 is different from the @@ -211,16 +211,16 @@ assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]]) When {error} is a string it must be found literally in the first reported error. Most often this will be the error code, including the colon, e.g. "E123:". >vim - assert_fails('bad cmd', 'E987:') + call assert_fails('bad cmd', 'E987:') < When {error} is a |List| with one or two strings, these are used as patterns. The first pattern is matched against the first reported error: >vim - assert_fails('cmd', ['E987:.*expected bool']) + call assert_fails('cmd', ['E987:.*expected bool']) < The second pattern, if present, is matched against the last reported error. To only match the last error use an empty string for the first error: >vim - assert_fails('cmd', ['', 'E987:']) + call assert_fails('cmd', ['', 'E987:']) < If {msg} is empty then it is not used. Do this to get the default message when passing the {lnum} argument. @@ -241,8 +241,8 @@ assert_false({actual} [, {msg}]) *assert_false()* When {actual} is not false an error message is added to |v:errors|, like with |assert_equal()|. The error is in the form "Expected False but got {actual}". - When {msg} is present it is prepended to that, along - with the location of the assert when run from a script. + When {msg} is present it is prefixed to that, along with the + location of the assert when run from a script. Also see |assert-return|. A value is false when it is zero. When {actual} is not a @@ -272,7 +272,7 @@ assert_match({pattern}, {actual} [, {msg}]) *assert_match()* Use both to match the whole text. Example: >vim - assert_match('^f.*o$', 'foobar') + call assert_match('^f.*o$', 'foobar') < Will result in a string to be added to |v:errors|: test.vim line 12: Pattern '^f.*o$' does not match 'foobar' ~ @@ -301,8 +301,8 @@ assert_true({actual} [, {msg}]) *assert_true()* Also see |assert-return|. A value is |TRUE| when it is a non-zero number or |v:true|. When {actual} is not a number or |v:true| the assert fails. - When {msg} is given it precedes the default message, along - with the location of the assert when run from a script. + When {msg} is given it is prefixed to the default message, + along with the location of the assert when run from a script. atan({expr}) *atan()* Return the principal value of the arc tangent of {expr}, in -- cgit From 80eda9726f9fe0810b8d689a2c9c7821cb95a8d6 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 21 Jul 2024 13:18:25 +0200 Subject: docs(lua): clarify assumptions on luajit vs. puc lua Problem: Plugin authors and distribution packagers are confused about the role of LuaJIT vs. PUC Lua. Solution: Clarify that LuaJIT is preferred but not required (extensions should not be assumed but checked for) and that vanilla Lua 5.1 should be used without language extensions such as `goto`. --- runtime/doc/lua.txt | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index c1ffc41c24..01535a4e41 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -28,17 +28,18 @@ You can also run Lua scripts from your shell using the |-l| argument: > nvim -l foo.lua [args...] < *lua-compat* -Lua 5.1 is the permanent interface for Nvim Lua. Plugins need only consider -Lua 5.1, not worry about forward-compatibility with future Lua versions. If -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 5.1 is the permanent interface for Nvim Lua. Plugins should target Lua 5.1 +as specified in |luaref|; later versions (which are essentially different, +incompatible, dialects) are not supported. This includes extensions such as +`goto` that some Lua 5.1 interpreters like LuaJIT may support. *lua-luajit* -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 +While Nvim officially only requires Lua 5.1 support, it should be built with +LuaJIT or a compatible fork on supported platforms for performance reasons. +LuaJIT also comes with useful extensions such as `ffi`, |lua-profile|, and +enhanced standard library functions; these cannot be assumed to be available, +and Lua code in |init.lua| or plugins should check the `jit` global variable +before using them: >lua if jit then -- code for luajit else @@ -46,11 +47,12 @@ variable: >lua end < *lua-bit* -The LuaJIT "bit" extension module is _always_ available: when built with PUC -Lua, Nvim includes a fallback implementation which provides `require("bit")`. +One exception is the LuaJIT `bit` extension, which 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 +If Nvim is built with LuaJIT, Lua code can be profiled via >lua -- Start a profiling session: require('jit.p').start('ri1', '/tmp/profile') @@ -59,7 +61,7 @@ To profile Lua code (with LuaJIT-enabled Nvim), the basic steps are: >lua -- 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: > +See https://luajit.org/ext_profiler.html or the `p.lua` source for details: > :lua vim.cmd.edit(package.searchpath('jit.p', package.path)) ============================================================================== -- cgit From 0cdeb06db0062951f2f2d2998510e2fff7e0faee Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 25 Jul 2024 09:55:59 +0800 Subject: vim-patch:ddbb6fe: runtime(vim): Update base-syntax, improve :set highlighting (#29850) - Match bang, "all" and "termcap" options, and trailing command separator "|". - Highlight set assignment operators. - Match multiline :set and multiline option values. - Mention the newer "0o" octal prefix at :help :set=. closes: vim/vim#15329 https://github.com/vim/vim/commit/ddbb6fe2d0344e93436c5602b7a06169f49a9b52 Co-authored-by: Doug Kearns --- runtime/doc/options.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 7dcaa5260a..adc6dfc890 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -58,7 +58,8 @@ achieve special effects. These options come in three forms: :se[t] {option}:{value} Set string or number option to {value}. For numeric options the value can be given in decimal, - hex (preceded with 0x) or octal (preceded with '0'). + hex (preceded with 0x) or octal (preceded with '0' or + '0o'). The old value can be inserted by typing 'wildchar' (by default this is a ). Many string options with fixed syntax also support completing known values. -- cgit From 108d2bf74bc02eaed74beae5589d7116936aefa5 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Thu, 25 Jul 2024 09:26:13 +0200 Subject: vim-patch:e73e5b8: runtime(java): Optionally highlight the :: token for method references This token will be highlighted, similar to the arrow of lambda expressions, whenever "g:java_highlight_functions" is defined. Also: - Improve the recognition of _switch-case_ labels (D-Cysteine). - Remove insignificant empty statements in syntax test files. closes: vim/vim#15322 References: https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.13 https://github.com/fleiner/vim/pull/1 https://github.com/vim/vim/commit/e73e5b889b52675a9ea58cf154235c7f25d107d5 Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com> Co-authored-by: D-Cysteine <54219287+D-Cysteine@users.noreply.github.com> --- runtime/doc/syntax.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 4d301bcb80..f7a8940a52 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1574,11 +1574,11 @@ use the following: > :let java_highlight_java_io=1 Check the javaid.vim file for a list of all the packages that are supported. -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 -headers of function declarations: +Headers of indented function declarations can be highlighted (along with parts +of lambda expressions and method reference expressions), but it depends on how +you write Java code. Two formats are recognized: -If you write function declarations that are consistently indented by either +1) 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" @@ -1590,10 +1590,12 @@ a tab, or a space . . . or eight space character(s), you may want to set > :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) and there is any -amount of indentation, you may want to set > + +2) However, if you follow the Java guidelines about how functions and types +are 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" + In addition, you can combine any value of "java_highlight_functions" with > :let java_highlight_signature=1 to have the name of a function with its parameter list parens distinctly -- cgit From 60967cd9aac545a5a5f17070d39121d4070e2298 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 27 Jul 2024 16:48:29 +0800 Subject: vim-patch:9.1.0616: filetype: Make syntax highlighting off for MS Makefiles (#29874) Problem: filetype: Make syntax highlighting off for MS Makefiles Solution: Try to detect MS Makefiles and adjust syntax rules to it. (Ken Takata) Highlighting of variable expansion in Microsoft Makefile can be broken. E.g.: https://github.com/vim/vim/blob/2979cfc2627d76a9c09cad46a1647dcd4aa73f5f/src/Make_mvc.mak#L1331 Don't use backslash as escape characters if `make_microsoft` is set. Also fix that `make_no_comments` was not considered if `make_microsoft` was set. Also add description for `make_microsoft` and `make_no_comments` to the documentation and include a very simple filetype test closes: vim/vim#15341 https://github.com/vim/vim/commit/eb4b903c9b238ebcc1d14cfcb207129b4931a33d Co-authored-by: Ken Takata --- runtime/doc/syntax.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index f7a8940a52..2a008cb50e 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1806,7 +1806,7 @@ By default mail.vim synchronises syntax to 100 lines before the first displayed line. If you have a slow machine, and generally deal with emails with short headers, you can change this to a smaller value: > - :let mail_minlines = 30 + :let mail_minlines = 30 MAKE *make.vim* *ft-make-syntax* @@ -1817,6 +1817,16 @@ feature off by using: > :let make_no_commands = 1 +Comments are also highlighted by default. You can turn this off by using: > + + :let make_no_comments = 1 + +Microsoft Makefile handles variable expansion and comments differently +(backslashes are not used for escape). If you see any wrong highlights +because of this, you can try this: > + + :let make_microsoft = 1 + MAPLE *maple.vim* *ft-maple-syntax* -- cgit From f132f8e9d43e3e5f56079bcae40d87b871d7b61b Mon Sep 17 00:00:00 2001 From: glepnir Date: Sat, 27 Jul 2024 17:57:19 +0800 Subject: vim-patch:9.1.0618: cannot mark deprecated attributes in completion menu Problem: cannot mark deprecated attributes in completion menu Solution: add hl_group to the Dictionary of supported completion fields (glepnir) closes: vim/vim#15314 https://github.com/vim/vim/commit/508e7856ec4afc9d6038b14bb6893668268dccab Co-authored-by: glepnir --- runtime/doc/insert.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index e12f240430..47d0b3b839 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1177,6 +1177,12 @@ items: user_data custom data which is associated with the item and available in |v:completed_item|; it can be any type; defaults to an empty string + hl_group allows specifying an additional highlight group to + apply extra attributes to completion items in the + popupmenu. Is combined with |hl-PmenuSel| and + |hl-Pmenu| highlighting attributes to apply cterm and + gui properties, such as strikethrough to the + completion items. All of these except "icase", "equal", "dup" and "empty" must be a string. If an item does not meet these requirements then an error message is given and -- cgit From b8b0e9db3f91fbaa8835b90c683c33310064c8c8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 27 Jul 2024 21:44:05 +0800 Subject: vim-patch:9.1.0629: Rename of pum hl_group is incomplete Problem: Rename of pum hl_group is incomplete in source. Solution: Also rename the test function. Rename to user_hlattr in code to avoid confusion with pum_extra. Add test with matched text highlighting (zeertzjq). closes: vim/vim#15348 https://github.com/vim/vim/commit/4100852e099133a0c9603e1087e5dc6d82001ce7 --- runtime/doc/insert.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index 47d0b3b839..ee83de9c71 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1177,12 +1177,12 @@ items: user_data custom data which is associated with the item and available in |v:completed_item|; it can be any type; defaults to an empty string - hl_group allows specifying an additional highlight group to - apply extra attributes to completion items in the - popupmenu. Is combined with |hl-PmenuSel| and - |hl-Pmenu| highlighting attributes to apply cterm and - gui properties, such as strikethrough to the - completion items. + hl_group an additional highlight group whose attributes are + combined with |hl-PmenuSel| and |hl-Pmenu| or + |hl-PmenuMatchSel| and |hl-PmenuMatch| highlight + attributes in the popup menu to apply cterm and gui + properties (with higher priority) like strikethrough + to the completion items All of these except "icase", "equal", "dup" and "empty" must be a string. If an item does not meet these requirements then an error message is given and -- cgit From 5aa1a9532cbac835ad027ebdf04311c7e8fb7007 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 28 Jul 2024 12:14:23 +0200 Subject: docs(treesitter): don't quote metadata --- runtime/doc/treesitter.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index ed514cb722..2249f4865c 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -337,7 +337,7 @@ TREESITTER QUERY DIRECTIVES *treesitter-directives* Treesitter directives store metadata for a node or match and perform side effects. For example, the `set!` directive sets metadata on the match or node: >query - ((identifier) @foo (#set! "type" "parameter")) + ((identifier) @foo (#set! type "parameter")) < The following directives are built in: @@ -352,9 +352,9 @@ The following directives are built in: {value} Examples: >query - ((identifier) @foo (#set! @foo "kind" "parameter")) - ((node1) @left (node2) @right (#set! "type" "pair")) - ((codeblock) @markup.raw.block (#set! "priority" 90)) + ((identifier) @foo (#set! @foo kind "parameter")) + ((node1) @left (node2) @right (#set! type "pair")) + ((codeblock) @markup.raw.block (#set! priority 90)) < `offset!` *treesitter-directive-offset!* Takes the range of the captured node and applies an offset. This will @@ -638,7 +638,7 @@ higher than treesitter. It is also possible to change the priority of an individual query pattern manually by setting its `"priority"` metadata attribute: >query - ((super_important_node) @superimportant (#set! "priority" 105)) + ((super_important_node) @superimportant (#set! priority 105)) < ============================================================================== -- cgit From fe5030c05ec52cab7de03a9ee9150e855b9eefa1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 29 Jul 2024 08:02:31 +0800 Subject: vim-patch:partial:52e7cc2: runtime(doc): tweak documentation style a bit (#29897) closes: vim/vim#15371 https://github.com/vim/vim/commit/52e7cc26d81c61fff1b2e3b32e8b9b04347be1d3 Co-authored-by: h-east --- runtime/doc/eval.txt | 2 +- runtime/doc/insert.txt | 2 +- runtime/doc/options.txt | 6 +++--- runtime/doc/usr_05.txt | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 8e52b55bc7..b6d16795d2 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2167,7 +2167,7 @@ text... let lconst[1][0] = 'b' " OK < *E995* It is an error to specify an existing variable with - :const. > + |:const|. > :let x = 1 :const x = 1 " Error! < *E996* diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index ee83de9c71..5ac87de0a4 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1939,7 +1939,7 @@ command in ex mode: > two . :visual - +appends the following text, after the cursor line: > one two < diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index adc6dfc890..18ca8ea948 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -4432,17 +4432,17 @@ A jump table for the options with a short description can be found at |Q_op|. Using CTRL-X on "0" or CTRL-A on "18446744073709551615" (2^64 - 1) has no effect, overflow is prevented. blank If included, treat numbers as signed or unsigned based on - preceding whitespace. If a number with a leading dash has its + preceding whitespace. If a number with a leading dash has its dash immediately preceded by a non-whitespace character (i.e., not a tab or a " "), the negative sign won't be considered as part of the number. For example: Using CTRL-A on "14" in "Carbon-14" results in "Carbon-15" (without "blank" it would become "Carbon-13"). Using CTRL-X on "8" in "Carbon -8" results in "Carbon -9" - (because -8 is preceded by whitespace. If "unsigned" was + (because -8 is preceded by whitespace. If "unsigned" was set, it would result in "Carbon -7"). If this format is included, overflow is prevented as if - "unsigned" were set. If both this format and "unsigned" are + "unsigned" were set. If both this format and "unsigned" are included, "unsigned" will take precedence. Numbers which simply begin with a digit in the range 1-9 are always diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt index 1c936d5f9d..698d1207d3 100644 --- a/runtime/doc/usr_05.txt +++ b/runtime/doc/usr_05.txt @@ -240,7 +240,8 @@ Adding nohlsearch package *nohlsearch-install* Load the plugin with this command: > packadd nohlsearch < -Automatically execute |:nohlsearch| after 'updatetime' or getting into |Insert| mode. +Automatically execute |:nohlsearch| after 'updatetime' or getting into +|Insert| mode. Thus assuming default updatetime, hlsearch would be suspended/turned off after 4 seconds of idle time. -- cgit From bd3b6ec8360e0dd6edfe74c3d0013fd2b98b989e Mon Sep 17 00:00:00 2001 From: Riley Bruins Date: Sun, 28 Jul 2024 13:23:40 -0700 Subject: feat(treesitter): add node_for_range function This is identical to `named_node_for_range` except that it includes anonymous nodes. This maintains consistency in the API because we already have `descendant_for_range` and `named_descendant_for_range`. --- runtime/doc/news.txt | 2 +- runtime/doc/treesitter.txt | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 2514ee8a92..2ddda72ae8 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -166,7 +166,7 @@ TERMINAL TREESITTER -• TODO +• |LanguageTree:node_for_range()| gets anonymous and named nodes for a range TUI diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 2249f4865c..cd8a4d8ec5 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -1366,6 +1366,19 @@ LanguageTree:language_for_range({range}) LanguageTree:named_node_for_range({range}, {opts}) Gets the smallest named node that contains {range}. + Parameters: ~ + • {range} (`Range4`) `{ start_line, start_col, end_line, end_col }` + • {opts} (`table?`) A table with the following fields: + • {ignore_injections}? (`boolean`, default: `true`) Ignore + injected languages + + Return: ~ + (`TSNode?`) + + *LanguageTree:node_for_range()* +LanguageTree:node_for_range({range}, {opts}) + Gets the smallest node that contains {range}. + Parameters: ~ • {range} (`Range4`) `{ start_line, start_col, end_line, end_col }` • {opts} (`table?`) A table with the following fields: -- cgit From 1af55bfcf21b9bc7594b9c5ee0c2f60cbb887654 Mon Sep 17 00:00:00 2001 From: Riley Bruins Date: Sun, 28 Jul 2024 13:30:33 -0700 Subject: feat(treesitter): allow get_node to return anonymous nodes Adds a new field `include_anonymous` to the `get_node` options to allow anonymous nodes to be returned. --- runtime/doc/news.txt | 2 ++ runtime/doc/treesitter.txt | 2 ++ 2 files changed, 4 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 2ddda72ae8..745e84d02e 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -167,6 +167,8 @@ TERMINAL TREESITTER • |LanguageTree:node_for_range()| gets anonymous and named nodes for a range +• |vim.treesitter.get_node()| now takes an option `include_anonymous`, default + false, which allows it to return anonymous nodes as well as named nodes. TUI diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index cd8a4d8ec5..97f77c9e31 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -773,6 +773,8 @@ get_node({opts}) *vim.treesitter.get_node()* filetype) • {ignore_injections} (`boolean?`) Ignore injected languages (default true) + • {include_anonymous} (`boolean?`) Include anonymous nodes + (default false) Return: ~ (`TSNode?`) Node at the given position -- cgit From 0af056ebce189deedb58f7048108977fa5d81713 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 30 Jul 2024 11:46:24 +0800 Subject: vim-patch:49cdd62: runtime(doc): list of new/changed features in version9.txt closes: vim/vim#13753 https://github.com/vim/vim/commit/49cdd629a39d7e40e7349e65cb177e2442871a04 Co-authored-by: Yegappan Lakshmanan --- runtime/doc/builtin.txt | 4 ++++ runtime/doc/map.txt | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 08a9022aff..4ef1573494 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -3901,6 +3901,10 @@ items({dict}) *items()* for [key, value] in items(mydict) echo key .. ': ' .. value endfor +< + A List or a String argument is also supported. In these + cases, items() returns a List with the index and the value at + the index. jobpid({job}) *jobpid()* Return the PID (process id) of |job-id| {job}. diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index ce2fbda045..e6eb01dae3 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -354,7 +354,8 @@ Note: *E1255* *E1136* commands must terminate, that is, they must be followed by in the -{rhs} of the mapping definition. |Command-line| mode is never entered. +{rhs} of the mapping definition. |Command-line| mode is never entered. To use +a literal in the {rhs}, use ||. 1.3 MAPPING AND MODES *:map-modes* -- cgit From 1dd2bf926d14297e979509dbb731825a32f649b9 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 30 Jul 2024 21:41:08 +0200 Subject: vim-patch:df9f67e: runtime(html): update syntax script to sync by 250 minlines by default closes: vim/vim#14071 https://github.com/vim/vim/commit/df9f67e10d214e0124f2141f59593529801307a4 Co-authored-by: Christian Brabandt --- runtime/doc/syntax.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 2a008cb50e..893217d8ea 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1436,6 +1436,10 @@ You can also disable this rendering by adding the following line to your vimrc file: > :let html_no_rendering=1 +By default Vim synchronises the syntax to 250 lines before the first displayed +line. This can be configured using: > + :let html_minlines = 500 +< HTML comments are rather special (see an HTML reference document for the details), and the syntax coloring scheme will highlight all errors. However, if you prefer to use the wrong style (starts with