feat(extmark): window scoped extmark

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
altermo
2024-02-06 11:52:42 +01:00
parent 6d8bbfe19d
commit 1c032ad703
15 changed files with 520 additions and 21 deletions

View File

@@ -613,6 +613,8 @@ function vim.api.nvim_buf_line_count(buffer) end
--- • url: A URL to associate with this extmark. In the TUI, the
--- OSC 8 control sequence is used to generate a clickable
--- hyperlink to this URL.
--- • scoped: boolean that indicates that the extmark should
--- only be displayed in the namespace scope. (experimental)
--- @return integer
function vim.api.nvim_buf_set_extmark(buffer, ns_id, line, col, opts) end
@@ -1982,6 +1984,13 @@ function vim.api.nvim_tabpage_set_var(tabpage, name, value) end
--- @param win integer Window handle, must already belong to {tabpage}
function vim.api.nvim_tabpage_set_win(tabpage, win) end
--- Adds the namespace scope to the window.
---
--- @param window integer Window handle, or 0 for current window
--- @param ns_id integer the namespace to add
--- @return boolean
function vim.api.nvim_win_add_ns(window, ns_id) end
--- Calls a function with window as temporary current window.
---
--- @param window integer Window handle, or 0 for current window
@@ -2032,6 +2041,12 @@ function vim.api.nvim_win_get_cursor(window) end
--- @return integer
function vim.api.nvim_win_get_height(window) end
--- Gets all the namespaces scopes associated with a window.
---
--- @param window integer Window handle, or 0 for current window
--- @return integer[]
function vim.api.nvim_win_get_ns(window) end
--- Gets the window number
---
--- @param window integer Window handle, or 0 for current window
@@ -2084,6 +2099,13 @@ function vim.api.nvim_win_hide(window) end
--- @return boolean
function vim.api.nvim_win_is_valid(window) end
--- Removes the namespace scope from the window.
---
--- @param window integer Window handle, or 0 for current window
--- @param ns_id integer the namespace to remove
--- @return boolean
function vim.api.nvim_win_remove_ns(window, ns_id) end
--- Sets the current buffer in a window, without side effects
---
--- @param window integer Window handle, or 0 for current window

View File

@@ -252,6 +252,7 @@ error('Cannot require a meta file')
--- @field ui_watched? boolean
--- @field undo_restore? boolean
--- @field url? string
--- @field scoped? boolean
--- @field _subpriority? integer
--- @class vim.api.keyset.user_command