Compare commits
2 commits
c67354ca58
...
8b3915eb77
Author | SHA1 | Date | |
---|---|---|---|
8b3915eb77 | |||
ccfb598a60 |
9 changed files with 116 additions and 2 deletions
|
@ -28,5 +28,5 @@ Probablemente incompleto.
|
|||
### Alpine
|
||||
|
||||
```sh
|
||||
apk add zsh zsh-vcs fzf kakoune
|
||||
apk add zsh zsh-vcs fzf vis
|
||||
```
|
||||
|
|
1
.config/vis/plugins/commentary
Submodule
1
.config/vis/plugins/commentary
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 26db90cca7b062446a6cf5bc9317baf62bdf9a9b
|
1
.config/vis/plugins/cursors
Submodule
1
.config/vis/plugins/cursors
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit c19a2ceb71607aea6c34491fa325a1de2da8dfaf
|
1
.config/vis/plugins/fzf-mru
Submodule
1
.config/vis/plugins/fzf-mru
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit aafc3d18af1edefc117baffd1e3d0f073b2d3bd2
|
1
.config/vis/plugins/fzf-open
Submodule
1
.config/vis/plugins/fzf-open
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit b1666a31e14338ff1bba0b39c729016048ca4b2d
|
49
.config/vis/themes/minimal-light.lua
Normal file
49
.config/vis/themes/minimal-light.lua
Normal file
|
@ -0,0 +1,49 @@
|
|||
-- 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 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:'..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 = '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 = ''
|
||||
|
49
.config/vis/visrc.lua
Normal file
49
.config/vis/visrc.lua
Normal file
|
@ -0,0 +1,49 @@
|
|||
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',
|
||||
}
|
||||
|
||||
vis.events.subscribe(vis.events.INIT, function()
|
||||
require 'themes/minimal-light'
|
||||
require 'plugins/commentary'
|
||||
|
||||
vis:map(vis.modes.NORMAL, ',f', ':fzf<Enter>')
|
||||
vis:map(vis.modes.NORMAL, ',b', ':fzfmru<Enter>')
|
||||
end)
|
||||
|
||||
vis.events.subscribe(vis.events.WIN_OPEN, function(win)
|
||||
vis:command('set relativenumber')
|
||||
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 fmt == nil 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)
|
||||
|
12
.gitmodules
vendored
12
.gitmodules
vendored
|
@ -37,3 +37,15 @@
|
|||
[submodule ".config/kak/plugins/kakoune-buffers"]
|
||||
path = .config/kak/plugins/kakoune-buffers
|
||||
url = https://github.com/Delapouite/kakoune-buffers
|
||||
[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
|
||||
|
|
2
.profile
2
.profile
|
@ -7,7 +7,7 @@ ulimit -c unlimited
|
|||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export PATH="$HOME/go/bin:$PATH"
|
||||
|
||||
export EDITOR=kak
|
||||
export EDITOR=vis
|
||||
|
||||
export FZF_DEFAULT_OPTS='--color=light'
|
||||
export FZF_DEFAULT_COMMAND='rg -L --hidden --files'
|
||||
|
|
Loading…
Reference in a new issue