aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorSindre T. Strøm <sindrets@gmail.com>2023-03-31 12:52:53 +0200
committerGitHub <noreply@github.com>2023-03-31 12:52:53 +0200
commitb34097fe6d2ea5c84bcec65a834a430d9f58eb64 (patch)
tree5437aa065dab04d1772ab15573ae47be584b778e /runtime
parented10e4ef60c63d924b9969abdf77adaad506b676 (diff)
downloadrneovim-b34097fe6d2ea5c84bcec65a834a430d9f58eb64.tar.gz
rneovim-b34097fe6d2ea5c84bcec65a834a430d9f58eb64.tar.bz2
rneovim-b34097fe6d2ea5c84bcec65a834a430d9f58eb64.zip
fix(api): return both link and attributes with nvim_get_hl (#22824)
Problem: No way to get the actual highlight attributes for a linked group through |nvim_get_hl()| (not the attributes from the link target). Solution: Return the actual attributes as well as the link target name.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/api.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index b51da8d56f..844bf772f1 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -941,6 +941,10 @@ nvim_get_hl({ns_id}, {*opts}) *nvim_get_hl()*
map as in |nvim_set_hl()|, or only a single highlight definition map
if requested by name or id.
+ Note:
+ When the `link` attribute is defined in the highlight definition map,
+ other attributes will not be taking effect (see |:hi-link|).
+
nvim_get_hl_id_by_name({name}) *nvim_get_hl_id_by_name()*
Gets a highlight group by name
@@ -1388,6 +1392,10 @@ nvim_set_hl({ns_id}, {name}, {*val}) *nvim_set_hl()*
values of the Normal group. If the Normal group has not been defined,
using these values results in an error.
+ Note:
+ If `link` is used in combination with other attributes; only the
+ `link` will take effect (see |:hi-link|).
+
Parameters: ~
• {ns_id} Namespace id for this highlight |nvim_create_namespace()|.
Use 0 to set a highlight group globally |:highlight|.