From 0c4c7443625aac79811d57409f87d921dd404e85 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Sat, 23 Jun 2018 08:38:46 +0300 Subject: [PATCH] rc: Highlight embedded documentation This commit adds a `documentation` face to the builtin themes, used to highlight common documentation syntaxes: /** * JavaDoc */ /*! * QtDoc */ /// Inline documentation ## Inline documentation The face is only an alias to the `comment` one for now. Closes #1944 --- colors/base16.kak | 1 + colors/default.kak | 1 + colors/desertex.kak | 19 ++++++++++--------- colors/github.kak | 1 + colors/greyscale.kak | 1 + colors/gruvbox.kak | 25 +++++++++++++------------ colors/kaleidoscope-dark.kak | 3 ++- colors/kaleidoscope-light.kak | 1 + colors/lucius.kak | 1 + colors/palenight.kak | 23 ++++++++++++----------- colors/plain.kak | 1 + colors/red-phoenix.kak | 1 + colors/reeder.kak | 25 +++++++++++++------------ colors/solarized-dark-termcolors.kak | 1 + colors/solarized-dark.kak | 1 + colors/solarized-light-termcolors.kak | 1 + colors/solarized-light.kak | 1 + colors/tomorrow-night.kak | 1 + colors/zenburn.kak | 1 + rc/filetype/c-family.kak | 4 ++++ rc/filetype/d.kak | 6 +++--- rc/filetype/java.kak | 2 +- rc/filetype/nim.kak | 6 ++++-- rc/filetype/python.kak | 1 + rc/filetype/rust.kak | 1 + 25 files changed, 78 insertions(+), 51 deletions(-) diff --git a/colors/base16.kak b/colors/base16.kak index 677d35b7..dd661ecf 100644 --- a/colors/base16.kak +++ b/colors/base16.kak @@ -28,6 +28,7 @@ evaluate-commands %sh{ face global operator ${cyan_light} face global attribute ${orange_dark} face global comment ${grey_dark} + face global documentation comment face global meta ${orange_light} face global builtin default+b " diff --git a/colors/default.kak b/colors/default.kak index eb101049..4ade7d8f 100644 --- a/colors/default.kak +++ b/colors/default.kak @@ -11,6 +11,7 @@ face global keyword blue face global operator yellow face global attribute green face global comment cyan +face global documentation comment face global meta magenta face global builtin default+b diff --git a/colors/desertex.kak b/colors/desertex.kak index b30efbf6..ae437281 100644 --- a/colors/desertex.kak +++ b/colors/desertex.kak @@ -1,15 +1,16 @@ # desertex theme # Code -face global value rgb:fa8072 -face global type rgb:dfdfbf -face global identifier rgb:87ceeb -face global string rgb:fa8072 -face global error rgb:c3bf9f+b -face global keyword rgb:eedc82 -face global operator rgb:87ceeb -face global attribute rgb:eedc82 -face global comment rgb:7ccd7c+i +face global value rgb:fa8072 +face global type rgb:dfdfbf +face global identifier rgb:87ceeb +face global string rgb:fa8072 +face global error rgb:c3bf9f+b +face global keyword rgb:eedc82 +face global operator rgb:87ceeb +face global attribute rgb:eedc82 +face global comment rgb:7ccd7c+i +face global documentation comment # #include <...> face global meta rgb:ee799f diff --git a/colors/github.kak b/colors/github.kak index f685553b..2ca2519b 100644 --- a/colors/github.kak +++ b/colors/github.kak @@ -14,6 +14,7 @@ face global keyword rgb:A71D5D+b face global operator yellow face global attribute rgb:A71D5D face global comment rgb:AAAAAA +face global documentation comment face global meta rgb:183691 face global builtin default+b diff --git a/colors/greyscale.kak b/colors/greyscale.kak index 1f9e7421..7faed391 100644 --- a/colors/greyscale.kak +++ b/colors/greyscale.kak @@ -24,6 +24,7 @@ evaluate-commands %sh{ set-face global builtin ${grey}+b set-face global module ${grey_dark_1} set-face global comment ${grey}+i + set-face global documentation comment set-face global function Default set-face global operator Default set-face global variable Default diff --git a/colors/gruvbox.kak b/colors/gruvbox.kak index d2613e46..b2995b90 100644 --- a/colors/gruvbox.kak +++ b/colors/gruvbox.kak @@ -24,18 +24,19 @@ evaluate-commands %sh{ echo " # Code highlighting - face global value ${purple} - face global type ${yellow} - face global variable ${blue} - face global module ${green} - face global function ${fg} - face global string ${green} - face global keyword ${red} - face global operator ${fg} - face global attribute ${orange} - face global comment ${gray}+i - face global meta ${aqua} - face global builtin ${fg}+b + face global value ${purple} + face global type ${yellow} + face global variable ${blue} + face global module ${green} + face global function ${fg} + face global string ${green} + face global keyword ${red} + face global operator ${fg} + face global attribute ${orange} + face global comment ${gray}+i + face global documentation comment + face global meta ${aqua} + face global builtin ${fg}+b # Markdown highlighting face global title ${green}+b diff --git a/colors/kaleidoscope-dark.kak b/colors/kaleidoscope-dark.kak index f59bf70d..c078afe8 100644 --- a/colors/kaleidoscope-dark.kak +++ b/colors/kaleidoscope-dark.kak @@ -1,4 +1,4 @@ -# Kaleidoscope: colorblind-friendly light colorscheme +# Kaleidoscope: colorblind-friendly dark colorscheme # https://personal.sron.nl/~pault/ evaluate-commands %sh{ @@ -82,6 +82,7 @@ evaluate-commands %sh{ set-face global builtin ${vibrant_blue}+b set-face global module ${vibrant_orange} set-face global comment ${bright_green}+i + set-face global documentation comment set-face global function Default set-face global operator Default set-face global variable Default diff --git a/colors/kaleidoscope-light.kak b/colors/kaleidoscope-light.kak index 0924ebba..68119f33 100644 --- a/colors/kaleidoscope-light.kak +++ b/colors/kaleidoscope-light.kak @@ -82,6 +82,7 @@ evaluate-commands %sh{ set-face global builtin ${muted_indigo}+b set-face global module ${vibrant_orange} set-face global comment ${muted_green}+i + set-face global documentation comment set-face global function Default set-face global operator Default set-face global variable Default diff --git a/colors/lucius.kak b/colors/lucius.kak index 7bba885d..c65aaabb 100644 --- a/colors/lucius.kak +++ b/colors/lucius.kak @@ -34,6 +34,7 @@ evaluate-commands %sh{ face global operator ${lucius_green} face global attribute ${lucius_light_blue} face global comment ${lucius_grey} + face global documentation comment face global meta ${lucius_purple} face global builtin default+b diff --git a/colors/palenight.kak b/colors/palenight.kak index aa5f92c0..e4aed532 100644 --- a/colors/palenight.kak +++ b/colors/palenight.kak @@ -25,17 +25,18 @@ evaluate-commands %sh{ printf "%s\n" " # Code - face global value $dark_yellow - face global type $yellow - face global function $blue - face global variable $blue - face global identifier $blue - face global string $green - face global error rgb:c3bf9f+b - face global keyword $purple - face global operator $cyan - face global attribute rgb:eedc82 - face global comment $comment_grey+i + face global value $dark_yellow + face global type $yellow + face global function $blue + face global variable $blue + face global identifier $blue + face global string $green + face global error rgb:c3bf9f+b + face global keyword $purple + face global operator $cyan + face global attribute rgb:eedc82 + face global comment $comment_grey+i + face global documentation comment # #include <...> face global meta $yellow diff --git a/colors/plain.kak b/colors/plain.kak index d044d2a6..7c87c839 100644 --- a/colors/plain.kak +++ b/colors/plain.kak @@ -9,6 +9,7 @@ face global keyword default face global operator default face global attribute default face global comment blue +face global documentation comment face global meta default face global builtin default diff --git a/colors/red-phoenix.kak b/colors/red-phoenix.kak index 9573edfb..c4bc0b55 100644 --- a/colors/red-phoenix.kak +++ b/colors/red-phoenix.kak @@ -43,6 +43,7 @@ evaluate-commands %sh{ face global operator ${yellow1} face global attribute ${tan1} face global comment ${gray1} + face global documentation comment face global meta ${gray2} face global builtin ${tan1} " diff --git a/colors/reeder.kak b/colors/reeder.kak index a4fd06a6..cc174290 100644 --- a/colors/reeder.kak +++ b/colors/reeder.kak @@ -22,18 +22,19 @@ evaluate-commands %sh{ # Base color definitions echo " # then we map them to code - face global value ${orange_light}+b - face global type ${orange} - face global variable default - face global module ${green} - face global function default - face global string ${green} - face global keyword ${brown_dark} - face global operator default - face global attribute ${green} - face global comment ${brown_light} - face global meta ${brown_dark} - face global builtin default+b + face global value ${orange_light}+b + face global type ${orange} + face global variable default + face global module ${green} + face global function default + face global string ${green} + face global keyword ${brown_dark} + face global operator default + face global attribute ${green} + face global comment ${brown_light} + face global documentation comment + face global meta ${brown_dark} + face global builtin default+b # and markup face global title ${orange}+b diff --git a/colors/solarized-dark-termcolors.kak b/colors/solarized-dark-termcolors.kak index ffb891f4..322c5f1c 100644 --- a/colors/solarized-dark-termcolors.kak +++ b/colors/solarized-dark-termcolors.kak @@ -12,6 +12,7 @@ face global keyword green face global operator green face global attribute bright-magenta face global comment bright-green +face global documentation comment face global meta bright-red face global builtin default+b diff --git a/colors/solarized-dark.kak b/colors/solarized-dark.kak index cf1314f6..7672ca27 100644 --- a/colors/solarized-dark.kak +++ b/colors/solarized-dark.kak @@ -30,6 +30,7 @@ evaluate-commands %sh{ face global operator ${yellow} face global attribute ${violet} face global comment ${base01} + face global documentation comment face global meta ${orange} face global builtin default+b diff --git a/colors/solarized-light-termcolors.kak b/colors/solarized-light-termcolors.kak index 07ded5a0..fdbec3ba 100644 --- a/colors/solarized-light-termcolors.kak +++ b/colors/solarized-light-termcolors.kak @@ -12,6 +12,7 @@ face global keyword green face global operator yellow face global attribute bright-magenta face global comment bright-cyan +face global documentation comment face global meta bright-red face global builtin default+b diff --git a/colors/solarized-light.kak b/colors/solarized-light.kak index 9402742a..7128fc13 100644 --- a/colors/solarized-light.kak +++ b/colors/solarized-light.kak @@ -30,6 +30,7 @@ evaluate-commands %sh{ face global operator ${yellow} face global attribute ${violet} face global comment ${base1} + face global documentation comment face global meta ${orange} face global builtin default+b diff --git a/colors/tomorrow-night.kak b/colors/tomorrow-night.kak index 20a25480..8b038afa 100644 --- a/colors/tomorrow-night.kak +++ b/colors/tomorrow-night.kak @@ -33,6 +33,7 @@ evaluate-commands %sh{ face global operator ${aqua} face global attribute ${purple} face global comment ${comment} + face global documentation comment face global meta ${purple} face global builtin ${orange} " diff --git a/colors/zenburn.kak b/colors/zenburn.kak index a27c8320..57b4ba79 100644 --- a/colors/zenburn.kak +++ b/colors/zenburn.kak @@ -41,6 +41,7 @@ evaluate-commands %sh{ face global operator ${zenfunction} face global attribute ${zenstatement} face global comment ${zencomment} + face global documentation comment face global meta ${zenspecial} face global builtin default+b diff --git a/rc/filetype/c-family.kak b/rc/filetype/c-family.kak index 2c82a90e..e955fc8e 100644 --- a/rc/filetype/c-family.kak +++ b/rc/filetype/c-family.kak @@ -198,6 +198,10 @@ evaluate-commands %sh{ add-highlighter shared/$ft/code default-region group add-highlighter shared/$ft/string region %{$maybe_at(?