Compare commits

...

2 Commits

3 changed files with 64 additions and 83 deletions

View File

@@ -1,45 +1,31 @@
# ----------------------------------------------------------------------------- # https://github.com/alacritty/alacritty-theme/blob/master/themes/nordic.toml
# Kanagawa Paper Ink
# Upstream: https://github.com/thesimonho/kanagawa-paper.nvim/master/extras/alacritty/kanagawa-paper-ink.toml # Colors (Nordic)
# URL: https://github.com/alacritty/alacritty
# -----------------------------------------------------------------------------
[colors.primary] [colors.primary]
background = '#1F1F28' background = '#242933'
foreground = '#DCD7BA' foreground = '#BBBDAF'
[colors.cursor]
cursor = '#c4b28a'
text = '#1F1F28'
[colors.selection]
background = '#363646'
foreground = '#9e9b93'
[colors.normal] [colors.normal]
black = '#393836' black = '#191C1D'
red = '#c4746e' red = '#BD6062'
green = '#699469' green = '#A3D6A9'
yellow = '#c4b28a' yellow = '#F0DFAF'
blue = '#435965' blue = '#8FB4D8'
magenta = '#a292a3' magenta = '#C7A9D9'
cyan = '#8ea49e' cyan = '#B6D7A8'
white = '#C8C093' white = '#BDC5BD'
[colors.bright] [colors.bright]
black = '#aca9a4' black = '#727C7C'
red = '#cc928e' red = '#D18FAF'
green = '#72a072' green = '#B7CEB0'
yellow = '#d4c196' yellow = '#BCBCBC'
blue = '#698a9b' blue = '#E0CF9F'
magenta = '#b4a7b5' magenta = '#C7A9D9'
cyan = '#96ada7' cyan = '#BBDA97'
white = '#d5cd9d' white = '#BDC5BD'
[[colors.indexed_colors]] [colors.selection]
index = 16 text = '#000000'
color = '#b6927b' background = '#F0DFAF'
[[colors.indexed_colors]]
index = 17
color = '#c4746e'

View File

@@ -1,45 +1,35 @@
# ----------------------------------------------------------------------------- # https://github.com/alacritty/alacritty-theme/blob/master/themes/night_owlish_light.toml
# Kanagawa Paper Canvas
# Upstream: https://github.com/thesimonho/kanagawa-paper.nvim/master/extras/alacritty/kanagawa-paper-canvas.toml # Colors (Night Owlish Light)
# URL: https://github.com/alacritty/alacritty
# -----------------------------------------------------------------------------
[colors.primary] [colors.primary]
background = '#e1e1de' background = '#ffffff'
foreground = '#595b62' foreground = '#403f53'
[colors.cursor]
cursor = '#618bb6'
text = '#e1e1de'
[colors.selection]
background = '#c4cbdc'
foreground = '#858479'
[colors.normal] [colors.normal]
black = '#4c4c65' black = '#011627'
red = '#b35560' red = '#d3423e'
green = '#57786c' green = '#2aa298'
yellow = '#a67337' yellow = '#daaa01'
blue = '#719ac2' blue = '#4876d6'
magenta = '#ac7085' magenta = '#403f53'
cyan = '#526c79' cyan = '#08916a'
white = '#858479' white = '#7a8181'
[colors.bright] [colors.bright]
black = '#5c5c75' black = '#7a8181'
red = '#c75f6b' red = '#f76e6e'
green = '#618679' green = '#49d0c5'
yellow = '#b67e3d' yellow = '#dac26b'
blue = '#86aed7' blue = '#5ca7e4'
magenta = '#b57e91' magenta = '#697098'
cyan = '#5d7a89' cyan = '#00c990'
white = '#919084' white = '#989fb1'
[[colors.indexed_colors]] [colors.cursor]
index = 16 cursor = '#403f53'
color = '#b8805e' text = '#fbfbfb'
[[colors.indexed_colors]] [colors.selection]
index = 17 background = '#f2f2f2'
color = '#b35560' text = '#403f53'

View File

@@ -12,12 +12,6 @@ end)()
plug = require('plugins/vis-plug') plug = require('plugins/vis-plug')
local plugins = { local plugins = {
{
'scaramacai/vis-themes',
theme = true,
file = 'almostnord',
-- file = 'strange-morning',
},
{ 'https://gitlab.com/muhq/vis-lspc', alias = 'lspc' }, { 'https://gitlab.com/muhq/vis-lspc', alias = 'lspc' },
{ 'lutobler/vis-commentary' }, { 'lutobler/vis-commentary' },
{ 'https://repo.or.cz/vis-surround.git' }, { 'https://repo.or.cz/vis-surround.git' },
@@ -70,7 +64,12 @@ local function escape_and_quoted(s)
return "'" .. s:gsub("'", "\\'") .. "'" return "'" .. s:gsub("'", "\\'") .. "'"
end end
local function search(cmd) local function search(cmd, action)
if action == nil then
action = function(out)
open_file_pos(out, 'e')
end
end
if cmd:match('^fzf ') and vis.register ~= '"' then if cmd:match('^fzf ') and vis.register ~= '"' then
local reg = string.gsub(vis.registers[vis.register][1], '%z', '') local reg = string.gsub(vis.registers[vis.register][1], '%z', '')
if reg ~= '' then if reg ~= '' then
@@ -79,7 +78,7 @@ local function search(cmd)
end end
local code, out, err = vis:pipe(cmd, true) local code, out, err = vis:pipe(cmd, true)
if code == 0 then if code == 0 then
open_file_pos(out, 'e') action(out)
elseif err ~= nil then elseif err ~= nil then
vis:info(err) vis:info(err)
elseif code ~= 0 then elseif code ~= 0 then
@@ -197,6 +196,12 @@ vis.events.subscribe(vis.events.INIT, function()
vis:map(vis.modes.NORMAL, 'gf', function() vis:map(vis.modes.NORMAL, 'gf', function()
open_file_current_line('o') open_file_current_line('o')
end, 'open file from current line (with line and col') end, 'open file from current line (with line and col')
vis:map(vis.modes.NORMAL, ' cd', function()
search('zoxide query -l | fzf', function(path)
vis:command('cd ' .. path)
end)
end, 'fzf change directory')
end) end)
vis.events.subscribe(vis.events.WIN_OPEN, function(win) vis.events.subscribe(vis.events.WIN_OPEN, function(win)