diff --git a/colors/PaperColor.vim b/colors/PaperColor.vim index d817d89..b703d26 100755 --- a/colors/PaperColor.vim +++ b/colors/PaperColor.vim @@ -13,11 +13,11 @@ let s:version = '0.9.x' " See: http://vim.wikia.com/wiki/Folding " - The main section is at the end where the functions are called in order. -" Theme Repository: {{{ +" Theme Repository: let s:themes = {} -" }}} +" fun! s:register_default_theme() " Theme name should be lowercase @@ -205,7 +205,7 @@ endfun " ============================ THEME REGISTER ================================= -" Acquire Theme Data: {{{ +" Acquire Theme Data: " Brief: " Function to get theme information and store in variables for other @@ -226,7 +226,7 @@ endfun " s:options user options fun! s:acquire_theme_data() - " Get theme name: {{{ + " Get theme name: let s:theme_name = 'default' if exists("g:PaperColor_Theme") " Users expressed theme preference @@ -248,7 +248,7 @@ fun! s:acquire_theme_data() endif endif - " }}} + " if s:theme_name ==? 'default' " Either no other theme is specified or they failed to load @@ -258,7 +258,7 @@ fun! s:acquire_theme_data() let s:selected_theme = s:themes[s:theme_name] - " Get Theme Variant: either dark or light {{{ + " Get Theme Variant: either dark or light let s:selected_variant = 'dark' let s:is_dark=(&background == 'dark') @@ -280,7 +280,7 @@ fun! s:acquire_theme_data() let s:palette = s:selected_theme[s:selected_variant].palette - " Systematic User-Config Options: {{{ + " Systematic User-Config Options: " Example config in .vimrc " let g:PaperColor_Theme_Options = { " \ 'theme': { @@ -309,15 +309,15 @@ fun! s:acquire_theme_data() if exists("g:PaperColor_Theme_Options") let s:options = g:PaperColor_Theme_Options endif - " }}} + " - " }}} + " endfun -" }}} +" -" Identify Color Mode: {{{ +" Identify Color Mode: fun! s:identify_color_mode() let s:MODE_16_COLOR = 0 @@ -333,11 +333,11 @@ fun! s:identify_color_mode() endif endfun -" }}} +" " ============================ OPTION HANDLER ================================= -" Generate Them Option Variables: {{{ +" Generate Them Option Variables: fun! s:generate_theme_option_variables() @@ -408,9 +408,9 @@ fun! s:generate_theme_option_variables() endif endfun -" }}} +" -" Check If Theme Has Hint: {{{ +" Check If Theme Has Hint: " " Brief: " Function to Check if the selected theme and variant has a hint @@ -427,9 +427,9 @@ fun! s:theme_has_hint(hint) return has_key(s:selected_theme[s:selected_variant], a:hint) && \ s:selected_theme[s:selected_variant][a:hint] == 1 endfun -" }}} +" -" Set Overriding Colors: {{{ +" Set Overriding Colors: fun! s:set_overriding_colors() @@ -474,9 +474,9 @@ fun! s:set_overriding_colors() endif endfun -" }}} +" -" Generate Language Option Variables: {{{ +" Generate Language Option Variables: " Brief: " Function to generate language option variables so that there is no need to @@ -532,12 +532,12 @@ fun! s:generate_language_option_variables() endif endfun -" }}} +" " =========================== COLOR CONVERTER ================================= fun! s:load_GUI_to_256_converter() - " GUI-color To 256-color: {{{ + " GUI-color To 256-color: " Returns an approximate grey index for the given grey level fun! s:grey_number(x) if &t_Co == 88 @@ -734,11 +734,11 @@ fun! s:load_GUI_to_256_converter() - " }}} + " endfun fun! s:load_256_to_GUI_converter() -" 256-color To GUI-color: {{{ +" 256-color To GUI-color: """ Xterm 256 color dictionary " See: http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html @@ -797,12 +797,12 @@ let s:to_HEX = { \ '250': '#bcbcbc', '251': '#c6c6c6', '252': '#d0d0d0', '253': '#dadada', '254': '#e4e4e4', \ '255': '#eeeeee' } -" }}} +" endfun " ========================== ENVIRONMENT ADAPTER ============================== -" Set Format Attributes: {{{ +" Set Format Attributes: fun! s:set_format_attributes() " These are the default @@ -838,9 +838,9 @@ fun! s:set_format_attributes() endfun -" }}} +" -" Convert Colors If Needed: {{{ +" Convert Colors If Needed: fun! s:convert_colors() if s:theme_has_hint('NO_CONVERSION') return @@ -873,14 +873,14 @@ fun! s:convert_colors() " otherwise use the terminal colors and none of the theme colors are used endfun -" }}} +" " ============================ COLOR POPULARIZER =============================== -" Set Color Variables: {{{ +" Set Color Variables: fun! s:set_color_variables() - " Helper: {{{ + " Helper: " ------- " Function to dynamically generate variables that store the color strings " for setting highlighting. Each color name will have 2 variables with prefix @@ -922,7 +922,7 @@ fun! s:set_color_variables() let {'s:sp_' . a:color_name} = '' endfun endif - " }}} + " " Color value format: Array [, <256-Base>, <16-Base>] " 16-Base is terminal's native color palette that can be alternated through @@ -1113,9 +1113,9 @@ fun! s:set_color_variables() endif endfun -" }}} +" -" Apply Syntax Highlightings: {{{ +" Apply Syntax Highlightings: fun! s:apply_syntax_highlightings() @@ -1254,6 +1254,9 @@ fun! s:apply_syntax_highlightings() exec 'hi LspDiagnosticsUnderlineWarning cterm=undercurl gui=undercurl' . s:sp_todo_fg exec 'hi LspDiagnosticsUnderlineInformation cterm=undercurl gui=undercurl' . s:sp_todo_fg exec 'hi LspDiagnosticsUnderlineHint cterm=undercurl gui=undercurl' . s:sp_todo_fg + " correct border color for lsp_signature plugin (ray-x/lsp_signature.nvim) + exec 'hi FloatBorder' . s:bg_background + exec 'hi NormalFloat' . s:bg_background hi! link DiagnosticError LspDiagnosticsDefaultError hi! link DiagnosticWarn LspDiagnosticsDefaultWarning @@ -1267,7 +1270,7 @@ fun! s:apply_syntax_highlightings() endif - " Extension {{{ + " Extension " VimL Highlighting exec 'hi vimCommand' . s:fg_pink exec 'hi vimVar' . s:fg_navy @@ -2122,7 +2125,7 @@ fun! s:apply_syntax_highlightings() exec 'hi asnTypeInfo' . s:fg_aqua . s:ft_bold exec 'hi asnFieldOption' . s:fg_purple - " }}} + " " Plugin: Netrw exec 'hi netrwVersion' . s:fg_red @@ -2305,10 +2308,10 @@ fun! s:apply_syntax_highlightings() endif endfun -" }}} +" " ================================== MISC ===================================== -" Command to show theme information {{{ +" Command to show theme information fun! g:PaperColor() echom 'PaperColor Theme Framework' echom ' version ' . s:version @@ -2326,7 +2329,7 @@ endfun " @brief command alias for g:PaperColor() command! -nargs=0 PaperColor :call g:PaperColor() -" }}} +" " =============================== MAIN ========================================