From 2615ed879e66a3d05920c47177e77383adc7aca0 Mon Sep 17 00:00:00 2001 From: Daniel Steinberg Date: Tue, 18 Jul 2023 17:02:45 -0400 Subject: feat(ui): allow to get the highlight namespace --- runtime/lua/vim/_meta/api.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'runtime/lua/vim/_meta/api.lua') diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua index 68ef54eb2f..f0101eb6a4 100644 --- a/runtime/lua/vim/_meta/api.lua +++ b/runtime/lua/vim/_meta/api.lua @@ -1258,6 +1258,16 @@ function vim.api.nvim_get_hl_by_name(name, rgb) end --- @return integer function vim.api.nvim_get_hl_id_by_name(name) end +--- Gets the active highlight namespace. +--- +--- @param opts vim.api.keyset.get_ns Optional parameters +--- • winid: (number) `window-ID` for retrieving a window's +--- highlight namespace. A value of -1 is returned when +--- `nvim_win_set_hl_ns()` has not been called for the window +--- (or was called with a namespace of -1). +--- @return integer +function vim.api.nvim_get_hl_ns(opts) end + --- Gets a list of global (non-buffer-local) `mapping` definitions. --- --- @param mode string Mode short-name ("n", "i", "v", ...) -- cgit