Compare commits

...

2 Commits

2 changed files with 11 additions and 17 deletions

View File

@@ -13,6 +13,8 @@ export LANG=pl_PL.UTF-8
export EDITOR=vis
export VISUAL=vis
export CDPATH="$HOME:$HOME/src:$HOME/cloned:$HOME/dotfiles/vis/.config/vis/plugins"
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists

View File

@@ -8,7 +8,7 @@ local fzfmru = require('plugins/vis-fzf-mru/fzf-mru')
require('plugins/vis-build')
require('plugins/vis-cursors')
require('plugins/vis-colorizer')
require('plugins/vis-quickfix')
local qf = require('plugins/vis-quickfix')
require('plugins/vis-pairs')
require('plugins/vis-pin-files')
@@ -158,25 +158,15 @@ local function add_global_mark()
end
end
local last_theme = 'default'
local function set_current_theme()
local path = os.getenv('HOME') .. '/.config/xsettingsd/xsettingsd.conf'
local path = os.getenv('HOME') .. '/.lightmode'
local theme = 'lupan-dark'
local f = io.open(path)
if f then
local s = f:read('*all')
f:close()
local theme = s:match('light') and 'light' or 'dark'
if theme == last_theme then
return
end
last_theme = theme
if theme == 'light' then
vis:command('set theme lupan-light')
else
vis:command('set theme lupan-dark')
end
theme = 'lupan-light'
end
vis:command('set theme ' .. theme)
end
local ripgrep = 'rg --column --line-number --color=always --smart-case'
@@ -247,6 +237,8 @@ vis.events.subscribe(vis.events.INIT, function()
vis:map(vis.modes.NORMAL, '<M-n>', '<vis-prompt-show>open<Enter>')
vis:map(vis.modes.NORMAL, ' K', close_prev_win)
vis:map(vis.modes.NORMAL, ' J', close_next_win)
vis:map(vis.modes.NORMAL, ' k', qf.action.cp)
vis:map(vis.modes.NORMAL, ' j', qf.action.cn)
vis:map(vis.modes.NORMAL, ' [', '<vis-prompt-show>lspc-prev-diagnostic<Enter>')
vis:map(vis.modes.NORMAL, ' ]', '<vis-prompt-show>lspc-next-diagnostic<Enter>')
@@ -298,11 +290,11 @@ vis.events.subscribe(vis.events.INIT, function()
open_file_current_line('o')
end, 'open file from current line in new window (with optional line and col)')
vis:map(vis.modes.NORMAL, ' k', function()
vis:map(vis.modes.NORMAL, ' zk', function()
open_file_current_line('e', '<vis-window-prev>')
end, 'open file from current line in above window (with optional line and col)')
vis:map(vis.modes.NORMAL, ' j', function()
vis:map(vis.modes.NORMAL, ' zj', function()
open_file_current_line('e', '<vis-window-next>')
end, 'open file from current line in below window (with optional line and col)')