aboutsummaryrefslogtreecommitdiff
path: root/lexers/themes/solarized.lua
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-10-12 17:09:41 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-11-08 13:37:23 +0100
commitc339bb3ae6646c3dbef8e73f41c1e797ed5ec99b (patch)
treeb27016384ad5cad67377a318f8f130fb40c3aab5 /lexers/themes/solarized.lua
parent5f5699fb3a93f2a478f3888236f7c25bc7975fbb (diff)
downloadvis-c339bb3ae6646c3dbef8e73f41c1e797ed5ec99b.tar.gz
vis-c339bb3ae6646c3dbef8e73f41c1e797ed5ec99b.tar.xz
vis: experimental support for lua/lpeg based syntax highlighting
The lua based lexers are searched in the following order: $VIS_PATH/lexers $HOME/.vis/lexers /usr/share/vis/lexers followed by the standard lua package.path
Diffstat (limited to 'lexers/themes/solarized.lua')
-rw-r--r--lexers/themes/solarized.lua54
1 files changed, 54 insertions, 0 deletions
diff --git a/lexers/themes/solarized.lua b/lexers/themes/solarized.lua
new file mode 100644
index 0000000..0575056
--- /dev/null
+++ b/lexers/themes/solarized.lua
@@ -0,0 +1,54 @@
+-- Solarized color codes Copyright (c) 2011 Ethan Schoonover
+local colors = {
+ ['base03'] = '#002b36',
+ ['base02'] = '#073642',
+ ['base01'] = '#586e75',
+ ['base00'] = '#657b83',
+ ['base0'] = '#839496',
+ ['base1'] = '#93a1a1',
+ ['base2'] = '#eee8d5',
+ ['base3'] = '#fdf6e3',
+ ['yellow'] = '#b58900',
+ ['orange'] = '#cb4b16',
+ ['red'] = '#dc322f',
+ ['magenta'] = '#d33682',
+ ['violet'] = '#6c71c4',
+ ['blue'] = '#268bd2',
+ ['cyan'] = '#2aa198',
+ ['green'] = '#859900',
+}
+
+lexers.colors = colors
+-- dark
+local fg = ',fore:'..colors.base0..','
+local bg = ',back:'..colors.base03..','
+-- light
+-- local fg = ',fore:'..colors.base03..','
+-- local bg = ',back:'..colors.base3..','
+
+lexers.STYLE_DEFAULT = bg..fg
+lexers.STYLE_NOTHING = bg
+lexers.STYLE_CLASS = 'fore:yellow'
+lexers.STYLE_COMMENT = 'fore:'..colors.base01
+lexers.STYLE_CONSTANT = 'fore:'..colors.cyan
+lexers.STYLE_DEFINITION = 'fore:'..colors.blue
+lexers.STYLE_ERROR = 'fore:'..colors.red..',italics'
+lexers.STYLE_FUNCTION = 'fore:'..colors.blue
+lexers.STYLE_KEYWORD = 'fore:'..colors.green
+lexers.STYLE_LABEL = 'fore:'..colors.green
+lexers.STYLE_NUMBER = 'fore:'..colors.cyan
+lexers.STYLE_OPERATOR = 'fore:'..colors.green
+lexers.STYLE_REGEX = 'fore:green'
+lexers.STYLE_STRING = 'fore:'..colors.cyan
+lexers.STYLE_PREPROCESSOR = 'fore:'..colors.orange
+lexers.STYLE_TAG = 'fore:'..colors.red
+lexers.STYLE_TYPE = 'fore:'..colors.yellow
+lexers.STYLE_VARIABLE = 'fore:'..colors.blue
+lexers.STYLE_WHITESPACE = ''
+lexers.STYLE_EMBEDDED = 'back:blue'
+lexers.STYLE_IDENTIFIER = fg
+
+lexers.STYLE_LINENUMBER = fg
+lexers.STYLE_CURSOR = 'fore:'..colors.base03..',back:'..colors.base0
+-- lexers.STYLE_SELECTION = 'back:'..colors.base02
+lexers.STYLE_SELECTION = 'back:white'