diff options
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/api.txt | 2 | ||||
-rw-r--r-- | runtime/doc/autocmd.txt | 3 | ||||
-rw-r--r-- | runtime/doc/builtin.txt | 10 | ||||
-rw-r--r-- | runtime/doc/cmdline.txt | 7 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 2 | ||||
-rw-r--r-- | runtime/doc/lsp.txt | 2 | ||||
-rw-r--r-- | runtime/doc/lua.txt | 14 | ||||
-rw-r--r-- | runtime/doc/map.txt | 2 | ||||
-rw-r--r-- | runtime/doc/news.txt | 4 | ||||
-rw-r--r-- | runtime/doc/nvim_terminal_emulator.txt | 4 | ||||
-rw-r--r-- | runtime/doc/options.txt | 28 | ||||
-rw-r--r-- | runtime/doc/repeat.txt | 4 | ||||
-rw-r--r-- | runtime/doc/spell.txt | 4 | ||||
-rw-r--r-- | runtime/doc/starting.txt | 4 | ||||
-rw-r--r-- | runtime/doc/userfunc.txt | 10 |
15 files changed, 69 insertions, 31 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 8c44db1867..748a8ba3bb 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -1487,7 +1487,7 @@ nvim_set_keymap({mode}, {lhs}, {rhs}, {*opts}) *nvim_set_keymap()* Parameters: ~ • {mode} Mode short-name (map command prefix: "n", "i", "v", "x", …) or "!" for |:map!|, or empty string for |:map|. "ia", "ca" or - "!a" for abbreviation in insert mode, cmdline mode, or both, + "!a" for abbreviation in Insert mode, Cmdline mode, or both, respectively • {lhs} Left-hand-side |{lhs}| of the mapping. • {rhs} Right-hand-side |{rhs}| of the mapping. diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 94a529930e..b64938ee9e 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -774,6 +774,9 @@ OptionSet After setting an option (except during the option. Similarly |v:option_oldglobal| is only set when |:set| or |:setglobal| was used. + This does not set |<abuf>|, you could use + |bufnr()|. + Note that when setting a |global-local| string option with |:set|, then |v:option_old| is the old global value. However, for all other kinds diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index bdd9f2fd3a..1fea6ad715 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -1233,7 +1233,7 @@ clearmatches([{win}]) *clearmatches()* Can also be used as a |method|: > GetWin()->clearmatches() < -col({expr} [, {winid}) *col()* +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 @@ -1296,7 +1296,7 @@ complete({startcol}, {matches}) *complete()* *E785* Example: > inoremap <F5> <C-R>=ListMonths()<CR> - func! ListMonths() + func ListMonths() call complete(col('.'), ['January', 'February', 'March', \ 'April', 'May', 'June', 'July', 'August', 'September', \ 'October', 'November', 'December']) @@ -1540,7 +1540,7 @@ cursor({list}) This is like the return value of |getpos()| or |getcurpos()|, but without the first item. - To position the cursor using the character count, use + To position the cursor using {col} as the character count, use |setcursorcharpos()|. Does not change the jumplist. @@ -3637,7 +3637,7 @@ getscriptinfo([{opts}]) *getscriptinfo()* name Vim script file name. sid Script ID |<SID>|. variables A dictionary with the script-local variables. - Present only when the a particular script is + Present only when a particular script is specified using the "sid" item in {opts}. Note that this is a copy, the value of script-local variables cannot be changed using @@ -5626,7 +5626,7 @@ mkdir({name} [, {flags} [, {prot}]]) < and "subdir" already exists then "subdir/tmp" will be scheduled for deletion, like with: > defer delete('subdir/tmp', 'rf') - +< If {prot} is given it is used to set the protection bits of the new directory. The default is 0o755 (rwxr-xr-x: r/w for the user, readable for others). Use 0o700 to make it diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index c43d1caa0e..a8f07dd6c5 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -902,9 +902,10 @@ Note: these are typed literally, they are not special keys! write. *E495* *:<abuf>* *<abuf>* <abuf> When executing autocommands, is replaced with the currently - effective buffer number (for ":r file" and ":so file" it is - the current buffer, the file being read/sourced is not in a - buffer). *E496* + effective buffer number. It is not set for all events, + also see |bufnr()|. For ":r file" and ":so file" it is the + current buffer, the file being read/sourced is not in a + buffer. *E496* *:<amatch>* *<amatch>* <amatch> When executing autocommands, is replaced with the match for which this autocommand was executed. *E497* diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index aa53244dc8..5cee668b39 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2799,7 +2799,7 @@ text... let mylist = [1, 2, 3] lockvar 0 mylist let mylist[0] = 77 " OK - call add(mylist, 4] " OK + call add(mylist, 4) " OK let mylist = [7, 8, 9] " Error! < *E743* For unlimited depth use [!] and omit [depth]. diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 7248d03196..27ef38743b 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -197,6 +197,7 @@ specification. These LSP requests/notifications are defined by default: textDocument/formatting textDocument/hover textDocument/implementation* + textDocument/inlayHint textDocument/publishDiagnostics textDocument/rangeFormatting textDocument/references @@ -208,6 +209,7 @@ specification. These LSP requests/notifications are defined by default: window/showDocument window/showMessageRequest workspace/applyEdit + workspace/inlayHint/refresh workspace/symbol * NOTE: These are sometimes not implemented by servers. diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index babd9b801c..44682d40e5 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2563,7 +2563,7 @@ set({mode}, {lhs}, {rhs}, {opts}) *vim.keymap.set()* -- Map to a Lua function: vim.keymap.set('n', 'lhs', function() print("real lua function") end) -- Map to multiple modes: - vim.keymap.set({'n', 'v'}, '<leader>lr', vim.lsp.buf.references, { buffer=true }) + vim.keymap.set({'n', 'v'}, '<leader>lr', vim.lsp.buf.references, { buffer = true }) -- Buffer-local mapping: vim.keymap.set('n', '<leader>w', "<cmd>w<cr>", { silent = true, buffer = 5 }) -- Expr mapping: @@ -2697,8 +2697,8 @@ find({names}, {opts}) *vim.fs.find()* directories joinpath({...}) *vim.fs.joinpath()* - Concatenate directories and/or file into a single path with normalization - (e.g., `"foo/"` and `"bar"` get joined to `"foo/bar"`) + Concatenate directories and/or file paths into a single path with + normalization (e.g., `"foo/"` and `"bar"` get joined to `"foo/bar"`) Parameters: ~ • {...} (string) @@ -2999,6 +2999,8 @@ pipeline depend on the type passed to this function: • Non-list tables pass both the key and value of each element • Function iterators pass all of the values returned by their respective function +• Tables with a metatable implementing __call are treated as function + iterators Examples: >lua @@ -3032,6 +3034,12 @@ Examples: >lua end) -- true + local rb = vim.ringbuf(3) + rb:push("a") + rb:push("b") + vim.iter(rb):totable() + -- { "a", "b" } + < In addition to the |vim.iter()| function, the |vim.iter| module provides diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index ad7901b962..9613092ba9 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -349,7 +349,7 @@ Note: - The command is not echo'ed, no need for <silent>. - The {rhs} is not subject to abbreviations nor to other mappings, even if the mapping is recursive. -- In Visual mode you can use `line('v')` and `col('v')` to get one end of the +- In Visual mode you can use `line('v')` and `col('v')` to get one end of the Visual area, the cursor is at the other end. *E1255* *E1136* diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index a901c4f13c..ac9e60637a 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -82,8 +82,10 @@ The following new APIs or features were added. • |vim.system()| for running system commands. -• |nvim_set_keymap()| now supports abbreviations. +• |nvim_set_keymap()| and |nvim_del_keymap()| now support abbreviations. +• Added |lsp-handler| for inlay hints: `textDocument/inlayHint` and + `workspace/inlayHint/refresh` ============================================================================== CHANGED FEATURES *news-changed* diff --git a/runtime/doc/nvim_terminal_emulator.txt b/runtime/doc/nvim_terminal_emulator.txt index b98c96ec87..aa37161d34 100644 --- a/runtime/doc/nvim_terminal_emulator.txt +++ b/runtime/doc/nvim_terminal_emulator.txt @@ -392,8 +392,8 @@ If there is no g:termdebug_config you can use: >vim let g:termdebug_map_K = 0 < *termdebug_disasm_window* -If you want the Asm window shown by default, set the flag to 1. -the "disasm_window_height" entry can be used to set the window height: >vim +If you want the Asm window shown by default, set the "disasm_window" flag to +1. The "disasm_window_height" entry can be used to set the window height: >vim let g:termdebug_config['disasm_window'] = 1 let g:termdebug_config['disasm_window_height'] = 15 If there is no g:termdebug_config you can use: >vim diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 7729ec5d38..0f53288608 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1361,7 +1361,7 @@ A jump table for the options with a short description can be found at |Q_op|. The screen column can be an absolute number, or a number preceded with '+' or '-', which is added to or subtracted from 'textwidth'. > - :set cc=+1 " highlight column after 'textwidth' + :set cc=+1 " highlight column after 'textwidth' :set cc=+1,+2,+3 " highlight three columns after 'textwidth' :hi ColorColumn ctermbg=lightgrey guibg=lightgrey < @@ -5386,12 +5386,12 @@ A jump table for the options with a short description can be found at |Q_op|. local to buffer Number of spaces to use for each step of (auto)indent. Used for |'cindent'|, |>>|, |<<|, etc. - When zero the 'ts' value will be used. Use the |shiftwidth()| + When zero the 'tabstop' value will be used. Use the |shiftwidth()| function to get the effective shiftwidth value. *'shortmess'* *'shm'* 'shortmess' 'shm' string (default "filnxtToOCF") - global + global *E1336* 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. It is a list of flags: @@ -5662,6 +5662,8 @@ A jump table for the options with a short description can be found at |Q_op|. line in the window wraps part of it may not be visible, as if it is above the window. "<<<" is displayed at the start of the first line, highlighted with |hl-NonText|. + You may also want to add "lastline" to the 'display' option to show as + much of the last line as possible. NOTE: only partly implemented, currently works with CTRL-E, CTRL-Y and scrolling with the mouse. @@ -6313,13 +6315,25 @@ A jump table for the options with a short description can be found at |Q_op|. (or 3 or whatever you prefer) and use 'noexpandtab'. Then Vim will use a mix of tabs and spaces, but typing <Tab> and <BS> will behave like a tab appears every 4 (or 3) characters. - 2. Set 'tabstop' and 'shiftwidth' to whatever you prefer and use + This is the recommended way, the file will look the same with other + tools and when listing it in a terminal. + 2. Set 'softtabstop' and 'shiftwidth' to whatever you prefer and use + 'expandtab'. This way you will always insert spaces. The + formatting will never be messed up when 'tabstop' is changed (leave + it at 8 just in case). The file will be a bit larger. + You do need to check if no Tabs exist in the file. You can get rid + of them by first setting 'expandtab' and using `%retab!`, making + sure the value of 'tabstop' is set correctly. + 3. Set 'tabstop' and 'shiftwidth' to whatever you prefer and use 'expandtab'. This way you will always insert spaces. The formatting will never be messed up when 'tabstop' is changed. - 3. Set 'tabstop' and 'shiftwidth' to whatever you prefer and use a + You do need to check if no Tabs exist in the file, just like in the + item just above. + 4. Set 'tabstop' and 'shiftwidth' to whatever you prefer and use a |modeline| to set these values when editing the file again. Only - works when using Vim to edit the file. - 4. Always set 'tabstop' and 'shiftwidth' to the same value, and + works when using Vim to edit the file, other tools assume a tabstop + is worth 8 spaces. + 5. Always set 'tabstop' and 'shiftwidth' to the same value, and 'noexpandtab'. This should then work (for initial indents only) for any tabstop setting that people use. It might be nice to have tabs after the first non-blank inserted as spaces if you do this diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 071b062957..558cc75d65 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -260,8 +260,8 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. 'runtimepath'. If the filetype detection was already enabled (this - is usually done with a "syntax enable" or "filetype - on" command in your |init.vim|, or automatically during + is usually done with a `syntax enable` or `filetype on` + command in your |vimrc|, or automatically during |initialization|), and the package was found in "pack/*/opt/{name}", this command will also look for "{name}/ftdetect/*.vim" files. diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index 75e4767743..29e4a7b0aa 100644 --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -111,7 +111,7 @@ zuG Undo |zW| and |zG|, remove the word from the internal list, like with |zW|. *:spellra* *:spellrare* -:[count]spellr[are] {word} +:[count]spellra[re] {word} Add {word} as a rare word to 'spellfile', similar to |zw|. Without count the first name is used, with a count of two the second entry, etc. @@ -124,7 +124,7 @@ zuG Undo |zW| and |zG|, remove the word from the internal nnoremap z/ :exe ':spellrare! ' .. expand('<cWORD>')<CR> < |:spellundo|, |zuw|, or |zuW| can be used to undo this. -:spellr[rare]! {word} Add {word} as a rare word to the internal word +:spellra[re]! {word} Add {word} as a rare word to the internal word list, similar to |zW|. :[count]spellu[ndo] {word} *:spellu* *:spellundo* diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index b3a30b20e8..2c7b7ed61b 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -426,9 +426,11 @@ accordingly, proceeding as follows: 2. Process the arguments The options and file names from the command that start Vim are - inspected. Buffers are created for all files (but not loaded yet). + inspected. The |-V| argument can be used to display or log what happens next, useful for debugging the initializations. + The |--cmd| arguments are executed. + Buffers are created for all files (but not loaded yet). 3. Start a server (unless |--listen| was given) and set |v:servername|. diff --git a/runtime/doc/userfunc.txt b/runtime/doc/userfunc.txt index db0127df95..8b6462911d 100644 --- a/runtime/doc/userfunc.txt +++ b/runtime/doc/userfunc.txt @@ -44,6 +44,13 @@ functions. unless "!" is given. {name} may be a |Dictionary| |Funcref| entry: > :function dict.init +< Note that {name} is not an expression, you cannot use + a variable that is a function reference. You can use + this dirty trick to list the function referred to with + variable "Funcref": > + let g:MyFuncref = Funcref + func g:MyFuncref + unlet g:MyFuncref :fu[nction] /{pattern} List functions with a name matching {pattern}. Example that lists all functions ending with "File": > @@ -72,8 +79,7 @@ See |:verbose-cmd| for more information. name has a colon in the name, e.g. for "foo:bar()". Before that patch no error was given). - {name} can also be a |Dictionary| entry that is a - |Funcref|: > + {name} may be a |Dictionary| |Funcref| entry: > :function dict.init(arg) < "dict" must be an existing dictionary. The entry "init" is added if it didn't exist yet. Otherwise [!] |