dotfiles

personal dotfiles
git clone anongit@rnpnr.xyz:dotfiles.git
Log | Files | Refs | Feed | Submodules

Commit: 7ea1d4ddf1300af03c7b4e17d989e51731f53355
Parent: f422dcc3267245d4cc7fc149006ad6f051ed7644
Author: Randy Palamar
Date:   Sat, 27 Apr 2024 19:10:11 -0600

vis: style

Diffstat:
M.config/vis/build.lua | 14+++++---------
M.config/vis/themes/term.lua | 90++++++++++++++++++++++++++++++++++++++++----------------------------------------
M.config/vis/visrc.lua | 5++---
3 files changed, 52 insertions(+), 57 deletions(-)

diff --git a/.config/vis/build.lua b/.config/vis/build.lua @@ -1,6 +1,6 @@ local util = require('util') -local function fmt_file(file) +vis.events.subscribe(vis.events.FILE_SAVE_PRE, function(file) local M = require('plugins/vis-lint') M.logger = function(str, level) if level == M.log.ERROR then @@ -8,12 +8,11 @@ local function fmt_file(file) end end M.fixers["ansi_c"] = { "clang-format -fallback-style=none" } - M.fixers["cpp"] = { "clang-format -fallback-style=none" } M.fixers["bibtex"] = { "bibtidy" } - M.fixers["json"] = { "jq --tab" } + M.fixers["cpp"] = { "clang-format -fallback-style=none" } + M.fixers["json"] = { "jq --tab" } return M.fix(file) -end -vis.events.subscribe(vis.events.FILE_SAVE_PRE, fmt_file) +end) local function build_files(win) local build_tex = function (f) @@ -69,7 +68,7 @@ local function build_files(win) return true end - local lang = {} + local lang = {} lang["latex"] = build_tex lang["python"] = build_python @@ -91,6 +90,3 @@ local function build_files(win) end, "build file in current window") end vis.events.subscribe(vis.events.WIN_OPEN, build_files) -vis:command_register("build", function () - vis:feedkeys(" c") - end, "build file in current window") diff --git a/.config/vis/themes/term.lua b/.config/vis/themes/term.lua @@ -2,57 +2,57 @@ local lexers = vis.lexers local grey0 = '#555551' -lexers.STYLE_DEFAULT = '' -lexers.STYLE_NOTHING = '' -lexers.STYLE_ATTRIBUTE = 'bold' -lexers.STYLE_CLASS = 'bold' -lexers.STYLE_COMMENT = 'dim' -lexers.STYLE_CONSTANT = '' -lexers.STYLE_DEFINITION = '' -lexers.STYLE_ERROR = 'fore:red,underlined' -lexers.STYLE_FUNCTION = '' -lexers.STYLE_FUNCTION_BUILTIN = lexers.STYLE_FUNCTION -lexers.STYLE_FUNCTION_METHOD = lexers.STYLE_FUNCTION -lexers.STYLE_HEADING = 'bold' -lexers.STYLE_KEYWORD = 'bold' -lexers.STYLE_LABEL = 'bold' -lexers.STYLE_NUMBER = '' -lexers.STYLE_OPERATOR = 'fore:yellow' -lexers.STYLE_REGEX = '' -lexers.STYLE_STRING = '' -lexers.STYLE_PREPROCESSOR = 'bold' -lexers.STYLE_TAG = '' -lexers.STYLE_TYPE = 'bold' -lexers.STYLE_VARIABLE = '' -lexers.STYLE_WHITESPACE = '' -lexers.STYLE_EMBEDDED = '' -lexers.STYLE_IDENTIFIER = '' +lexers.STYLE_DEFAULT = '' +lexers.STYLE_NOTHING = '' +lexers.STYLE_ATTRIBUTE = 'bold' +lexers.STYLE_CLASS = 'bold' +lexers.STYLE_COMMENT = 'dim' +lexers.STYLE_CONSTANT = '' +lexers.STYLE_DEFINITION = '' +lexers.STYLE_ERROR = 'fore:red' +lexers.STYLE_FUNCTION = '' +lexers.STYLE_FUNCTION_BUILTIN = lexers.STYLE_FUNCTION +lexers.STYLE_FUNCTION_METHOD = lexers.STYLE_FUNCTION +lexers.STYLE_HEADING = 'bold' +lexers.STYLE_KEYWORD = 'bold' +lexers.STYLE_LABEL = 'bold' +lexers.STYLE_NUMBER = '' +lexers.STYLE_OPERATOR = 'fore:yellow' +lexers.STYLE_REGEX = '' +lexers.STYLE_STRING = '' +lexers.STYLE_PREPROCESSOR = 'bold' +lexers.STYLE_TAG = '' +lexers.STYLE_TYPE = 'bold' +lexers.STYLE_VARIABLE = '' +lexers.STYLE_WHITESPACE = '' +lexers.STYLE_EMBEDDED = '' +lexers.STYLE_IDENTIFIER = '' -lexers.STYLE_LINENUMBER = '' +lexers.STYLE_LINENUMBER = '' lexers.STYLE_LINENUMBER_CURSOR = 'bold' -lexers.STYLE_CURSOR = 'back:white,fore:black' -lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR -lexers.STYLE_CURSOR_LINE = 'underlined' -lexers.STYLE_COLOR_COLUMN = 'back:' .. grey0 -lexers.STYLE_SELECTION = 'bold,back:' .. grey0 -lexers.STYLE_STATUS = 'fore:black,back:white' -lexers.STYLE_STATUS_FOCUSED = lexers.STYLE_STATUS .. ',bold' -lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT -lexers.STYLE_INFO = 'bold' -lexers.STYLE_EOF = '' +lexers.STYLE_CURSOR = 'back:white,fore:black' +lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR +lexers.STYLE_CURSOR_LINE = 'underlined' +lexers.STYLE_COLOR_COLUMN = 'back:' .. grey0 +lexers.STYLE_SELECTION = 'bold,back:' .. grey0 +lexers.STYLE_STATUS = 'fore:black,back:white' +lexers.STYLE_STATUS_FOCUSED = lexers.STYLE_STATUS .. ',bold' +lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT +lexers.STYLE_INFO = 'bold' +lexers.STYLE_EOF = '' -- diff -lexers.STYLE_ADDITION = 'fore:green' -lexers.STYLE_CHANGE = 'fore:yellow' -lexers.STYLE_DELETION = 'fore:red' +lexers.STYLE_ADDITION = 'fore:green' +lexers.STYLE_CHANGE = 'fore:yellow' +lexers.STYLE_DELETION = 'fore:red' -- latex, tex, texinfo -lexers.STYLE_COMMAND = lexers.STYLE_KEYWORD -lexers.STYLE_COMMAND_SECTION = lexers.STYLE_CLASS -lexers.STYLE_ENVIRONMENT = lexers.STYLE_TYPE -lexers.STYLE_ENVIRONMENT_MATH = lexers.STYLE_NUMBER +lexers.STYLE_COMMAND = lexers.STYLE_KEYWORD +lexers.STYLE_COMMAND_SECTION = lexers.STYLE_CLASS +lexers.STYLE_ENVIRONMENT = lexers.STYLE_TYPE +lexers.STYLE_ENVIRONMENT_MATH = lexers.STYLE_NUMBER -- markdown and friends for i = 1,6 do lexers['STYLE_HEADING_H'..i] = 'fore:cyan,bold' end -lexers.STYLE_BOLD = 'bold' -lexers.STYLE_ITALIC = 'italics' +lexers.STYLE_BOLD = 'bold' +lexers.STYLE_ITALIC = 'italics' diff --git a/.config/vis/visrc.lua b/.config/vis/visrc.lua @@ -17,12 +17,11 @@ highlight.keywords = { local mww = 72 -- Min Window Width -- detect matlab with %.m not objective_c -vis.ftdetect.filetypes.matlab = {} -vis.ftdetect.filetypes.matlab.ext = { "%.m$" } +vis.ftdetect.filetypes.matlab = { ext = { "%.m$" } } assert(table.remove(vis.ftdetect.filetypes.objective_c.ext, 1) == "%.m$") -- use smaller tabs for heavily nested matlab classes and latex -vis.ftdetect.filetypes.latex.cmd = { "set tw 4" } +vis.ftdetect.filetypes.latex.cmd = { "set tw 4" } vis.ftdetect.filetypes.matlab.cmd = { "set tw 4" } vis.ftdetect.filetypes.haskell.cmd = { "set tw 4", "set expandtab true" }