diff options
author | Siddhant Agarwal <68201519+siddhantdev@users.noreply.github.com> | 2025-01-22 21:16:24 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-22 07:46:24 -0800 |
commit | af0ef2ac9dd19b7c4005a3197334d3e7d554646c (patch) | |
tree | c3bba66baa6eeddf592692220c6946b5f39825be /runtime/doc | |
parent | 34344b939c060d36db719f17088639744ca61c94 (diff) | |
download | rneovim-af0ef2ac9dd19b7c4005a3197334d3e7d554646c.tar.gz rneovim-af0ef2ac9dd19b7c4005a3197334d3e7d554646c.tar.bz2 rneovim-af0ef2ac9dd19b7c4005a3197334d3e7d554646c.zip |
feat(lua): vim.hl.range() "timeout" #32012
Problem:
`vim.hl.on_yank()` has a "timeout" behavior but this is not available for
`vim.hl.range()`.
Solution:
Add `timeout` arg to `vim.hl.range()`.
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/lua.txt | 2 | ||||
-rw-r--r-- | runtime/doc/news.txt | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 6e5a77ff7a..0eca3286d0 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -685,6 +685,8 @@ vim.hl.range({bufnr}, {ns}, {higroup}, {start}, {finish}, {opts}) whether the range is end-inclusive • {priority}? (`integer`, default: `vim.hl.priorities.user`) Highlight priority + • {timeout}? (`integer`, default: -1 no timeout) Time in ms + before highlight is cleared ============================================================================== diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 0d5fa3ca18..0f1ec01d19 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -194,6 +194,7 @@ API highlight group IDs. • |nvim_open_win()| `relative` field can be set to "laststatus" and "tabline". • |nvim_buf_set_extmark()| `hl_group` field can be an array of layered groups +• |vim.hl.range()| now has a optional `timeout` field which allows for a timed highlight DEFAULTS |