aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authoradrian5 <adrian5@users.noreply.github.com>2022-03-13 13:42:12 +0100
committerGitHub <noreply@github.com>2022-03-13 06:42:12 -0600
commit9e6bc228ec58b787c0985a65139d1959c9d889f0 (patch)
tree1661d35be49f259a8f7c029a2f827861ccfb1512 /runtime
parentc9b94188d5f96349566372e8a0ce94e14fd6b549 (diff)
downloadrneovim-9e6bc228ec58b787c0985a65139d1959c9d889f0.tar.gz
rneovim-9e6bc228ec58b787c0985a65139d1959c9d889f0.tar.bz2
rneovim-9e6bc228ec58b787c0985a65139d1959c9d889f0.zip
docs(api): improve section on nvim_set_hl (#17692)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/api.txt32
1 files changed, 15 insertions, 17 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index eefe6e5a47..9c3c143045 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -1544,23 +1544,21 @@ nvim_set_current_win({window}) *nvim_set_current_win()*
{window} Window handle
nvim_set_hl({ns_id}, {name}, {*val}) *nvim_set_hl()*
- Set a highlight group.
-
- Parameters: ~
- {ns_id} number of namespace for this highlight. Use value
- 0 to set a highlight group in the global (
- `:highlight` ) namespace.
- {name} highlight group name, like ErrorMsg
- {val} highlight definition map, like
- |nvim_get_hl_by_name|. in addition the following
- keys are also recognized: `default` : don't
- override existing definition, like `hi default`
- `ctermfg` : sets foreground of cterm color
- `ctermbg` : sets background of cterm color
- `cterm` : cterm attribute map. sets attributed
- for cterm colors. similer to `hi cterm` Note: by
- default cterm attributes are same as attributes
- of gui color
+ Sets a highlight group.
+
+ Parameters: ~
+ {ns_id} Namespace id for this highlight |nvim_create_namespace()|.
+ Use 0 to set a highlight group globally |:highlight|.
+ {name} Highlight group name, e.g. "ErrorMsg"
+ {val} Highlight definition map, like |synIDattr()|. In
+ addition, the following keys are recognized:
+ • default: Don't override existing definition |:hi-default|
+ • ctermfg: Sets foreground of cterm color |highlight-ctermfg|
+ • ctermbg: Sets background of cterm color |highlight-ctermbg|
+ • cterm: cterm attribute map, like
+ |highlight-args|.
+ Note: Attributes default to those set for `gui`
+ if not set.
nvim_set_keymap({mode}, {lhs}, {rhs}, {*opts}) *nvim_set_keymap()*
Sets a global |mapping| for the given mode.