diff options
author | Jan Damm <mail@jandamm.de> | 2021-05-02 11:35:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-02 11:35:08 +0200 |
commit | 5867535cea7bb6b4c219fa0726c93e4b055debd2 (patch) | |
tree | 82661b10137a3fb39199b3cbff3e1de53c76ab90 | |
parent | ea7ff9c343392ec6dfac4e9ec3fe0c45afb92a40 (diff) | |
download | nord-vim-5867535cea7bb6b4c219fa0726c93e4b055debd2.tar.gz |
Add public API function to get Nord colors (#224)
Implemented the `NordPalette` pubic API function that returns all Nord
colors as dictionary. This allows to use the colors in other Vim scripts
without the need to copy & paste the colors from the documentations or
the Nord Vim theme sources.
Co-authored-by: Arctic Ice Studio <development@arcticicestudio.com>
Co-authored-by: Sven Greb <development@svengreb.de>
Closes GH-224
-rwxr-xr-x | colors/nord.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/colors/nord.vim b/colors/nord.vim index 5a251da..13d9182 100755 --- a/colors/nord.vim +++ b/colors/nord.vim @@ -772,3 +772,17 @@ hi! link VimwikiList markdownListMarker " YAML " > stephpy/vim-yaml call s:hi("yamlKey", s:nord7_gui, "", s:nord7_term, "", "", "") + +"+------------+ +"+ Public API + +"+------------+ +"+--- Functions ---+ + +function! NordPalette() abort + let ret = {} + for color in range(16) + execute 'let ret["nord'.color.'"] = s:nord'.color.'_gui' + endfor + let ret["nord3_bright"] = s:nord3_gui_bright + return ret +endfunction |