diff options
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/api.txt | 4 | ||||
-rw-r--r-- | runtime/doc/autocmd.txt | 8 | ||||
-rw-r--r-- | runtime/doc/builtin.txt | 25 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 23 | ||||
-rw-r--r-- | runtime/doc/lsp.txt | 235 | ||||
-rw-r--r-- | runtime/doc/lua-guide.txt | 2 | ||||
-rw-r--r-- | runtime/doc/lua.txt | 19 | ||||
-rw-r--r-- | runtime/doc/map.txt | 8 | ||||
-rw-r--r-- | runtime/doc/news.txt | 14 | ||||
-rw-r--r-- | runtime/doc/options.txt | 49 | ||||
-rw-r--r-- | runtime/doc/repeat.txt | 4 | ||||
-rw-r--r-- | runtime/doc/starting.txt | 8 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 4 | ||||
-rw-r--r-- | runtime/doc/treesitter.txt | 18 | ||||
-rw-r--r-- | runtime/doc/ui.txt | 1 | ||||
-rw-r--r-- | runtime/doc/usr_41.txt | 1 |
16 files changed, 255 insertions, 168 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index d74657dc8e..95a929b808 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -1133,7 +1133,7 @@ nvim_list_uis() *nvim_list_uis()* • "width" Requested width of the UI • "rgb" true if the UI uses RGB colors (false implies |cterm-colors|) • "ext_..." Requested UI extensions, see |ui-option| - • "chan" Channel id of remote UI or 0 for TUI + • "chan" |channel-id| of remote UI nvim_list_wins() *nvim_list_wins()* Gets the current list of window handles. @@ -3281,7 +3281,7 @@ nvim_create_autocmd({event}, {*opts}) *nvim_create_autocmd()* • match: (string) expanded value of |<amatch>| • buf: (number) expanded value of |<abuf>| • file: (string) expanded value of |<afile>| - • data: (any) arbitrary data passed to + • data: (any) arbitrary data passed from |nvim_exec_autocmds()| • command (string) optional: Vim command to execute on event. diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index a39407aeca..8cc4754880 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -681,16 +681,12 @@ FuncUndefined When a user function is used but it isn't UIEnter After a UI connects via |nvim_ui_attach()|, or after builtin TUI is started, after |VimEnter|. Sets these |v:event| keys: - chan: 0 for builtin TUI - 1 for |--embed| - |channel-id| of the UI otherwise + chan: |channel-id| of the UI *UILeave* UILeave After a UI disconnects from Nvim, or after builtin TUI is stopped, after |VimLeave|. Sets these |v:event| keys: - chan: 0 for builtin TUI - 1 for |--embed| - |channel-id| of the UI otherwise + chan: |channel-id| of the UI *InsertChange* InsertChange When typing <Insert> while in Insert or Replace mode. The |v:insertmode| variable diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index cc1d1b568d..c8f5570bae 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -173,6 +173,7 @@ getbufline({buf}, {lnum} [, {end}]) getbufoneline({buf}, {lnum}) String line {lnum} of buffer {buf} getbufvar({buf}, {varname} [, {def}]) any variable {varname} in buffer {buf} +getcellwidths() List get character cell width overrides getchangelist([{buf}]) List list of change list items getchar([expr]) Number or String get one character from the user @@ -2745,6 +2746,13 @@ getbufvar({buf}, {varname} [, {def}]) *getbufvar()* < Can also be used as a |method|: > GetBufnr()->getbufvar(varname) < +getcellwidths() *getcellwidths()* + Returns a |List| of cell widths of character ranges overridden + by |setcellwidths()|. The format is equal to the argument of + |setcellwidths()|. If no character ranges have their cell + widths overridden, an empty List is returned. + + getchangelist([{buf}]) *getchangelist()* Returns the |changelist| for the buffer {buf}. For the use of {buf}, see |bufname()| above. If buffer {buf} doesn't @@ -2958,7 +2966,8 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* arglist file names in argument list augroup autocmd groups buffer buffer names - behave :behave suboptions + behave |:behave| suboptions + breakpoint |:breakadd| and |:breakdel| suboptions cmdline |cmdline-completion| result color color schemes command Ex command @@ -2974,7 +2983,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* function function name help help subjects highlight highlight groups - history :history suboptions + history |:history| suboptions locale locale names (as output of locale -a) mapclear buffer argument mapping mapping name @@ -2982,6 +2991,8 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* messages |:messages| suboptions option options packadd optional package |pack-add| names + runtime |:runtime| completion + scriptnames sourced script names |:scriptnames| shellcmd Shell command sign |:sign| suboptions syntax syntax file names |'syntax'| @@ -2999,6 +3010,13 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* is applied to filter the results. Otherwise all the matches are returned. The 'wildignorecase' option always applies. + If the 'wildoptions' option contains "fuzzy", then fuzzy + matching is used to get the completion matches. Otherwise + regular expression matching is used. Thus this function + follows the user preference, what happens on the command line. + If you do not want this you can make 'wildoptions' empty + before calling getcompletion() and restore it afterwards. + If {type} is "cmdline", then the |cmdline-completion| result is returned. For example, to complete the possible values after a ":call" command: > @@ -6934,7 +6952,7 @@ setcellwidths({list}) *setcellwidths()* {low} and {high} can be the same, in which case this refers to one character. Otherwise it is the range of characters from {low} to {high} (inclusive). *E1111* *E1114* - Only characters with value 0x100 and higher can be used. + Only characters with value 0x80 and higher can be used. {width} must be either 1 or 2, indicating the character width in screen cells. *E1112* @@ -8311,6 +8329,7 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()* "underdotted" "1" if dotted underlined "underdashed" "1" if dashed underlined "strikethrough" "1" if struckthrough + "altfont" "1" if alternative font "nocombine" "1" if nocombine Returns an empty string on error. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 6feb5cbb49..58759a6053 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2295,13 +2295,15 @@ v:version Vim version number: major version times 100 plus minor :if has("nvim-0.2.1") < - *v:vim_did_enter* *vim_did_enter-variable* -v:vim_did_enter 0 during startup, 1 just before |VimEnter|. + *v:virtnum* *virtnum-variable* +v:virtnum Virtual line number for the 'statuscolumn' expression. + Negative when drawing the status column for virtual lines, zero + when drawing an actual buffer line, and positive when drawing + the wrapped part of a buffer line. Read-only. - *v:wrap* *wrap-variable* -v:wrap Boolean indicating whether 'statuscolumn' is being evaluated - for the wrapped part of a line. + *v:vim_did_enter* *vim_did_enter-variable* +v:vim_did_enter 0 during startup, 1 just before |VimEnter|. Read-only. *v:warningmsg* *warningmsg-variable* @@ -2679,6 +2681,8 @@ text... [depth] is relevant when locking a |List| or |Dictionary|. It specifies how deep the locking goes: + 0 Lock the variable {name} but not its + value. 1 Lock the |List| or |Dictionary| itself, cannot add or remove items, but can still change their values. @@ -2692,7 +2696,14 @@ text... |Dictionary|, one level deeper. The default [depth] is 2, thus when {name} is a |List| or |Dictionary| the values cannot be changed. - *E743* + + Example with [depth] 0: > + let mylist = [1, 2, 3] + lockvar 0 mylist + let mylist[0] = 77 " OK + call add(mylist, 4] " OK + let mylist = [7, 8, 9] " Error! +< *E743* For unlimited depth use [!] and omit [depth]. However, there is a maximum depth of 100 to catch loops. diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 46cfa60529..215515a2d9 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -832,128 +832,118 @@ start({config}, {opts}) *vim.lsp.start()* start_client({config}) *vim.lsp.start_client()* Starts and initializes a client with the given configuration. - Parameter `cmd` is required. - - The following parameters describe fields in the {config} table. - - Parameters: ~ - • {cmd} (table|string|fun(dispatchers: table):table) - command string or list treated like |jobstart()|. - The command must launch the language server - process. `cmd` can also be a function that - creates an RPC client. The function receives a - dispatchers table and must return a table with - the functions `request`, `notify`, `is_closing` - and `terminate` See |vim.lsp.rpc.request()| and - |vim.lsp.rpc.notify()| For TCP there is a - built-in rpc client factory: - |vim.lsp.rpc.connect()| - • {cmd_cwd} (string, default=|getcwd()|) Directory to launch - the `cmd` process. Not related to `root_dir`. - • {cmd_env} (table) Environment flags to pass to the LSP on - spawn. Can be specified using keys like a map or - as a list with `k=v` pairs or both. Non-string values are coerced to - string. Example: > - - { "PRODUCTION=true"; "TEST=123"; PORT = 8080; HOST = "0.0.0.0"; } + Field `cmd` in {config} is required. + + Parameters: ~ + • {config} (table) Configuration for the server: + • cmd: (table|string|fun(dispatchers: table):table) command + string or list treated like |jobstart()|. The command must + launch the language server process. `cmd` can also be a + function that creates an RPC client. The function receives + a dispatchers table and must return a table with the + functions `request`, `notify`, `is_closing` and + `terminate` See |vim.lsp.rpc.request()| and + |vim.lsp.rpc.notify()| For TCP there is a built-in rpc + client factory: |vim.lsp.rpc.connect()| + • cmd_cwd: (string, default=|getcwd()|) Directory to launch + the `cmd` process. Not related to `root_dir`. + • cmd_env: (table) Environment flags to pass to the LSP on + spawn. Can be specified using keys like a map or as a list + with `k=v` pairs or both. Non-string values are coerced to string. + Example: > + + { "PRODUCTION=true"; "TEST=123"; PORT = 8080; HOST = "0.0.0.0"; } < - • {detached} (boolean, default true) Daemonize the server - process so that it runs in a separate process - group from Nvim. Nvim will shutdown the process - on exit, but if Nvim fails to exit cleanly this - could leave behind orphaned server processes. - • {workspace_folders} (table) List of workspace folders passed to the - language server. For backwards compatibility - rootUri and rootPath will be derived from the - first workspace folder in this list. See - `workspaceFolders` in the LSP spec. - • {capabilities} Map overriding the default capabilities defined - by |vim.lsp.protocol.make_client_capabilities()|, - passed to the language server on initialization. - Hint: use make_client_capabilities() and modify - its result. - • Note: To send an empty dictionary use - `{[vim.type_idx]=vim.types.dictionary}`, else - it will be encoded as an array. - • {handlers} Map of language server method names to - |lsp-handler| - • {settings} Map with language server specific settings. These - are returned to the language server if requested - via `workspace/configuration`. Keys are - case-sensitive. - • {commands} (table) Table that maps string of clientside - commands to user-defined functions. Commands - passed to start_client take precedence over the - global command registry. Each key must be a - unique command name, and the value is a function - which is called if any LSP action (code action, - code lenses, ...) triggers the command. - • {init_options} Values to pass in the initialization request as - `initializationOptions`. See `initialize` in the - LSP spec. - • {name} (string, default=client-id) Name in log messages. - • {get_language_id} function(bufnr, filetype) -> language ID as - string. Defaults to the filetype. - • {offset_encoding} (default="utf-16") One of "utf-8", "utf-16", or - "utf-32" which is the encoding that the LSP - server expects. Client does not verify this is - correct. - • {on_error} Callback with parameters (code, ...), invoked - when the client operation throws an error. `code` - is a number describing the error. Other arguments - may be passed depending on the error kind. See - `vim.lsp.rpc.client_errors` for possible errors. - Use `vim.lsp.rpc.client_errors[code]` to get - human-friendly name. - • {before_init} Callback with parameters (initialize_params, - config) invoked before the LSP "initialize" - phase, where `params` contains the parameters - being sent to the server and `config` is the - config that was passed to - |vim.lsp.start_client()|. You can use this to - modify parameters before they are sent. - • {on_init} Callback (client, initialize_result) invoked - after LSP "initialize", where `result` is a table - of `capabilities` and anything else the server - may send. For example, clangd sends - `initialize_result.offsetEncoding` if - `capabilities.offsetEncoding` was sent to it. You - can only modify the `client.offset_encoding` here - before any notifications are sent. Most language - servers expect to be sent client specified - settings after initialization. Neovim does not - make this assumption. A - `workspace/didChangeConfiguration` notification - should be sent to the server during on_init. - • {on_exit} Callback (code, signal, client_id) invoked on - client exit. - • code: exit code of the process - • signal: number describing the signal used to - terminate (if any) - • client_id: client handle - • {on_attach} Callback (client, bufnr) invoked when client - attaches to a buffer. - • {trace} "off" | "messages" | "verbose" | nil passed - directly to the language server in the initialize - request. Invalid/empty values will default to - "off" - • {flags} A table with flags for the client. The current - (experimental) flags are: - • allow_incremental_sync (bool, default true): - Allow using incremental sync for buffer edits - • debounce_text_changes (number, default 150): - Debounce didChange notifications to the server - by the given number in milliseconds. No - debounce occurs if nil - • exit_timeout (number|boolean, default false): - Milliseconds to wait for server to exit cleanly - after sending the "shutdown" request before - sending kill -15. If set to false, nvim exits - immediately after sending the "shutdown" - request to the server. - • {root_dir} (string) Directory where the LSP server will base - its workspaceFolders, rootUri, and rootPath on - initialization. + • detached: (boolean, default true) Daemonize the server + process so that it runs in a separate process group from + Nvim. Nvim will shutdown the process on exit, but if Nvim + fails to exit cleanly this could leave behind orphaned + server processes. + • workspace_folders: (table) List of workspace folders + passed to the language server. For backwards compatibility + rootUri and rootPath will be derived from the first + workspace folder in this list. See `workspaceFolders` in + the LSP spec. + • capabilities: Map overriding the default capabilities + defined by |vim.lsp.protocol.make_client_capabilities()|, + passed to the language server on initialization. Hint: use + make_client_capabilities() and modify its result. + • Note: To send an empty dictionary use + `{[vim.type_idx]=vim.types.dictionary}`, else it will be + encoded as an array. + + • handlers: Map of language server method names to + |lsp-handler| + • settings: Map with language server specific settings. + These are returned to the language server if requested via + `workspace/configuration`. Keys are case-sensitive. + • commands: table Table that maps string of clientside + commands to user-defined functions. Commands passed to + start_client take precedence over the global command + registry. Each key must be a unique command name, and the + value is a function which is called if any LSP action + (code action, code lenses, ...) triggers the command. + • init_options Values to pass in the initialization request + as `initializationOptions`. See `initialize` in the LSP + spec. + • name: (string, default=client-id) Name in log messages. + • get_language_id: function(bufnr, filetype) -> language ID + as string. Defaults to the filetype. + • offset_encoding: (default="utf-16") One of "utf-8", + "utf-16", or "utf-32" which is the encoding that the LSP + server expects. Client does not verify this is correct. + • on_error: Callback with parameters (code, ...), invoked + when the client operation throws an error. `code` is a + number describing the error. Other arguments may be passed + depending on the error kind. See + `vim.lsp.rpc.client_errors` for possible errors. Use + `vim.lsp.rpc.client_errors[code]` to get human-friendly + name. + • before_init: Callback with parameters (initialize_params, + config) invoked before the LSP "initialize" phase, where + `params` contains the parameters being sent to the server + and `config` is the config that was passed to + |vim.lsp.start_client()|. You can use this to modify + parameters before they are sent. + • on_init: Callback (client, initialize_result) invoked + after LSP "initialize", where `result` is a table of + `capabilities` and anything else the server may send. For + example, clangd sends `initialize_result.offsetEncoding` + if `capabilities.offsetEncoding` was sent to it. You can + only modify the `client.offset_encoding` here before any + notifications are sent. Most language servers expect to be + sent client specified settings after initialization. + Neovim does not make this assumption. A + `workspace/didChangeConfiguration` notification should be + sent to the server during on_init. + • on_exit Callback (code, signal, client_id) invoked on + client exit. + • code: exit code of the process + • signal: number describing the signal used to terminate + (if any) + • client_id: client handle + + • on_attach: Callback (client, bufnr) invoked when client + attaches to a buffer. + • trace: ("off" | "messages" | "verbose" | nil) passed + directly to the language server in the initialize request. + Invalid/empty values will default to "off" + • flags: A table with flags for the client. The current + (experimental) flags are: + • allow_incremental_sync (bool, default true): Allow using + incremental sync for buffer edits + • debounce_text_changes (number, default 150): Debounce + didChange notifications to the server by the given + number in milliseconds. No debounce occurs if nil + • exit_timeout (number|boolean, default false): + Milliseconds to wait for server to exit cleanly after + sending the "shutdown" request before sending kill -15. + If set to false, nvim exits immediately after sending + the "shutdown" request to the server. + + • root_dir: (string) Directory where the LSP server will + base its workspaceFolders, rootUri, and rootPath on + initialization. Return: ~ Client id. |vim.lsp.get_client_by_id()| Note: client may not be fully @@ -1022,6 +1012,8 @@ code_action({options}) *vim.lsp.buf.code_action()* • only (table|nil): List of LSP `CodeActionKind`s used to filter the code actions. Most language servers support values like `refactor` or `quickfix`. + • triggerKind (number|nil): The reason why code actions + were requested. • filter: (function|nil) Predicate taking an `CodeAction` and returning a boolean. @@ -1036,6 +1028,7 @@ code_action({options}) *vim.lsp.buf.code_action()* See also: ~ https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_codeAction + vim.lsp.protocol.constants.CodeActionTriggerKind completion({context}) *vim.lsp.buf.completion()* Retrieves the completion items at the current cursor position. Can only be diff --git a/runtime/doc/lua-guide.txt b/runtime/doc/lua-guide.txt index 71dc48b715..b971a7d2ad 100644 --- a/runtime/doc/lua-guide.txt +++ b/runtime/doc/lua-guide.txt @@ -406,9 +406,9 @@ mandatory arguments: prefix for which the mapping will take effect. The prefixes are the ones listed in |:map-modes|, or "!" for |:map!|, or empty string for |:map|. • {lhs} is a string with the key sequences that should trigger the mapping. - An empty string is equivalent to |<Nop>|, which disables a key. • {rhs} is either a string with a Vim command or a Lua function that should be executed when the {lhs} is entered. + An empty string is equivalent to |<Nop>|, which disables a key. Examples: >lua diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 16d0bcb612..47249a484b 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -132,8 +132,7 @@ back to Lua's default search mechanism. The first script found is run and The return value is cached after the first call to `require()` for each module, with subsequent calls returning the cached value without searching for, or -executing any script. For further details on `require()`, see the Lua -documentation at https://www.lua.org/manual/5.1/manual.html#pdf-require. +executing any script. For further details on `require()`, see |luaref-require()|. For example, if 'runtimepath' is `foo,bar` and |package.cpath| was `./?.so;./?.dll` at startup, `require('mod')` searches these paths in order @@ -1641,6 +1640,7 @@ gsplit({s}, {sep}, {plain}) *vim.gsplit()* See also: ~ |vim.split()| + |luaref-patterns| https://www.lua.org/pil/20.2.html http://lua-users.org/wiki/StringLibraryTutorial @@ -1694,6 +1694,18 @@ pesc({s}) *vim.pesc()* See also: ~ https://github.com/rxi/lume +spairs({t}) *vim.spairs()* + Enumerate a table sorted by its keys. + + Parameters: ~ + • {t} (table) List-like table + + Return: ~ + iterator over sorted keys and their values + + See also: ~ + Based on https://github.com/premake/premake-core/blob/master/src/base/table.lua + split({s}, {sep}, {kwargs}) *vim.split()* Splits a string at each instance of a separator. @@ -1913,6 +1925,7 @@ trim({s}) *vim.trim()* (string) String with whitespace removed from its beginning and end See also: ~ + |luaref-patterns| https://www.lua.org/pil/20.2.html validate({opt}) *vim.validate()* @@ -2379,7 +2392,7 @@ normalize({path}) *vim.fs.normalize()* Examples: >lua - vim.fs.normalize('C:\Users\jdoe') + vim.fs.normalize('C:\\Users\\jdoe') --> 'C:/Users/jdoe' vim.fs.normalize('~/src/neovim') diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index ccd48a8959..cb8b162eb6 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1432,9 +1432,11 @@ The function arguments are: The function may use these for determining context. For the "custom" argument, it is not necessary to filter candidates against the (implicit pattern in) ArgLead. Vim will filter the candidates with its regexp engine -after function return, and this is probably more efficient in most cases. For -the "customlist" argument, Vim will not filter the returned completion -candidates and the user supplied function should filter the candidates. +after function return, and this is probably more efficient in most cases. If +'wildoptions' contains "fuzzy", then the candidates will be filtered using +|fuzzy-matching|. For the "customlist" argument, Vim will not +filter the returned completion candidates and the user supplied function +should filter the candidates. The following example lists user names to a Finger command > :com -complete=custom,ListUsers -nargs=1 Finger !finger <args> diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index ce07c3035c..5c234677ef 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -45,6 +45,8 @@ The following changes may require adaptations in user config or plugins. - `printheader` - `printmbcharset` +• libiconv is now a required build dependency. + ============================================================================== NEW FEATURES *news-features* @@ -143,6 +145,12 @@ The following new APIs or features were added. instance in the background and display its UI on demand, which previously only was possible using an external UI implementation. +• Several improvements were made to make the code generation scripts more + deterministic, and a `LUA_GEN_PRG` build parameter has been introduced to + allow for a workaround for some remaining reproducibility problems. + +• |:highlight| now supports an additional attribute "altfont". + ============================================================================== CHANGED FEATURES *news-changes* @@ -159,11 +167,17 @@ The following changes to existing APIs or features add new behavior. resulting in a nvim binary which only could be run headless or embedded in an external process. As of this version, TUI is always available. +• API calls now show more information about where an exception happened. + ============================================================================== REMOVED FEATURES *news-removed* The following deprecated functions or APIs were removed. +• It is no longer possible to scroll the whole screen when showing messages + longer than 'cmdheight'. |msgsep| is now always enabled even if 'display' + doesn't contain the "msgsep" flag. + • `filetype.vim` is removed in favor of |lua-filetype| (Note that filetype logic and tests still align with Vim, so additions or changes need to be contributed there first.) diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 4498dda300..b1af90a604 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -3843,21 +3843,21 @@ A jump table for the options with a short description can be found at |Q_op|. The third character is optional. tab:xy The 'x' is always used, then 'y' as many times as will - fit. Thus "tab:>-" displays: + fit. Thus "tab:>-" displays: > > >- >-- etc. - +< tab:xyz The 'z' is always used, then 'x' is prepended, and then 'y' is used as many times as will fit. Thus - "tab:<->" displays: + "tab:<->" displays: > > <> <-> <--> etc. - +< When "tab:" is omitted, a tab is shown as ^I. *lcs-space* space:c Character to show for a space. When omitted, spaces @@ -3869,22 +3869,25 @@ A jump table for the options with a short description can be found at |Q_op|. setting, except for single spaces. When omitted, the "space" setting is used. For example, `:set listchars=multispace:---+` shows ten consecutive - spaces as: - ---+---+-- ~ + spaces as: > + ---+---+-- +< *lcs-lead* lead:c Character to show for leading spaces. When omitted, leading spaces are blank. Overrides the "space" and "multispace" settings for leading spaces. You can combine it with "tab:", for example: > :set listchars+=tab:>-,lead:. -< *lcs-leadmultispace* +< + *lcs-leadmultispace* leadmultispace:c... Like the |lcs-multispace| value, but for leading spaces only. Also overrides |lcs-lead| for leading multiple spaces. `:set listchars=leadmultispace:---+` shows ten - consecutive leading spaces as: - ---+---+--XXX ~ + consecutive leading spaces as: > + ---+---+--XXX +< Where "XXX" denotes the first non-blank characters in the line. *lcs-trail* @@ -6017,12 +6020,20 @@ A jump table for the options with a short description can be found at |Q_op|. %s sign column for currently drawn line %C fold column for currently drawn line - To draw the sign and fold columns, they must be included in - 'statuscolumn'. + NOTE: To draw the sign and fold columns, their items must be included in + 'statuscolumn'. Even when they are not included, the status column width + will adapt to the 'signcolumn' and 'foldcolumn' width. + + The |v:lnum| variable holds the line number to be drawn. + The |v:relnum| variable holds the relative line number to be drawn. + The |v:virtnum| variable is negative when drawing virtual lines, zero + when drawing the actual buffer line, and positive when + drawing the wrapped part of a buffer line. - The |v:lnum| variable holds the line number to be drawn. - The |v:relnum| variable holds the relative line number to be drawn. - The |v:wrap| variable holds true for the wrapped part of a line. + NOTE: The %@ click execute function item is supported as well but the + specified function will be the same for each row in the same column. + It cannot be switched out through a dynamic 'statuscolumn' format, the + handler should be written with this in mind. Examples: >vim " Relative number with bar separator and click handlers: @@ -6032,7 +6043,7 @@ A jump table for the options with a short description can be found at |Q_op|. :let &stc='%=%{v:relnum?v:relnum:v:lnum} ' " Line numbers in hexadecimal for non wrapped part of lines: - :let &stc='%=%{v:wrap?"":printf("%x",v:lnum)} ' + :let &stc='%=%{v:virtnum>0?"":printf("%x",v:lnum)} ' " Human readable line numbers with thousands separator: :let &stc='%{substitute(v:lnum,"\\d\\zs\\ze\\' @@ -7123,6 +7134,14 @@ A jump table for the options with a short description can be found at |Q_op|. global A list of words that change how |cmdline-completion| is done. The following values are supported: + fuzzy Use |fuzzy-matching| to find completion matches. When + this value is specified, wildcard expansion will not + be used for completion. The matches will be sorted by + the "best match" rather than alphabetically sorted. + This will find more matches than the wildcard + expansion. Currently fuzzy matching based completion + is not supported for file and directory names and + instead wildcard expansion is used. pum Display the completion matches using the popup menu in the same style as the |ins-completion-menu|. tagfile When using CTRL-D to list matching tags, the kind of diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 1bbd20702b..bf77aacdc0 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -211,9 +211,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. When [!] is included, all found files are sourced. Else only the first found file is sourced. - When [where] is omitted, first 'runtimepath' is - searched, then directories under "start" in 'packpath' - are searched. + When [where] is omitted only 'runtimepath' is used. Other values: START search only under "start" in 'packpath' OPT search only under "opt" in 'packpath' diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index 179bacdb24..5e0718c3bb 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -239,6 +239,14 @@ argument. Disables |shada| unless |-i| was given. Disables swapfile (like |-n|). + *-ll* +-ll {script} [args] + Execute a lua script, similarly to |-l|, but the editor is not + initialized. This gives a lua enviroment similar to a worker + thread. See |lua-loop-threading|. + + Unlike `-l` no prior arguments are allowed. + *-b* -b Binary mode. File I/O will only recognize <NL> to separate lines. The 'expandtab' option will be reset. The 'textwidth' diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index b4afc3f233..bd5a4f1926 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -4958,7 +4958,8 @@ the same syntax file on all UIs. *bold* *underline* *undercurl* *underdouble* *underdotted* *underdashed* *inverse* *italic* - *standout* *nocombine* *strikethrough* + *standout* *strikethrough* *altfont* + *nocombine* cterm={attr-list} *attr-list* *highlight-cterm* *E418* attr-list is a comma-separated list (without spaces) of the following items (in any order): @@ -4973,6 +4974,7 @@ cterm={attr-list} *attr-list* *highlight-cterm* *E418* inverse same as reverse italic standout + altfont nocombine override attributes instead of combining them NONE no attributes used (used to reset it) diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 096cec6678..9bfdc0b94e 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -684,6 +684,7 @@ require_language({lang}, {path}, {silent}, {symbol_name}) Parameters: ~ • {lang} (string) Language the parser should parse + (alphanumerical and `_` only) • {path} (string|nil) Optional path the parser is located at • {silent} (boolean|nil) Don't throw an error if language not found @@ -708,8 +709,15 @@ add_directive({name}, {handler}, {force}) Parameters: ~ • {name} (string) Name of the directive, without leading # - • {handler} function(match:string, pattern:string, bufnr:number, - predicate:function, metadata:table) + • {handler} function(match:table, pattern:string, bufnr:number, + predicate:string[], metadata:table) + • match: see |treesitter-query| + • node-level data are accessible via `match[capture_id]` + + • pattern: see |treesitter-query| + • predicate: list of strings containing the full directive + being called, e.g. `(node (#set! conceal "-"))` would get + the predicate `{ "#set!", "conceal", "-" }` *vim.treesitter.query.add_predicate()* add_predicate({name}, {handler}, {force}) @@ -717,8 +725,10 @@ add_predicate({name}, {handler}, {force}) Parameters: ~ • {name} (string) Name of the predicate, without leading # - • {handler} function(match:string, pattern:string, bufnr:number, - predicate:function) + • {handler} function(match:table, pattern:string, bufnr:number, + predicate:string[]) + • see |vim.treesitter.query.add_directive()| for argument + meanings *vim.treesitter.query.get_node_text()* get_node_text({node}, {source}, {opts}) diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt index a2ae9f22ce..3110d0817c 100644 --- a/runtime/doc/ui.txt +++ b/runtime/doc/ui.txt @@ -324,6 +324,7 @@ numerical highlight ids to the actual attributes. `underdouble`: double underlined text. The lines have `special` color. `underdotted`: underdotted text. The dots have `special` color. `underdashed`: underdashed text. The dashes have `special` color. + `altfont`: alternative font. `blend`: Blend level (0-100). Could be used by UIs to support blending floating windows to the background or to signal a transparent cursor. diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 226bd029a3..910aebae70 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -624,6 +624,7 @@ String manipulation: *string-functions* strwidth() size of string when displayed strdisplaywidth() size of string when displayed, deals with tabs setcellwidths() set character cell width overrides + getcellwidths() get character cell width overrides substitute() substitute a pattern match with a string submatch() get a specific match in ":s" and substitute() strpart() get part of a string using byte index |