diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2024-11-25 19:15:05 +0000 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2024-11-25 19:27:38 +0000 |
| commit | c5d770d311841ea5230426cc4c868e8db27300a8 (patch) | |
| tree | dd21f70127b4b8b5f109baefc8ecc5016f507c91 /runtime/doc | |
| parent | 9be89f131f87608f224f0ee06d199fcd09d32176 (diff) | |
| parent | 081beb3659bd6d8efc3e977a160b1e72becbd8a2 (diff) | |
| download | rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.gz rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.bz2 rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.zip | |
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'runtime/doc')
40 files changed, 957 insertions, 939 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index dee0324a5b..c5dabeb551 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -658,12 +658,12 @@ nvim_echo({chunks}, {history}, {opts}) *nvim_echo()* Parameters: ~ • {chunks} A list of `[text, hl_group]` arrays, each representing a - text chunk with specified highlight. `hl_group` element can - be omitted for no highlight. + text chunk with specified highlight group name or ID. + `hl_group` element can be omitted for no highlight. • {history} if true, add to |message-history|. • {opts} Optional parameters. - • verbose: Message was printed as a result of 'verbose' - option if Nvim was invoked with -V3log_file, the message + • verbose: Message is printed as a result of 'verbose' + option. If Nvim was invoked with -V3log_file, the message will be redirected to the log_file and suppressed from direct output. @@ -2672,8 +2672,10 @@ nvim_buf_set_extmark({buffer}, {ns_id}, {line}, {col}, {opts}) • id : id of the extmark to edit. • end_row : ending line of the mark, 0-based inclusive. • end_col : ending col of the mark, 0-based exclusive. - • hl_group : name of the highlight group used to highlight - this mark. + • hl_group : highlight group used for the text range. This + and below highlight groups can be supplied either as a + string or as an integer, the latter of which can be + obtained using |nvim_get_hl_id_by_name()|. • hl_eol : when true, for a multiline highlight covering the EOL of a line, continue the highlight for the rest of the screen line (just like for diff and cursorline highlight). @@ -2682,9 +2684,7 @@ nvim_buf_set_extmark({buffer}, {ns_id}, {line}, {col}, {opts}) with specified highlight. `highlight` element can either be a single highlight group, or an array of multiple highlight groups that will be stacked (highest priority - last). A highlight group can be supplied either as a - string or as an integer, the latter which can be obtained - using |nvim_get_hl_id_by_name()|. + last). • virt_text_pos : position of virtual text. Possible values: • "eol": right after eol character (default). • "overlay": display over the specified column, without @@ -2750,15 +2750,14 @@ nvim_buf_set_extmark({buffer}, {ns_id}, {line}, {col}, {opts}) buffer or end of the line respectively. Defaults to true. • sign_text: string of length 1-2 used to display in the sign column. - • sign_hl_group: name of the highlight group used to - highlight the sign column text. - • number_hl_group: name of the highlight group used to - highlight the number column. - • line_hl_group: name of the highlight group used to - highlight the whole line. - • cursorline_hl_group: name of the highlight group used to - highlight the sign column text when the cursor is on the - same line as the mark and 'cursorline' is enabled. + • sign_hl_group: highlight group used for the sign column + text. + • number_hl_group: highlight group used for the number + column. + • line_hl_group: highlight group used for the whole line. + • cursorline_hl_group: highlight group used for the sign + column text when the cursor is on the same line as the + mark and 'cursorline' is enabled. • conceal: string which should be either empty or a single character. Enable concealing similar to |:syn-conceal|. When a character is supplied it is used as |:syn-cchar|. @@ -3195,7 +3194,13 @@ nvim_open_win({buffer}, {enter}, {config}) *nvim_open_win()* be fractional. • focusable: Enable focus by user actions (wincmds, mouse events). Defaults to true. Non-focusable windows can be - entered by |nvim_set_current_win()|. + entered by |nvim_set_current_win()|, or, when the `mouse` + field is set to true, by mouse events. See |focusable|. + • mouse: Specify how this window interacts with mouse + events. Defaults to `focusable` value. + • If false, mouse events pass through this window. + • If true, mouse events interact with this window + normally. • external: GUI should display the window as an external top-level window. Currently accepts no other positioning configuration together with this. diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 8e5e2628de..998ef5e9f3 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -353,15 +353,11 @@ BufWritePost After writing the whole buffer to a file ChanInfo State of channel changed, for instance the client of a RPC channel described itself. Sets these |v:event| keys: - info - See |nvim_get_chan_info()| for the format of - the info Dictionary. + info as from |nvim_get_chan_info()| *ChanOpen* ChanOpen Just after a channel was opened. Sets these |v:event| keys: - info - See |nvim_get_chan_info()| for the format of - the info Dictionary. + info as from |nvim_get_chan_info()| *CmdUndefined* CmdUndefined When a user command is used but it isn't defined. Useful for defining a command only diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 4c726f86d2..ada3b7103c 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -269,16 +269,16 @@ assert_equal({expected}, {actual} [, {msg}]) *assert_equal()* Return: ~ (`0|1`) -assert_equalfile({fname-one}, {fname-two}) *assert_equalfile()* - When the files {fname-one} and {fname-two} do not contain +assert_equalfile({fname_one}, {fname_two}) *assert_equalfile()* + When the files {fname_one} and {fname_two} do not contain exactly the same text an error message is added to |v:errors|. Also see |assert-return|. - When {fname-one} or {fname-two} does not exist the error will + When {fname_one} or {fname_two} does not exist the error will mention that. Parameters: ~ - • {fname-one} (`string`) - • {fname-two} (`string`) + • {fname_one} (`string`) + • {fname_two} (`string`) Return: ~ (`0|1`) @@ -936,7 +936,7 @@ charclass({string}) *charclass()* The character class is one of: 0 blank 1 punctuation - 2 word character + 2 word character (depends on 'iskeyword') 3 emoji other specific Unicode class The class is used in patterns and word motions. @@ -959,7 +959,7 @@ charcol({expr} [, {winid}]) *charcol()* < Parameters: ~ - • {expr} (`string|integer[]`) + • {expr} (`string|any[]`) • {winid} (`integer?`) Return: ~ @@ -1100,7 +1100,7 @@ col({expr} [, {winid}]) *col()* < Parameters: ~ - • {expr} (`string|integer[]`) + • {expr} (`string|any[]`) • {winid} (`integer?`) Return: ~ @@ -3224,13 +3224,24 @@ getcharstr([{expr}]) *getcharstr()* Return: ~ (`string`) +getcmdcomplpat() *getcmdcomplpat()* + Return completion pattern of the current command-line. + Only works when the command line is being edited, thus + requires use of |c_CTRL-\_e| or |c_CTRL-R_=|. + Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|, + |getcmdprompt()|, |getcmdcompltype()| and |setcmdline()|. + Returns an empty string when completion is not defined. + + Return: ~ + (`string`) + getcmdcompltype() *getcmdcompltype()* Return the type of the current command-line completion. Only works when the command line is being edited, thus requires use of |c_CTRL-\_e| or |c_CTRL-R_=|. See |:command-completion| for the return string. Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|, - |getcmdprompt()| and |setcmdline()|. + |getcmdprompt()|, |getcmdcomplpat()| and |setcmdline()|. Returns an empty string when completion is not defined. Return: ~ @@ -3351,6 +3362,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* runtime |:runtime| completion scriptnames sourced script names |:scriptnames| shellcmd Shell command + shellcmdline Shell command line with filename arguments sign |:sign| suboptions syntax syntax file names |'syntax'| syntime |:syntime| suboptions @@ -5746,7 +5758,7 @@ luaeval({expr} [, {expr}]) *luaeval()* map({expr1}, {expr2}) *map()* {expr1} must be a |List|, |String|, |Blob| or |Dictionary|. - When {expr1} is a |List|| or |Dictionary|, replace each + When {expr1} is a |List| or |Dictionary|, replace each item in {expr1} with the result of evaluating {expr2}. For a |Blob| each byte is replaced. For a |String|, each character, including composing @@ -8690,7 +8702,7 @@ setcellwidths({list}) *setcellwidths()* To clear the overrides pass an empty {list}: >vim call setcellwidths([]) -< You can use the script $VIMRUNTIME/tools/emoji_list.lua to see +< You can use the script $VIMRUNTIME/scripts/emoji_list.lua to see the effect for known emoji characters. Move the cursor through the text to check if the cell widths of your terminal match with what Vim knows about each emoji. If it doesn't @@ -9027,6 +9039,8 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()* clear the list: >vim call setqflist([], 'r') < + 'u' Like 'r', but tries to preserve the current selection + in the quickfix list. 'f' All the quickfix lists in the quickfix stack are freed. @@ -9083,9 +9097,9 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()* `:cc 1` to jump to the first position. Parameters: ~ - • {list} (`any[]`) + • {list} (`vim.quickfix.entry[]`) • {action} (`string?`) - • {what} (`table?`) + • {what} (`vim.fn.setqflist.what?`) Return: ~ (`any`) @@ -11597,7 +11611,7 @@ virtcol({expr} [, {list} [, {winid}]]) *virtcol()* < Parameters: ~ - • {expr} (`string|integer[]`) + • {expr} (`string|any[]`) • {list} (`boolean?`) • {winid} (`integer?`) @@ -11691,7 +11705,7 @@ wildmenumode() *wildmenumode()* For example to make <c-j> work like <down> in wildmode, use: >vim cnoremap <expr> <C-j> wildmenumode() ? "\<Down>\<Tab>" : "\<c-j>" < - (Note, this needs the 'wildcharm' option set appropriately). + (Note: this needs the 'wildcharm' option set appropriately). Return: ~ (`any`) diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 928b834600..768a449581 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -561,6 +561,8 @@ with ".". Vim does not recognize a comment (starting with '"') after the program {filter} (for {Visual} see |Visual-mode|). :{range}![!]{filter} [!][arg] *:range!* + For executing external commands see |:!| + Filter {range} lines through the external program {filter}. Vim replaces the optional bangs with the latest given command and appends the optional [arg]. diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index 72d2faca02..5e809ad26c 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -21,6 +21,8 @@ API LUA - vim.region() Use |getregionpos()| instead. +- *vim.highlight* Renamed to |vim.hl|. +- vim.validate(opts: table) Use form 1. See |vim.validate()|. DIAGNOSTICS - *vim.diagnostic.goto_next()* Use |vim.diagnostic.jump()| with `{count=1, float=true}` instead. @@ -36,6 +38,25 @@ DIAGNOSTICS - The "cursor_position" parameter of |vim.diagnostic.JumpOpts| is renamed to "pos" +TREESITTER +• *TSNode:child_containing_descendant()* Use + |TSNode:child_with_descendant()| instead; it is identical except that it can + return the descendant itself. + +LSP +• *vim.lsp.util.jump_to_location* Use |vim.lsp.util.show_document()| with + `{focus=true}` instead. +• *vim.lsp.buf.execute_command* Use |Client:exec_cmd()| instead. +• *vim.lsp.buf.completion* Use |vim.lsp.completion.trigger()| instead. +• vim.lsp.buf_request_all The `error` key has been renamed to `err` inside + the result parameter of the handler. +• *vim.lsp.with()* Pass configuration to equivalent + functions in `vim.lsp.buf.*'. +• |vim.lsp.handlers| + No longer support client to server response handlers. Only server to + client requests/notification handlers are supported. +• *vim.lsp.handlers.signature_help()* Use |vim.lsp.buf.signature_help()| instead. + ------------------------------------------------------------------------------ DEPRECATED IN 0.10 *deprecated-0.10* diff --git a/runtime/doc/dev_style.txt b/runtime/doc/dev_style.txt index 32f7279704..97d5ebdb52 100644 --- a/runtime/doc/dev_style.txt +++ b/runtime/doc/dev_style.txt @@ -64,9 +64,8 @@ Symbols: - `extern` variables (including the `EXTERN` macro) Non-symbols: - - macros, i.e. `#define`. - - static inline functions, but only if its function declaration has a - `REAL_FATTR_ALWAYS_INLINE` attribute. + - macros, i.e. `#define` + - static inline functions with the `FUNC_ATTR_ALWAYS_INLINE` attribute - typedefs - structs - enums diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index 342947595e..9ccc3102b6 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -445,10 +445,10 @@ Lua module: vim.diagnostic *diagnostic-api* updated on |InsertLeave|) • {severity_sort}? (`boolean|{reverse?:boolean}`, default: `false`) Sort diagnostics by severity. This affects the - order in which signs and virtual text are - displayed. When true, higher severities are - displayed before lower severities (e.g. ERROR is - displayed before WARN). Options: + order in which signs, virtual text, and + highlights are displayed. When true, higher + severities are 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 diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 0008713025..4224709a39 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1032,6 +1032,15 @@ explanation of when the copy is made and when the file is renamed. If the creation of a backup file fails, the write is not done. If you want to write anyway add a '!' to the command. + *file-watcher* +When you notice issues with programs, that act upon when a buffer is written +(like inotify, entr or fswatch) or when external applications execute Vim to +edit the file (like git) and those programs do not seem to notice that the +original file has been changed, you may want to consider switching the +'backupcopy' option value to "yes". This makes sure, Vim writes to the same +file, that those watcher programs expect, without creating a new file (which +prevents them from detecting that the file has changed). See also |crontab| + *write-permissions* When writing a new file the permissions are read-write. For unix the mask is 0o666 with additionally umask applied. When writing a file that was read Vim @@ -1287,7 +1296,7 @@ separated by ';'. For example, to have only Vim files in the dialog, you could use the following command: > - let g:browsefilter = "Vim Scripts\t*.vim\nVim Startup Files\t*vimrc\n" + let g:browsefilter = "Vim scripts\t*.vim\nVim Startup Files\t*vimrc\n" You can override the filter setting on a per-buffer basis by setting the b:browsefilter variable. You would most likely set b:browsefilter in a diff --git a/runtime/doc/faq.txt b/runtime/doc/faq.txt index 7d2774c191..a9a7b1768e 100644 --- a/runtime/doc/faq.txt +++ b/runtime/doc/faq.txt @@ -189,7 +189,7 @@ Other hints: - The python `neovim` module was renamed to `pynvim` (long ago). - If you're using pyenv or virtualenv for the `pynvim` module - https://pypi.python.org/pypi/pynvim/, you must set `g:python3_host_prog` to + https://pypi.org/project/pynvim/, you must set `g:python3_host_prog` to the virtualenv's interpreter path. - Read |provider-python|. - Be sure you have the latest version of the `pynvim` Python module: >bash diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index a577b0c5fb..19c018bc11 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -40,7 +40,7 @@ Detail: The ":filetype on" command will load these files: $VIMRUNTIME/scripts.vim is used to detect it from the contents of the file. When the GUI is running or will start soon, the |menu.vim| script is - also sourced. See |'go-M'| about avoiding that. + also sourced. To add your own file types, see |new-filetype| below. To search for help on a filetype prepend "ft-" and optionally append "-syntax", "-indent" or @@ -630,6 +630,19 @@ HARE *ft-hare* Since the text for this plugin is rather long it has been put in a separate file: |ft_hare.txt|. +IDRIS2 *ft-idris2-plugin* + +By default the following options are set: > + + setlocal shiftwidth=2 tabstop=2 expandtab + setlocal comments=s1:{-,mb:-,ex:-},:\|\|\|,:-- + setlocal commentstring=--\ %s + setlocal wildignore+=*.ibc + +To use tabs instead of spaces for indentation, set the following variable +in your vimrc: > + + let g:idris2#allow_tabchar = 1 JAVA *ft-java-plugin* @@ -774,6 +787,12 @@ To enable folding use this: > let g:markdown_recommended_style = 0 +ORG *ft-org-plugin* + +To enable folding use this: > + let g:org_folding = 1 +< + PDF *ft-pdf-plugin* Two maps, <C-]> and <C-T>, are provided to simulate a tag stack for navigating @@ -1039,6 +1058,19 @@ TYPST *ft-typst-plugin* *g:typst_conceal* When |TRUE| the Typst filetype plugin will set the 'conceallevel' option to 2. + *g:typst_folding* +When |TRUE| the Typst filetype plugin will fold headings. (default: |FALSE|) + +To enable: > + let g:typst_folding = 1 +< + *g:typst_foldnested* +When |TRUE| the Typst filetype plugin will fold nested heading under their +parents. (default: |TRUE|) + +To disable: > + let g:typst_foldnested = 0 +< VIM *ft-vim-plugin* The Vim filetype plugin defines mappings to move to the start and end of diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index 9ab5bf4e1e..21f1ba8241 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -164,7 +164,6 @@ menus and menu items. They are most useful for things that you can't remember what the key sequence was. For creating menus in a different language, see |:menutrans|. -If you don't want to use menus at all, see |'go-M'|. *menu.vim* The default menus are read from the file "$VIMRUNTIME/menu.vim". See diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index f97ae24068..49d770124a 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -809,6 +809,38 @@ Detail: : GetCSSIndent() else <!-- --> : -1 +IDRIS2 *ft-idris2-indent* + +Idris 2 indentation can be configured with several variables that control the +indentation level for different language constructs: + +The "g:idris2_indent_if" variable controls the indentation of `then` and `else` +blocks after `if` statements. Defaults to 3. + +The "g:idris2_indent_case" variable controls the indentation of patterns in +`case` expressions. Defaults to 5. + +The "g:idris2_indent_let" variable controls the indentation after `let` +bindings. Defaults to 4. + +The "g:idris2_indent_rewrite" variable controls the indentation after `rewrite` +expressions. Defaults to 8. + +The "g:idris2_indent_where" variable controls the indentation of `where` +blocks. Defaults to 6. + +The "g:idris2_indent_do" variable controls the indentation in `do` blocks. +Defaults to 3. + +Example configuration: > + + let g:idris2_indent_if = 2 + let g:idris2_indent_case = 4 + let g:idris2_indent_let = 4 + let g:idris2_indent_rewrite = 8 + let g:idris2_indent_where = 6 + let g:idris2_indent_do = 3 +< MATLAB *ft-matlab-indent* *matlab-indent* *matlab-indenting* diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index d7cbb7c78e..48fd442b7e 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 an additional highlight group whose attributes are + abbr_hlgroup 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 + to the completion items abbreviation kind_hlgroup an additional highlight group specifically for setting the highlight attributes of the completion kind. When this field is present, it will override the @@ -1907,6 +1907,16 @@ These commands are used to start inserting text. You can end insert mode with <Esc>. See |mode-ins-repl| for the other special characters in Insert mode. The effect of [count] takes place after Insert mode is exited. +The following commands insert text, but stay in normal mode: + + *]<Space>* +]<Space> Insert an empty line below the cursor without leaving + Normal mode, repeat [count] times. + + *[<Space>* +[<Space> Insert an empty line above the cursor without leaving + Normal mode, repeat [count] times. + When 'autoindent' is on, the indent for a new line is obtained from the previous line. When 'smartindent' or 'cindent' is on, the indent for a line is automatically adjusted for C programs. diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 41846f8eed..d099c29bdb 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -536,7 +536,7 @@ CTRL-O in Insert mode you get a beep but you are still in Insert mode, type Select *5 ^O ^G *6 -- -- -- Insert <Esc> -- -- <Insert> -- -- Replace <Esc> -- -- <Insert> -- -- - Command-line `*3` -- -- :start -- -- + Command-line *3 -- -- :start -- -- Ex :vi -- -- -- -- -- -- not possible diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 419f583c36..64bef849fc 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -71,11 +71,13 @@ options are not restored when the LSP client is stopped or detached. - |K| is mapped to |vim.lsp.buf.hover()| unless |'keywordprg'| is customized or a custom keymap for `K` exists. - *grr* *gra* *grn* *i_CTRL-S* + *grr* *gra* *grn* *gri* *i_CTRL-S* Some keymaps are created unconditionally when Nvim starts: - "grn" is mapped in Normal mode to |vim.lsp.buf.rename()| - "gra" is mapped in Normal and Visual mode to |vim.lsp.buf.code_action()| - "grr" is mapped in Normal mode to |vim.lsp.buf.references()| +- "gri" is mapped in Normal mode to |vim.lsp.buf.implementation()| +- "gO" is mapped in Normal mode to |vim.lsp.buf.document_symbol()| - CTRL-S is mapped in Insert mode to |vim.lsp.buf.signature_help()| If not wanted, these keymaps can be removed at any time using @@ -193,41 +195,41 @@ Requests and notifications defined by the LSP specification are referred to as They are also listed below. Note that handlers depend on server support: they won't run if your server doesn't support them. -- callHierarchy/incomingCalls -- callHierarchy/outgoingCalls -- textDocument/codeAction -- textDocument/completion -- textDocument/declaration* -- textDocument/definition -- textDocument/diagnostic -- textDocument/documentHighlight |