From ae6d51e3bae8877e5924f2e8ba784450417ba7aa Mon Sep 17 00:00:00 2001 From: Nulo Date: Mon, 23 Jan 2023 21:18:57 -0300 Subject: [PATCH] borrar config de vis --- .config/vis/plugins/commentary | 1 - .config/vis/plugins/cursors | 1 - .config/vis/plugins/fzf-mru | 1 - .config/vis/plugins/fzf-open | 1 - .config/vis/themes/minimal-light.lua | 50 ------------- .../vis/themes/rose-pine-dawn-colorless.lua | 52 -------------- .../vis/themes/rose-pine-moon-colorless.lua | 51 ------------- .config/vis/visrc.lua | 72 ------------------- .gitmodules | 12 ---- 9 files changed, 241 deletions(-) delete mode 160000 .config/vis/plugins/commentary delete mode 160000 .config/vis/plugins/cursors delete mode 160000 .config/vis/plugins/fzf-mru delete mode 160000 .config/vis/plugins/fzf-open delete mode 100644 .config/vis/themes/minimal-light.lua delete mode 100644 .config/vis/themes/rose-pine-dawn-colorless.lua delete mode 100644 .config/vis/themes/rose-pine-moon-colorless.lua delete mode 100644 .config/vis/visrc.lua diff --git a/.config/vis/plugins/commentary b/.config/vis/plugins/commentary deleted file mode 160000 index 26db90c..0000000 --- a/.config/vis/plugins/commentary +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 26db90cca7b062446a6cf5bc9317baf62bdf9a9b diff --git a/.config/vis/plugins/cursors b/.config/vis/plugins/cursors deleted file mode 160000 index c19a2ce..0000000 --- a/.config/vis/plugins/cursors +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c19a2ceb71607aea6c34491fa325a1de2da8dfaf diff --git a/.config/vis/plugins/fzf-mru b/.config/vis/plugins/fzf-mru deleted file mode 160000 index aafc3d1..0000000 --- a/.config/vis/plugins/fzf-mru +++ /dev/null @@ -1 +0,0 @@ -Subproject commit aafc3d18af1edefc117baffd1e3d0f073b2d3bd2 diff --git a/.config/vis/plugins/fzf-open b/.config/vis/plugins/fzf-open deleted file mode 160000 index b1666a3..0000000 --- a/.config/vis/plugins/fzf-open +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b1666a31e14338ff1bba0b39c729016048ca4b2d diff --git a/.config/vis/themes/minimal-light.lua b/.config/vis/themes/minimal-light.lua deleted file mode 100644 index c6936f3..0000000 --- a/.config/vis/themes/minimal-light.lua +++ /dev/null @@ -1,50 +0,0 @@ --- vis-minimal-theme (https://github.com/erf/vis-minimal-theme) --- light by Erlend Lind Madsen --- Modified by Nulo - -local black0 = '#000000' -local black1 = '#383838' -local black2 = '#686868' - -local white0 = '#ffffff' -local white05 = '#e8e8e8' -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:'..black2 -lexers.STYLE_LABEL = 'fore:'..black0 -lexers.STYLE_NUMBER = 'fore:'..black1 -lexers.STYLE_OPERATOR = 'fore:'..black0 -lexers.STYLE_REGEX = 'fore:'..black1 -lexers.STYLE_STRING = 'fore:'..black1 -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:'..white05 -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 = 'back:'..white0..',fore:'..black2 -lexers.STYLE_STATUS_FOCUSED = 'back:'..white1..',fore:'..black1 -lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT -lexers.STYLE_INFO = 'fore:default,back:default' -lexers.STYLE_EOF = '' - diff --git a/.config/vis/themes/rose-pine-dawn-colorless.lua b/.config/vis/themes/rose-pine-dawn-colorless.lua deleted file mode 100644 index 5b8ba17..0000000 --- a/.config/vis/themes/rose-pine-dawn-colorless.lua +++ /dev/null @@ -1,52 +0,0 @@ --- vis-minimal-theme (https://github.com/erf/vis-minimal-theme) --- light by Erlend Lind Madsen --- Modified by Nulo - -local text = '#575279' -local subtle = '#797593' -local muted = '#9893a5' - -local base = '#faf4ed' -local surface = '#fffaf3' -local overlay = '#f2e9e1' - -local highlight_med = '#dfdad9' -local highlight_high = '#cecacd' - -local lexers = vis.lexers - -lexers.STYLE_DEFAULT ='back:'..base..',fore:'..text -lexers.STYLE_NOTHING = 'back:'..base -lexers.STYLE_CLASS = 'fore:'..text -lexers.STYLE_COMMENT = 'fore:'..muted -lexers.STYLE_CONSTANT = 'fore:'..text -lexers.STYLE_DEFINITION = 'fore:'..text -lexers.STYLE_ERROR = 'fore:'..text -lexers.STYLE_FUNCTION = 'fore:'..text -lexers.STYLE_KEYWORD = 'fore:'..muted -lexers.STYLE_LABEL = 'fore:'..text -lexers.STYLE_NUMBER = 'fore:'..subtle -lexers.STYLE_OPERATOR = 'fore:'..text -lexers.STYLE_REGEX = 'fore:'..subtle -lexers.STYLE_STRING = 'fore:'..subtle -lexers.STYLE_PREPROCESSOR = 'fore:'..text -lexers.STYLE_TAG = 'fore:'..text -lexers.STYLE_TYPE = 'fore:'..text -lexers.STYLE_VARIABLE = 'fore:'..text -lexers.STYLE_WHITESPACE = '' -lexers.STYLE_EMBEDDED = 'back:'..overlay -lexers.STYLE_IDENTIFIER = 'fore:'..text - -lexers.STYLE_LINENUMBER = 'fore:'..subtle -lexers.STYLE_LINENUMBER_CURSOR = lexers.STYLE_LINENUMBER -lexers.STYLE_CURSOR = 'back:'..highlight_high -lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',fore:'..subtle -lexers.STYLE_CURSOR_LINE = 'underlined' -lexers.STYLE_COLOR_COLUMN = 'back:'..highlight_med -lexers.STYLE_SELECTION = 'back:'..highlight_med -lexers.STYLE_STATUS = 'back:'..base..',fore:'..muted -lexers.STYLE_STATUS_FOCUSED = 'back:'..overlay..',fore:'..text -lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT -lexers.STYLE_INFO = 'fore:default,back:default' -lexers.STYLE_EOF = '' - diff --git a/.config/vis/themes/rose-pine-moon-colorless.lua b/.config/vis/themes/rose-pine-moon-colorless.lua deleted file mode 100644 index f8f82a8..0000000 --- a/.config/vis/themes/rose-pine-moon-colorless.lua +++ /dev/null @@ -1,51 +0,0 @@ --- vis-minimal-theme (https://github.com/erf/vis-minimal-theme) --- light by Erlend Lind Madsen --- Modified by Nulo - -local text = '#e0def4' -local subtle = '#908caa' -local muted = '#6e6a86' - -local base = '#232136' -local surface = '#2a273f' -local overlay = '#393552' - -local highlight_med = '#44415a' - -local lexers = vis.lexers - -lexers.STYLE_DEFAULT ='back:'..base..',fore:'..text -lexers.STYLE_NOTHING = 'back:'..base -lexers.STYLE_CLASS = 'fore:'..text -lexers.STYLE_COMMENT = 'fore:'..muted -lexers.STYLE_CONSTANT = 'fore:'..text -lexers.STYLE_DEFINITION = 'fore:'..text -lexers.STYLE_ERROR = 'fore:'..text -lexers.STYLE_FUNCTION = 'fore:'..text -lexers.STYLE_KEYWORD = 'fore:'..muted -lexers.STYLE_LABEL = 'fore:'..text -lexers.STYLE_NUMBER = 'fore:'..subtle -lexers.STYLE_OPERATOR = 'fore:'..text -lexers.STYLE_REGEX = 'fore:'..subtle -lexers.STYLE_STRING = 'fore:'..subtle -lexers.STYLE_PREPROCESSOR = 'fore:'..text -lexers.STYLE_TAG = 'fore:'..text -lexers.STYLE_TYPE = 'fore:'..text -lexers.STYLE_VARIABLE = 'fore:'..text -lexers.STYLE_WHITESPACE = '' -lexers.STYLE_EMBEDDED = 'back:'..overlay -lexers.STYLE_IDENTIFIER = 'fore:'..text - -lexers.STYLE_LINENUMBER = 'fore:'..subtle -lexers.STYLE_LINENUMBER_CURSOR = lexers.STYLE_LINENUMBER -lexers.STYLE_CURSOR = 'back:'..muted -lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',fore:'..subtle -lexers.STYLE_CURSOR_LINE = 'underlined' -lexers.STYLE_COLOR_COLUMN = 'back:'..highlight_med -lexers.STYLE_SELECTION = 'back:'..highlight_med -lexers.STYLE_STATUS = 'back:'..base..',fore:'..muted -lexers.STYLE_STATUS_FOCUSED = 'back:'..overlay..',fore:'..text -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 deleted file mode 100644 index 35b886b..0000000 --- a/.config/vis/visrc.lua +++ /dev/null @@ -1,72 +0,0 @@ -require 'vis' - -plugins = { - -- Open files in directory - ["fzf-open"] = require 'plugins/fzf-open', - -- Search recently opened files - ["fzf-mru"] = require 'plugins/fzf-mru/fzf-mru', - -- Saves cursor position - ["cursors"] = require 'plugins/cursors', -} - -local disable_formating = false -vis.events.subscribe(vis.events.INIT, function() - dofile(os.getenv('HOME')..'/.cache/themer.lua/vis.lua') - require 'plugins/commentary' - - vis:map(vis.modes.NORMAL, ',f', ':fzf') - vis:map(vis.modes.NORMAL, ',b', ':fzfmru') - vis:map(vis.modes.NORMAL, ',w', ':w') - vis:map(vis.modes.NORMAL, ',q', ':q') - vis:map(vis.modes.NORMAL, ',Q', ':q!') - vis:map(vis.modes.NORMAL, ',,', ':') - vis:command_register('W', function(argv) - disable_formating = true - vis:command('w') - disable_formating = false - return true - end, "Write file without formatting") -end) - -vis.events.subscribe(vis.events.WIN_OPEN, function(win) - vis:command('set relativenumber') - vis:command('set show-tabs on') -end) - -local function format(file, path) - local win = vis.win - local fmt = nil - if - win.syntax == "javascript" - or win.syntax == "typescript" - or win.syntax == "json" - or win.syntax == "css" - then - fmt = "prettier --stdin-filepath "..file.path - end - - if - win.syntax == "go" - then - fmt = "goimports" - end - - if fmt == nil or disable_formating then - return true - end - - local pos = win.selection.pos - local status, out, err = vis:pipe(file, { start = 0, finish = file.size }, fmt) - if status ~= 0 or not out then - if err then vis:info(err) end - return false - end - - file:delete(0, file.size) - file:insert(0, out) - win.selection.pos = pos - return true -end - -vis.events.subscribe(vis.events.FILE_SAVE_PRE, format) - diff --git a/.gitmodules b/.gitmodules index f4ef1a6..877ea10 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,3 @@ -[submodule ".config/vis/plugins/cursors"] - path = .config/vis/plugins/cursors - url = https://github.com/erf/vis-cursors -[submodule ".config/vis/plugins/commentary"] - path = .config/vis/plugins/commentary - url = https://github.com/lutobler/vis-commentary -[submodule ".config/vis/plugins/fzf-open"] - path = .config/vis/plugins/fzf-open - url = https://git.sr.ht/~mcepl/vis-fzf-open -[submodule ".config/vis/plugins/fzf-mru"] - path = .config/vis/plugins/fzf-mru - url = https://github.com/peaceant/vis-fzf-mru [submodule ".config/themer.lua"] path = .config/themer.lua url = https://gitea.nulo.in/Nulo/themer.lua