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.
This commit is contained in:
Luuk van Baal
2023-10-24 13:32:00 +02:00
parent 324fad1e88
commit 4e6f559b8c
13 changed files with 229 additions and 84 deletions

View File

@@ -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