mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
Merge pull request #29342 from neovim/backport-29229-to-release-0.10
docs: misc
This commit is contained in:
@@ -2820,7 +2820,7 @@ nvim_set_decoration_provider({ns_id}, {opts})
|
|||||||
Note: this function should not be called often. Rather, the callbacks
|
Note: this function should not be called often. Rather, the callbacks
|
||||||
themselves can be used to throttle unneeded callbacks. the `on_start`
|
themselves can be used to throttle unneeded callbacks. the `on_start`
|
||||||
callback can return `false` to disable the provider until the next redraw.
|
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
|
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
|
plugin managing multiple sources of decoration should ideally only set one
|
||||||
provider, and merge the sources internally. You can use multiple `ns_id`
|
provider, and merge the sources internally. You can use multiple `ns_id`
|
||||||
@@ -2829,10 +2829,10 @@ nvim_set_decoration_provider({ns_id}, {opts})
|
|||||||
Note: doing anything other than setting extmarks is considered
|
Note: doing anything other than setting extmarks is considered
|
||||||
experimental. Doing things like changing options are not explicitly
|
experimental. Doing things like changing options are not explicitly
|
||||||
forbidden, but is likely to have unexpected consequences (such as 100% CPU
|
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.
|
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.
|
callbacks.
|
||||||
|
|
||||||
Attributes: ~
|
Attributes: ~
|
||||||
|
38
runtime/doc/builtin.txt
generated
38
runtime/doc/builtin.txt
generated
@@ -2963,8 +2963,8 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()*
|
|||||||
difference if the buffer is displayed in a window with
|
difference if the buffer is displayed in a window with
|
||||||
different 'virtualedit' or 'list' values.
|
different 'virtualedit' or 'list' values.
|
||||||
|
|
||||||
Examples: >
|
Examples: >vim
|
||||||
:xnoremap <CR>
|
xnoremap <CR>
|
||||||
\ <Cmd>echom getregion(
|
\ <Cmd>echom getregion(
|
||||||
\ getpos('v'), getpos('.'), #{ type: mode() })<CR>
|
\ getpos('v'), getpos('.'), #{ type: mode() })<CR>
|
||||||
<
|
<
|
||||||
@@ -4597,19 +4597,19 @@ matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict}]) *matchbufline()*
|
|||||||
|
|
||||||
Examples: >vim
|
Examples: >vim
|
||||||
" Assuming line 3 in buffer 5 contains "a"
|
" Assuming line 3 in buffer 5 contains "a"
|
||||||
:echo matchbufline(5, '\<\k\+\>', 3, 3)
|
echo matchbufline(5, '\<\k\+\>', 3, 3)
|
||||||
[{'lnum': 3, 'byteidx': 0, 'text': 'a'}]
|
< `[{'lnum': 3, 'byteidx': 0, 'text': 'a'}]` >vim
|
||||||
" Assuming line 4 in buffer 10 contains "tik tok"
|
" Assuming line 4 in buffer 10 contains "tik tok"
|
||||||
:echo matchbufline(10, '\<\k\+\>', 1, 4)
|
echo matchbufline(10, '\<\k\+\>', 1, 4)
|
||||||
[{'lnum': 4, 'byteidx': 0, 'text': 'tik'}, {'lnum': 4, 'byteidx': 4, 'text': 'tok'}]
|
< `[{'lnum': 4, 'byteidx': 0, 'text': 'tik'}, {'lnum': 4, 'byteidx': 4, 'text': 'tok'}]`
|
||||||
<
|
|
||||||
If {submatch} is present and is v:true, then submatches like
|
If {submatch} is present and is v:true, then submatches like
|
||||||
"\1", "\2", etc. are also returned. Example: >vim
|
"\1", "\2", etc. are also returned. Example: >vim
|
||||||
" Assuming line 2 in buffer 2 contains "acd"
|
" 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})
|
\ {'submatches': v:true})
|
||||||
[{'lnum': 2, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]
|
< `[{'lnum': 2, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]`
|
||||||
< The "submatches" List always contains 9 items. If a submatch
|
The "submatches" List always contains 9 items. If a submatch
|
||||||
is not found, then an empty string is returned for that
|
is not found, then an empty string is returned for that
|
||||||
submatch.
|
submatch.
|
||||||
|
|
||||||
@@ -4769,17 +4769,17 @@ matchstrlist({list}, {pat} [, {dict}]) *matchstrlist()*
|
|||||||
option settings on the pattern.
|
option settings on the pattern.
|
||||||
|
|
||||||
Example: >vim
|
Example: >vim
|
||||||
:echo matchstrlist(['tik tok'], '\<\k\+\>')
|
echo matchstrlist(['tik tok'], '\<\k\+\>')
|
||||||
[{'idx': 0, 'byteidx': 0, 'text': 'tik'}, {'idx': 0, 'byteidx': 4, 'text': 'tok'}]
|
< `[{'idx': 0, 'byteidx': 0, 'text': 'tik'}, {'idx': 0, 'byteidx': 4, 'text': 'tok'}]` >vim
|
||||||
:echo matchstrlist(['a', 'b'], '\<\k\+\>')
|
echo matchstrlist(['a', 'b'], '\<\k\+\>')
|
||||||
[{'idx': 0, 'byteidx': 0, 'text': 'a'}, {'idx': 1, 'byteidx': 0, 'text': 'b'}]
|
< `[{'idx': 0, 'byteidx': 0, 'text': 'a'}, {'idx': 1, 'byteidx': 0, 'text': 'b'}]`
|
||||||
<
|
|
||||||
If "submatches" is present and is v:true, then submatches like
|
If "submatches" is present and is v:true, then submatches like
|
||||||
"\1", "\2", etc. are also returned. Example: >vim
|
"\1", "\2", etc. are also returned. Example: >vim
|
||||||
:echo matchstrlist(['acd'], '\(a\)\?\(b\)\?\(c\)\?\(.*\)',
|
echo matchstrlist(['acd'], '\(a\)\?\(b\)\?\(c\)\?\(.*\)',
|
||||||
\ #{submatches: v:true})
|
\ #{submatches: v:true})
|
||||||
[{'idx': 0, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]
|
< `[{'idx': 0, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]`
|
||||||
< The "submatches" List always contains 9 items. If a submatch
|
The "submatches" List always contains 9 items. If a submatch
|
||||||
is not found, then an empty string is returned for that
|
is not found, then an empty string is returned for that
|
||||||
submatch.
|
submatch.
|
||||||
|
|
||||||
@@ -6007,7 +6007,7 @@ screencol() *screencol()*
|
|||||||
the following mappings: >vim
|
the following mappings: >vim
|
||||||
nnoremap <expr> GG ":echom " .. screencol() .. "\n"
|
nnoremap <expr> GG ":echom " .. screencol() .. "\n"
|
||||||
nnoremap <silent> GG :echom screencol()<CR>
|
nnoremap <silent> GG :echom screencol()<CR>
|
||||||
noremap GG <Cmd>echom screencol()<Cr>
|
noremap GG <Cmd>echom screencol()<CR>
|
||||||
<
|
<
|
||||||
|
|
||||||
screenpos({winid}, {lnum}, {col}) *screenpos()*
|
screenpos({winid}, {lnum}, {col}) *screenpos()*
|
||||||
|
@@ -1646,7 +1646,7 @@ is_enabled({filter}) *vim.lsp.inlay_hint.is_enabled()*
|
|||||||
Query whether inlay hint is enabled in the {filter}ed scope
|
Query whether inlay hint is enabled in the {filter}ed scope
|
||||||
|
|
||||||
Parameters: ~
|
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
|
• {bufnr} (`integer?`) Buffer number, or 0 for current
|
||||||
buffer, or nil for all.
|
buffer, or nil for all.
|
||||||
|
|
||||||
|
@@ -4986,7 +4986,6 @@ IncSearch 'incsearch' highlighting; also used for the text replaced with
|
|||||||
":s///c".
|
":s///c".
|
||||||
*hl-Substitute*
|
*hl-Substitute*
|
||||||
Substitute |:substitute| replacement text highlighting.
|
Substitute |:substitute| replacement text highlighting.
|
||||||
|
|
||||||
*hl-LineNr*
|
*hl-LineNr*
|
||||||
LineNr Line number for ":number" and ":#" commands, and when 'number'
|
LineNr Line number for ":number" and ":#" commands, and when 'number'
|
||||||
or 'relativenumber' option is set.
|
or 'relativenumber' option is set.
|
||||||
@@ -5006,7 +5005,6 @@ CursorLineSign Like SignColumn when 'cursorline' is set for the cursor line.
|
|||||||
*hl-MatchParen*
|
*hl-MatchParen*
|
||||||
MatchParen Character under the cursor or just before it, if it
|
MatchParen Character under the cursor or just before it, if it
|
||||||
is a paired bracket, and its match. |pi_paren.txt|
|
is a paired bracket, and its match. |pi_paren.txt|
|
||||||
|
|
||||||
*hl-ModeMsg*
|
*hl-ModeMsg*
|
||||||
ModeMsg 'showmode' message (e.g., "-- INSERT --").
|
ModeMsg 'showmode' message (e.g., "-- INSERT --").
|
||||||
*hl-MsgArea*
|
*hl-MsgArea*
|
||||||
|
@@ -22,9 +22,11 @@ search for in the `parser` runtime directory.
|
|||||||
|
|
||||||
Nvim includes these parsers:
|
Nvim includes these parsers:
|
||||||
|
|
||||||
|
- Bash
|
||||||
- C
|
- C
|
||||||
- Lua
|
- Lua
|
||||||
- Markdown
|
- Markdown
|
||||||
|
- Python
|
||||||
- Vimscript
|
- Vimscript
|
||||||
- Vimdoc
|
- Vimdoc
|
||||||
- Treesitter query files |ft-query-plugin|
|
- Treesitter query files |ft-query-plugin|
|
||||||
|
6
runtime/lua/vim/_meta/api.lua
generated
6
runtime/lua/vim/_meta/api.lua
generated
@@ -1921,7 +1921,7 @@ function vim.api.nvim_set_current_win(window) end
|
|||||||
--- Note: this function should not be called often. Rather, the callbacks
|
--- Note: this function should not be called often. Rather, the callbacks
|
||||||
--- themselves can be used to throttle unneeded callbacks. the `on_start`
|
--- themselves can be used to throttle unneeded callbacks. the `on_start`
|
||||||
--- callback can return `false` to disable the provider until the next redraw.
|
--- 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
|
--- 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
|
--- plugin managing multiple sources of decoration should ideally only set one
|
||||||
--- provider, and merge the sources internally. You can use multiple `ns_id`
|
--- provider, and merge the sources internally. You can use multiple `ns_id`
|
||||||
@@ -1930,10 +1930,10 @@ function vim.api.nvim_set_current_win(window) end
|
|||||||
--- Note: doing anything other than setting extmarks is considered
|
--- Note: doing anything other than setting extmarks is considered
|
||||||
--- experimental. Doing things like changing options are not explicitly
|
--- experimental. Doing things like changing options are not explicitly
|
||||||
--- forbidden, but is likely to have unexpected consequences (such as 100% CPU
|
--- 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.
|
--- 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.
|
--- callbacks.
|
||||||
---
|
---
|
||||||
--- @param ns_id integer Namespace id from `nvim_create_namespace()`
|
--- @param ns_id integer Namespace id from `nvim_create_namespace()`
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
error('Cannot require a meta file')
|
error('Cannot require a meta file')
|
||||||
|
|
||||||
-- These types were taken from https://github.com/LuaCATS/lpeg
|
-- These types were taken from https://github.com/LuaCATS/lpeg
|
||||||
-- (based on revision e6789e28e5b91a4a277a2a03081d708c403a3e34)
|
-- (based on revision 82c6a8fc676bbc20722026afd952668f3919b11d)
|
||||||
-- with types being renamed to include the vim namespace and with some descriptions made less verbose.
|
-- with types being renamed to include the vim namespace and with some descriptions made less verbose.
|
||||||
|
|
||||||
--- @brief <pre>help
|
--- @brief <pre>help
|
||||||
@@ -32,7 +32,7 @@ vim.lpeg = {}
|
|||||||
--- @operator div(table): vim.lpeg.Capture
|
--- @operator div(table): vim.lpeg.Capture
|
||||||
--- @operator div(function): vim.lpeg.Capture
|
--- @operator div(function): vim.lpeg.Capture
|
||||||
--- @operator pow(number): vim.lpeg.Pattern
|
--- @operator pow(number): vim.lpeg.Pattern
|
||||||
--- @operator mod(function): nil
|
--- @operator mod(function): vim.lpeg.Capture
|
||||||
local Pattern = {}
|
local Pattern = {}
|
||||||
|
|
||||||
--- @alias vim.lpeg.Capture vim.lpeg.Pattern
|
--- @alias vim.lpeg.Capture vim.lpeg.Pattern
|
||||||
|
38
runtime/lua/vim/_meta/vimfn.lua
generated
38
runtime/lua/vim/_meta/vimfn.lua
generated
@@ -3569,8 +3569,8 @@ function vim.fn.getreginfo(regname) end
|
|||||||
--- difference if the buffer is displayed in a window with
|
--- difference if the buffer is displayed in a window with
|
||||||
--- different 'virtualedit' or 'list' values.
|
--- different 'virtualedit' or 'list' values.
|
||||||
---
|
---
|
||||||
--- Examples: >
|
--- Examples: >vim
|
||||||
--- :xnoremap <CR>
|
--- xnoremap <CR>
|
||||||
--- \ <Cmd>echom getregion(
|
--- \ <Cmd>echom getregion(
|
||||||
--- \ getpos('v'), getpos('.'), #{ type: mode() })<CR>
|
--- \ getpos('v'), getpos('.'), #{ type: mode() })<CR>
|
||||||
--- <
|
--- <
|
||||||
@@ -5538,19 +5538,19 @@ function vim.fn.matcharg(nr) end
|
|||||||
---
|
---
|
||||||
--- Examples: >vim
|
--- Examples: >vim
|
||||||
--- " Assuming line 3 in buffer 5 contains "a"
|
--- " Assuming line 3 in buffer 5 contains "a"
|
||||||
--- :echo matchbufline(5, '\<\k\+\>', 3, 3)
|
--- echo matchbufline(5, '\<\k\+\>', 3, 3)
|
||||||
--- [{'lnum': 3, 'byteidx': 0, 'text': 'a'}]
|
--- < `[{'lnum': 3, 'byteidx': 0, 'text': 'a'}]` >vim
|
||||||
--- " Assuming line 4 in buffer 10 contains "tik tok"
|
--- " Assuming line 4 in buffer 10 contains "tik tok"
|
||||||
--- :echo matchbufline(10, '\<\k\+\>', 1, 4)
|
--- echo matchbufline(10, '\<\k\+\>', 1, 4)
|
||||||
--- [{'lnum': 4, 'byteidx': 0, 'text': 'tik'}, {'lnum': 4, 'byteidx': 4, 'text': 'tok'}]
|
--- < `[{'lnum': 4, 'byteidx': 0, 'text': 'tik'}, {'lnum': 4, 'byteidx': 4, 'text': 'tok'}]`
|
||||||
--- <
|
---
|
||||||
--- If {submatch} is present and is v:true, then submatches like
|
--- If {submatch} is present and is v:true, then submatches like
|
||||||
--- "\1", "\2", etc. are also returned. Example: >vim
|
--- "\1", "\2", etc. are also returned. Example: >vim
|
||||||
--- " Assuming line 2 in buffer 2 contains "acd"
|
--- " 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})
|
--- \ {'submatches': v:true})
|
||||||
--- [{'lnum': 2, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]
|
--- < `[{'lnum': 2, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]`
|
||||||
--- <The "submatches" List always contains 9 items. If a submatch
|
--- The "submatches" List always contains 9 items. If a submatch
|
||||||
--- is not found, then an empty string is returned for that
|
--- is not found, then an empty string is returned for that
|
||||||
--- submatch.
|
--- submatch.
|
||||||
---
|
---
|
||||||
@@ -5749,17 +5749,17 @@ function vim.fn.matchstr(expr, pat, start, count) end
|
|||||||
--- option settings on the pattern.
|
--- option settings on the pattern.
|
||||||
---
|
---
|
||||||
--- Example: >vim
|
--- Example: >vim
|
||||||
--- :echo matchstrlist(['tik tok'], '\<\k\+\>')
|
--- echo matchstrlist(['tik tok'], '\<\k\+\>')
|
||||||
--- [{'idx': 0, 'byteidx': 0, 'text': 'tik'}, {'idx': 0, 'byteidx': 4, 'text': 'tok'}]
|
--- < `[{'idx': 0, 'byteidx': 0, 'text': 'tik'}, {'idx': 0, 'byteidx': 4, 'text': 'tok'}]` >vim
|
||||||
--- :echo matchstrlist(['a', 'b'], '\<\k\+\>')
|
--- echo matchstrlist(['a', 'b'], '\<\k\+\>')
|
||||||
--- [{'idx': 0, 'byteidx': 0, 'text': 'a'}, {'idx': 1, 'byteidx': 0, 'text': 'b'}]
|
--- < `[{'idx': 0, 'byteidx': 0, 'text': 'a'}, {'idx': 1, 'byteidx': 0, 'text': 'b'}]`
|
||||||
--- <
|
---
|
||||||
--- If "submatches" is present and is v:true, then submatches like
|
--- If "submatches" is present and is v:true, then submatches like
|
||||||
--- "\1", "\2", etc. are also returned. Example: >vim
|
--- "\1", "\2", etc. are also returned. Example: >vim
|
||||||
--- :echo matchstrlist(['acd'], '\(a\)\?\(b\)\?\(c\)\?\(.*\)',
|
--- echo matchstrlist(['acd'], '\(a\)\?\(b\)\?\(c\)\?\(.*\)',
|
||||||
--- \ #{submatches: v:true})
|
--- \ #{submatches: v:true})
|
||||||
--- [{'idx': 0, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]
|
--- < `[{'idx': 0, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]`
|
||||||
--- <The "submatches" List always contains 9 items. If a submatch
|
--- The "submatches" List always contains 9 items. If a submatch
|
||||||
--- is not found, then an empty string is returned for that
|
--- is not found, then an empty string is returned for that
|
||||||
--- submatch.
|
--- submatch.
|
||||||
---
|
---
|
||||||
@@ -7199,7 +7199,7 @@ function vim.fn.screenchars(row, col) end
|
|||||||
--- the following mappings: >vim
|
--- the following mappings: >vim
|
||||||
--- nnoremap <expr> GG ":echom " .. screencol() .. "\n"
|
--- nnoremap <expr> GG ":echom " .. screencol() .. "\n"
|
||||||
--- nnoremap <silent> GG :echom screencol()<CR>
|
--- nnoremap <silent> GG :echom screencol()<CR>
|
||||||
--- noremap GG <Cmd>echom screencol()<Cr>
|
--- noremap GG <Cmd>echom screencol()<CR>
|
||||||
--- <
|
--- <
|
||||||
---
|
---
|
||||||
--- @return any
|
--- @return any
|
||||||
|
@@ -370,7 +370,7 @@ api.nvim_set_decoration_provider(namespace, {
|
|||||||
})
|
})
|
||||||
|
|
||||||
--- Query whether inlay hint is enabled in the {filter}ed scope
|
--- Query whether inlay hint is enabled in the {filter}ed scope
|
||||||
--- @param filter vim.lsp.inlay_hint.enable.Filter
|
--- @param filter? vim.lsp.inlay_hint.enable.Filter
|
||||||
--- @return boolean
|
--- @return boolean
|
||||||
--- @since 12
|
--- @since 12
|
||||||
function M.is_enabled(filter)
|
function M.is_enabled(filter)
|
||||||
|
@@ -1011,7 +1011,7 @@ void nvim_buf_clear_namespace(Buffer buffer, Integer ns_id, Integer line_start,
|
|||||||
/// Note: this function should not be called often. Rather, the callbacks
|
/// Note: this function should not be called often. Rather, the callbacks
|
||||||
/// themselves can be used to throttle unneeded callbacks. the `on_start`
|
/// themselves can be used to throttle unneeded callbacks. the `on_start`
|
||||||
/// callback can return `false` to disable the provider until the next redraw.
|
/// callback can return `false` to disable the provider until the next redraw.
|
||||||
/// Similarly, return `false` in `on_win` will skip the `on_lines` calls
|
/// 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).
|
/// 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
|
/// A plugin managing multiple sources of decoration should ideally only set
|
||||||
/// one provider, and merge the sources internally. You can use multiple `ns_id`
|
/// one provider, and merge the sources internally. You can use multiple `ns_id`
|
||||||
@@ -1020,10 +1020,10 @@ void nvim_buf_clear_namespace(Buffer buffer, Integer ns_id, Integer line_start,
|
|||||||
/// Note: doing anything other than setting extmarks is considered experimental.
|
/// Note: doing anything other than setting extmarks is considered experimental.
|
||||||
/// Doing things like changing options are not explicitly forbidden, but is
|
/// Doing things like changing options are not explicitly forbidden, but is
|
||||||
/// likely to have unexpected consequences (such as 100% CPU consumption).
|
/// likely to have unexpected consequences (such as 100% CPU consumption).
|
||||||
/// doing `vim.rpcnotify` should be OK, but `vim.rpcrequest` is quite dubious
|
/// Doing `vim.rpcnotify` should be OK, but `vim.rpcrequest` is quite dubious
|
||||||
/// for the moment.
|
/// for the moment.
|
||||||
///
|
///
|
||||||
/// Note: It is not allowed to remove or update extmarks in 'on_line' callbacks.
|
/// Note: It is not allowed to remove or update extmarks in `on_line` callbacks.
|
||||||
///
|
///
|
||||||
/// @param ns_id Namespace id from |nvim_create_namespace()|
|
/// @param ns_id Namespace id from |nvim_create_namespace()|
|
||||||
/// @param opts Table of callbacks:
|
/// @param opts Table of callbacks:
|
||||||
|
@@ -4403,8 +4403,8 @@ M.funcs = {
|
|||||||
difference if the buffer is displayed in a window with
|
difference if the buffer is displayed in a window with
|
||||||
different 'virtualedit' or 'list' values.
|
different 'virtualedit' or 'list' values.
|
||||||
|
|
||||||
Examples: >
|
Examples: >vim
|
||||||
:xnoremap <CR>
|
xnoremap <CR>
|
||||||
\ <Cmd>echom getregion(
|
\ <Cmd>echom getregion(
|
||||||
\ getpos('v'), getpos('.'), #{ type: mode() })<CR>
|
\ getpos('v'), getpos('.'), #{ type: mode() })<CR>
|
||||||
<
|
<
|
||||||
@@ -6752,19 +6752,19 @@ M.funcs = {
|
|||||||
|
|
||||||
Examples: >vim
|
Examples: >vim
|
||||||
" Assuming line 3 in buffer 5 contains "a"
|
" Assuming line 3 in buffer 5 contains "a"
|
||||||
:echo matchbufline(5, '\<\k\+\>', 3, 3)
|
echo matchbufline(5, '\<\k\+\>', 3, 3)
|
||||||
[{'lnum': 3, 'byteidx': 0, 'text': 'a'}]
|
< `[{'lnum': 3, 'byteidx': 0, 'text': 'a'}]` >vim
|
||||||
" Assuming line 4 in buffer 10 contains "tik tok"
|
" Assuming line 4 in buffer 10 contains "tik tok"
|
||||||
:echo matchbufline(10, '\<\k\+\>', 1, 4)
|
echo matchbufline(10, '\<\k\+\>', 1, 4)
|
||||||
[{'lnum': 4, 'byteidx': 0, 'text': 'tik'}, {'lnum': 4, 'byteidx': 4, 'text': 'tok'}]
|
< `[{'lnum': 4, 'byteidx': 0, 'text': 'tik'}, {'lnum': 4, 'byteidx': 4, 'text': 'tok'}]`
|
||||||
<
|
|
||||||
If {submatch} is present and is v:true, then submatches like
|
If {submatch} is present and is v:true, then submatches like
|
||||||
"\1", "\2", etc. are also returned. Example: >vim
|
"\1", "\2", etc. are also returned. Example: >vim
|
||||||
" Assuming line 2 in buffer 2 contains "acd"
|
" 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})
|
\ {'submatches': v:true})
|
||||||
[{'lnum': 2, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]
|
< `[{'lnum': 2, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]`
|
||||||
<The "submatches" List always contains 9 items. If a submatch
|
The "submatches" List always contains 9 items. If a submatch
|
||||||
is not found, then an empty string is returned for that
|
is not found, then an empty string is returned for that
|
||||||
submatch.
|
submatch.
|
||||||
]=],
|
]=],
|
||||||
@@ -6984,17 +6984,17 @@ M.funcs = {
|
|||||||
option settings on the pattern.
|
option settings on the pattern.
|
||||||
|
|
||||||
Example: >vim
|
Example: >vim
|
||||||
:echo matchstrlist(['tik tok'], '\<\k\+\>')
|
echo matchstrlist(['tik tok'], '\<\k\+\>')
|
||||||
[{'idx': 0, 'byteidx': 0, 'text': 'tik'}, {'idx': 0, 'byteidx': 4, 'text': 'tok'}]
|
< `[{'idx': 0, 'byteidx': 0, 'text': 'tik'}, {'idx': 0, 'byteidx': 4, 'text': 'tok'}]` >vim
|
||||||
:echo matchstrlist(['a', 'b'], '\<\k\+\>')
|
echo matchstrlist(['a', 'b'], '\<\k\+\>')
|
||||||
[{'idx': 0, 'byteidx': 0, 'text': 'a'}, {'idx': 1, 'byteidx': 0, 'text': 'b'}]
|
< `[{'idx': 0, 'byteidx': 0, 'text': 'a'}, {'idx': 1, 'byteidx': 0, 'text': 'b'}]`
|
||||||
<
|
|
||||||
If "submatches" is present and is v:true, then submatches like
|
If "submatches" is present and is v:true, then submatches like
|
||||||
"\1", "\2", etc. are also returned. Example: >vim
|
"\1", "\2", etc. are also returned. Example: >vim
|
||||||
:echo matchstrlist(['acd'], '\(a\)\?\(b\)\?\(c\)\?\(.*\)',
|
echo matchstrlist(['acd'], '\(a\)\?\(b\)\?\(c\)\?\(.*\)',
|
||||||
\ #{submatches: v:true})
|
\ #{submatches: v:true})
|
||||||
[{'idx': 0, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]
|
< `[{'idx': 0, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]`
|
||||||
<The "submatches" List always contains 9 items. If a submatch
|
The "submatches" List always contains 9 items. If a submatch
|
||||||
is not found, then an empty string is returned for that
|
is not found, then an empty string is returned for that
|
||||||
submatch.
|
submatch.
|
||||||
]=],
|
]=],
|
||||||
@@ -8674,7 +8674,7 @@ M.funcs = {
|
|||||||
the following mappings: >vim
|
the following mappings: >vim
|
||||||
nnoremap <expr> GG ":echom " .. screencol() .. "\n"
|
nnoremap <expr> GG ":echom " .. screencol() .. "\n"
|
||||||
nnoremap <silent> GG :echom screencol()<CR>
|
nnoremap <silent> GG :echom screencol()<CR>
|
||||||
noremap GG <Cmd>echom screencol()<Cr>
|
noremap GG <Cmd>echom screencol()<CR>
|
||||||
<
|
<
|
||||||
]=],
|
]=],
|
||||||
name = 'screencol',
|
name = 'screencol',
|
||||||
|
Reference in New Issue
Block a user