From 4e6f559b8c5f77924fdbe2e5abd9c6aa8efad13f Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Tue, 24 Oct 2023 13:32:00 +0200 Subject: feat(extmarks): add 'invalidate' property to extmarks Problem: No way to have extmarks automatically removed when the range it is attached to is deleted. Solution: Add new 'invalidate' property that will hide a mark when the entirety of its range is deleted. When "undo_restore" is set to false, delete the mark from the buffer instead. --- runtime/lua/vim/_meta/api_keysets.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/lua/vim/_meta/api_keysets.lua') diff --git a/runtime/lua/vim/_meta/api_keysets.lua b/runtime/lua/vim/_meta/api_keysets.lua index 467409505e..f69e5a92c7 100644 --- a/runtime/lua/vim/_meta/api_keysets.lua +++ b/runtime/lua/vim/_meta/api_keysets.lua @@ -227,6 +227,7 @@ error('Cannot require a meta file') --- @field virt_text_hide? boolean --- @field hl_eol? boolean --- @field hl_mode? string +--- @field invalidate? boolean --- @field ephemeral? boolean --- @field priority? integer --- @field right_gravity? boolean @@ -243,6 +244,7 @@ error('Cannot require a meta file') --- @field conceal? string --- @field spell? boolean --- @field ui_watched? boolean +--- @field undo_restore? boolean --- @class vim.api.keyset.user_command --- @field addr? any -- cgit