diff options
| author | glepnir <glephunter@gmail.com> | 2023-09-07 18:42:38 +0800 |
|---|---|---|
| committer | glepnir <glephunter@gmail.com> | 2023-09-09 17:15:58 +0800 |
| commit | 8afb3a49c0762eb60368aee0314e6de261daa6ef (patch) | |
| tree | bc954a00873a049f5a3a93cd532f3185d2f8cc38 /runtime | |
| parent | 82150ca51bf396e5795b49f6e1cb2faaaa07b28b (diff) | |
| download | rneovim-8afb3a49c0762eb60368aee0314e6de261daa6ef.tar.gz rneovim-8afb3a49c0762eb60368aee0314e6de261daa6ef.tar.bz2 rneovim-8afb3a49c0762eb60368aee0314e6de261daa6ef.zip | |
fix(highlight): add create param in nvim_get_hl
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/doc/api.txt | 2 | ||||
| -rw-r--r-- | runtime/lua/vim/_meta/api.lua | 2 | ||||
| -rw-r--r-- | runtime/lua/vim/_meta/api_keysets.lua | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index e68aafe051..7dd760b6a5 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -966,6 +966,8 @@ nvim_get_hl({ns_id}, {*opts}) *nvim_get_hl()* • id: (integer) Get a highlight definition by id. • link: (boolean, default true) Show linked group name instead of effective definition |:hi-link|. + • create: (boolean, default true) When highlight group + doesn't exist create it. Return: ~ Highlight groups as a map from group name to a highlight definition diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua index dd67fdb38b..c46b604b90 100644 --- a/runtime/lua/vim/_meta/api.lua +++ b/runtime/lua/vim/_meta/api.lua @@ -1193,6 +1193,8 @@ function vim.api.nvim_get_current_win() end --- • id: (integer) Get a highlight definition by id. --- • link: (boolean, default true) Show linked group name --- instead of effective definition `:hi-link`. +--- • create: (boolean, default true) When highlight group +--- doesn't exist create it. --- @return table<string,any> function vim.api.nvim_get_hl(ns_id, opts) end diff --git a/runtime/lua/vim/_meta/api_keysets.lua b/runtime/lua/vim/_meta/api_keysets.lua index 08c29ebe7a..8f36edba77 100644 --- a/runtime/lua/vim/_meta/api_keysets.lua +++ b/runtime/lua/vim/_meta/api_keysets.lua @@ -126,6 +126,7 @@ error('Cannot require a meta file') --- @field id? integer --- @field name? string --- @field link? boolean +--- @field create? boolean --- @class vim.api.keyset.highlight --- @field bold? boolean |