diff options
author | Marc Coquand <marc@mccd.space> | 2024-05-22 11:17:26 -0500 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-05-22 11:17:26 -0500 |
commit | 57777a1aa586f23d9060596f8ac70ef3830e6d0c (patch) | |
tree | d448a7e48e2f099536bed959146b6ac5208c1f87 /config | |
parent | fa33bc3764c0c76cf05aa5ba1f2af13019dc81e1 (diff) | |
download | rcm-57777a1aa586f23d9060596f8ac70ef3830e6d0c.tar.gz rcm-57777a1aa586f23d9060596f8ac70ef3830e6d0c.tar.bz2 rcm-57777a1aa586f23d9060596f8ac70ef3830e6d0c.zip |
Add vis
Diffstat (limited to 'config')
m--------- | config/vis/plugins/vis-format | 0 | ||||
m--------- | config/vis/plugins/vis-lspc | 0 | ||||
m--------- | config/vis/plugins/vis-pairs | 0 | ||||
-rw-r--r-- | config/vis/themes/minimal-light.lua | 48 | ||||
-rw-r--r-- | config/vis/visrc.lua | 29 |
5 files changed, 77 insertions, 0 deletions
diff --git a/config/vis/plugins/vis-format b/config/vis/plugins/vis-format new file mode 160000 +Subproject 9b68389b941afe84ebc809ee7fdce9103536eb1 diff --git a/config/vis/plugins/vis-lspc b/config/vis/plugins/vis-lspc new file mode 160000 +Subproject b777ef7207c3dee575355f78d019b4ff2f0fb46 diff --git a/config/vis/plugins/vis-pairs b/config/vis/plugins/vis-pairs new file mode 160000 +Subproject 80bd5f27b72a5f11b67f4b36006b0f25627bc5d diff --git a/config/vis/themes/minimal-light.lua b/config/vis/themes/minimal-light.lua new file mode 100644 index 0000000..1a1af9b --- /dev/null +++ b/config/vis/themes/minimal-light.lua @@ -0,0 +1,48 @@ + +local black0 = '#010101' +local black1 = '#383838' +local black2 = '#686868' +local string_color = '#41486C' + + +local white0 = '#ffffff' +local white1 = '#c8c8c8' +local white2 = '#989898' + +local lexers = vis.lexers + +lexers.STYLE_DEFAULT ='back:'..white0..',fore:'..black0 +lexers.STYLE_NOTHING = 'back:'..white0 +lexers.STYLE_CLASS = 'fore:'..black0 +lexers.STYLE_COMMENT = 'fore:'..white2 +lexers.STYLE_CONSTANT = 'fore:'..black0 +lexers.STYLE_DEFINITION = 'fore:'..black0 +lexers.STYLE_ERROR = 'fore:'..black0 +lexers.STYLE_FUNCTION = 'fore:'..black0 +lexers.STYLE_KEYWORD = 'fore:'..black0..',bold' +lexers.STYLE_LABEL = 'fore:'..black0 +lexers.STYLE_NUMBER = 'fore:'..black1 +lexers.STYLE_OPERATOR = 'fore:'..black0 +lexers.STYLE_REGEX = 'fore:'..black1 +lexers.STYLE_STRING = 'fore:'..string_color +lexers.STYLE_PREPROCESSOR = 'fore:'..black0 +lexers.STYLE_TAG = 'fore:'..black0 +lexers.STYLE_TYPE = 'fore:'..black0 +lexers.STYLE_VARIABLE = 'fore:'..black0 +lexers.STYLE_WHITESPACE = '' +lexers.STYLE_EMBEDDED = 'back:'..white1 +lexers.STYLE_IDENTIFIER = 'fore:'..black0 + +lexers.STYLE_LINENUMBER = 'fore:'..black1 +lexers.STYLE_LINENUMBER_CURSOR = lexers.STYLE_LINENUMBER +lexers.STYLE_CURSOR = 'back:'..white2 +lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',fore:'..black1 +lexers.STYLE_CURSOR_LINE = 'underlined' +lexers.STYLE_COLOR_COLUMN = 'back:'..white1 +lexers.STYLE_SELECTION = 'back:'..white1 +lexers.STYLE_STATUS = 'reverse' +lexers.STYLE_STATUS_FOCUSED = 'back:'..black0..',fore:'..white0 +lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT +lexers.STYLE_INFO = 'fore:default,back:default' +lexers.STYLE_EOF = '' + diff --git a/config/vis/visrc.lua b/config/vis/visrc.lua new file mode 100644 index 0000000..3ac1042 --- /dev/null +++ b/config/vis/visrc.lua @@ -0,0 +1,29 @@ +require('vis') +require('plugins/vis-pairs') +require('plugins/vis-lspc') +local format = require('plugins/vis-format') +format.formatters.caml = format.stdio_formatter("ocamlformat --impl -") + +vis:command_register("fd", function(argv, force, cur_win, selection, range) + local out = io.popen("fd . | vis-menu"):read() + if out then + vis:command(string.format('e'..' "%s"', out)) + vis:feedkeys("<vis-redraw>") + end +end, 'fuzzy file search') + +vis.events.subscribe(vis.events.INIT, function() + -- Your global configuration options + vis:command('set theme minimal-light') + vis:map(vis.modes.NORMAL, '=', format.apply) + vis:map(vis.modes.NORMAL, ',', ":") + vis:map(vis.modes.VISUAL, 'gq', ":|fmt -w 80") +end) + +vis.events.subscribe(vis.events.WIN_OPEN, function(win) -- luacheck: no unused args + -- Your per window configuration options e.g. + -- vis:command('set number') + vis:command('set showeof off') + vis:command('set expandtab') + vis:command('set tw 2') +end) |