diff options
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/api.txt | 34 | ||||
-rw-r--r-- | runtime/doc/deprecated.txt | 2 | ||||
-rw-r--r-- | runtime/doc/news.txt | 4 |
3 files changed, 19 insertions, 21 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 289788f036..197edf2e81 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -923,31 +923,23 @@ nvim_get_current_win() *nvim_get_current_win()* Return: ~ Window handle -nvim_get_hl_by_id({hl_id}, {rgb}) *nvim_get_hl_by_id()* - Gets a highlight definition by id. |hlID()| +nvim_get_hl({ns_id}, {*opts}) *nvim_get_hl()* + Gets all or specific highlight groups in a namespace. Parameters: ~ - • {hl_id} Highlight id as returned by |hlID()| - • {rgb} Export RGB colors - - Return: ~ - Highlight definition map - - See also: ~ - • nvim_get_hl_by_name - -nvim_get_hl_by_name({name}, {rgb}) *nvim_get_hl_by_name()* - Gets a highlight definition by name. - - Parameters: ~ - • {name} Highlight group name - • {rgb} Export RGB colors + • {ns_id} Get highlight groups for namespace ns_id + |nvim_get_namespaces()|. Use 0 to get global highlight groups + |:highlight|. + • {opts} Options dict: + • name: (string) Get a highlight definition by name. + • id: (integer) Get a highlight definition by id. + • link: (boolean, default true) Show linked group name + instead of effective definition |:hi-link|. Return: ~ - Highlight definition map - - See also: ~ - • nvim_get_hl_by_id + Highlight groups as a map from group name to a highlight definition + map as in |nvim_set_hl()|, or only a single highlight definition map + if requested by name or id. nvim_get_hl_id_by_name({name}) *nvim_get_hl_id_by_name()* Gets a highlight group by name diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index 74c50f00a2..50f5b95ab5 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -17,6 +17,8 @@ API - *nvim_buf_set_virtual_text()* Use |nvim_buf_set_extmark()| instead. - *nvim_command_output()* Use |nvim_exec()| instead. - *nvim_execute_lua()* Use |nvim_exec_lua()| instead. +- *nvim_get_hl_by_name()* Use |nvim_get_hl()| instead. +- *nvim_get_hl_by_id()* Use |nvim_get_hl()| instead. COMMANDS - *:rv* *:rviminfo* Deprecated alias to |:rshada| command. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 1499b9d742..a03bd705a9 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -217,6 +217,8 @@ The following new APIs or features were added. • |vim.filetype.get_option()| to get the default option value for a specific filetype. This is a wrapper around |nvim_get_option_value()| with caching. + +• Added |nvim_get_hl()| for getting highlight group definitions in a format compatible with |nvim_set_hl()|. ============================================================================== CHANGED FEATURES *news-changes* @@ -278,4 +280,6 @@ release. • |vim.treesitter.get_node_at_pos()| and |vim.treesitter.get_node_at_cursor()| are both deprecated in favor of |vim.treesitter.get_node()|. +• `vim.api.nvim_get_hl_by_name()`, `vim.api.nvim_get_hl_by_id()` were deprecated, use |nvim_get_hl()| instead. + vim:tw=78:ts=8:sw=2:et:ft=help:norl: |