diff options
| author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2024-06-15 01:04:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-15 07:04:27 +0800 |
| commit | 6e28589e00a32045d5a62654151299802e40fdb0 (patch) | |
| tree | b17f2803e215537655505c9992d647ebe2f54524 /runtime/doc | |
| parent | bcca597e175e4d5b6587dd3761c305a773369df8 (diff) | |
| download | rneovim-6e28589e00a32045d5a62654151299802e40fdb0.tar.gz rneovim-6e28589e00a32045d5a62654151299802e40fdb0.tar.bz2 rneovim-6e28589e00a32045d5a62654151299802e40fdb0.zip | |
docs: misc (#29229)
Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
Co-authored-by: Jose Pedro Oliveira <jose.p.oliveira.oss@gmail.com>
Co-authored-by: Maria José Solano <majosolano99@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Diffstat (limited to 'runtime/doc')
| -rw-r--r-- | runtime/doc/api.txt | 6 | ||||
| -rw-r--r-- | runtime/doc/builtin.txt | 38 | ||||
| -rw-r--r-- | runtime/doc/lsp.txt | 2 | ||||
| -rw-r--r-- | runtime/doc/syntax.txt | 4 | ||||
| -rw-r--r-- | runtime/doc/treesitter.txt | 2 |
5 files changed, 26 insertions, 26 deletions
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 <CR> + Examples: >vim + xnoremap <CR> \ <Cmd>echom getregion( \ getpos('v'), getpos('.'), #{ type: mode() })<CR> < @@ -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 <expr> GG ":echom " .. screencol() .. "\n" nnoremap <silent> GG :echom screencol()<CR> - noremap GG <Cmd>echom screencol()<Cr> + noremap GG <Cmd>echom screencol()<CR> < 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| |