diff --git a/colors/highlite.vim b/colors/highlite.vim index 3331bfa..0f433b0 100644 --- a/colors/highlite.vim +++ b/colors/highlite.vim @@ -47,10 +47,16 @@ lua << EOF ]] --[[ Step 2: Information - This is the name of your colorscheme which will be used as per |g:colors_name|. + In this step you will define information that helps Neovim process: + + 1. How users access your colorscheme; + 2. How your colorscheme should be rendered. ]] +-- This is the name of your colorscheme which will be used as per |g:colors_name|. vim.g.colors_name = 'highlite' +-- This is the kind of colorscheme you are creating. Either 'light' or 'dark' +vim.o.background = 'dark' --[[ Step 3: Colors Next you will define all of the colors that you will use for the color scheme. @@ -60,8 +66,8 @@ vim.g.colors_name = 'highlite' ```lua = { -- Give each color a distinctive name. '#', -- Hexadecimal color used in GVim/MacVim or 'NONE'. - <256-bit color code>, -- Integer 0–255 used by terminals supporting 256 colors or 'NONE'. - '<16-bit color code>' -- color name used by less capable color terminals, can be 'darkred', + <16-bit color code>, -- Integer 0–255 used by terminals supporting 256 colors or 'NONE'. + '' -- color name used by less capable color terminals, can be 'darkred', 'red', 'darkgreen', 'green', 'darkyellow', 'yellow', 'darkblue', 'blue', 'darkmagenta', 'magenta', 'black', 'darkgrey', 'grey', 'white', or 'NONE' @@ -114,31 +120,34 @@ local purple_light = {'#af60af', 63, 'magenta'} ```lua = { - bg=, -- The color used for background color, or use 'NONE', 'fg' or 'bg' - fg=, -- The color used for foreground color, or use 'NONE', 'fg' or 'bg' + bg=, -- The color used for background color, or use `NONE`, `FG` or `BG` + fg=, -- The color used for foreground color, or use `NONE`, `FG` or `BG` blend= -- The |highlight-blend| value, if one is desired. -- Style can be 'bold', 'italic', and more. See |attr-list| for more information. It can also have a color, and/or multiple s. style=|{ [, ] [color=]}) } ``` - Or you can link an highlight group to another. + TIP: Any fields which are set to `NONE` can be safely left out. + + You can also link one highlight group to another: ```lua = '' ``` - Here is an example: + Here is an example to define `SpellBad` and then link some new group `SpellWorse` to it: ```lua SpellBad = { -- ← name of the highlight group - bg='NONE', -- background color + bg=NONE, -- background color fg=red, -- foureground color style={ -- the style 'undercurl', -- undercurl (squiggly line) color=red -- the color of the undercurl } - } + }, + SpellWorse = 'SpellBad' ``` If you weren't satisfied with undercurl, and also wanted another effect, you can @@ -164,7 +173,7 @@ local purple_light = {'#af60af', 63, 'magenta'} NOTE: |Replace-mode| will probably be useful here. NOTE: /As long as you do not remove any highlight groups or colors/, you can safely - ignore any highlight groups that are `link`ed others. + ignore any highlight groups that are `link`ed to others. For example, programming languages almost exclusively link to the 1st and 2nd sections, so as long as you define everything there you will automatically be defining the rest of the highlights, which is one of the benefits of using