|
|
|
@@ -8,7 +8,7 @@ local fzfmru = require('plugins/vis-fzf-mru/fzf-mru')
|
|
|
|
require('plugins/vis-build')
|
|
|
|
require('plugins/vis-build')
|
|
|
|
require('plugins/vis-cursors')
|
|
|
|
require('plugins/vis-cursors')
|
|
|
|
require('plugins/vis-colorizer')
|
|
|
|
require('plugins/vis-colorizer')
|
|
|
|
require('plugins/vis-quickfix')
|
|
|
|
local qf = require('plugins/vis-quickfix')
|
|
|
|
require('plugins/vis-pairs')
|
|
|
|
require('plugins/vis-pairs')
|
|
|
|
|
|
|
|
|
|
|
|
require('plugins/vis-pin-files')
|
|
|
|
require('plugins/vis-pin-files')
|
|
|
|
@@ -158,25 +158,15 @@ local function add_global_mark()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
local last_theme = 'default'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local function set_current_theme()
|
|
|
|
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)
|
|
|
|
local f = io.open(path)
|
|
|
|
if f then
|
|
|
|
if f then
|
|
|
|
local s = f:read('*all')
|
|
|
|
|
|
|
|
f:close()
|
|
|
|
f:close()
|
|
|
|
local theme = s:match('light') and 'light' or 'dark'
|
|
|
|
theme = 'lupan-light'
|
|
|
|
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
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
vis:command('set theme ' .. theme)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
local ripgrep = 'rg --column --line-number --color=always --smart-case'
|
|
|
|
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, '<M-n>', '<vis-prompt-show>open<Enter>')
|
|
|
|
vis:map(vis.modes.NORMAL, ' K', close_prev_win)
|
|
|
|
vis:map(vis.modes.NORMAL, ' K', close_prev_win)
|
|
|
|
vis:map(vis.modes.NORMAL, ' J', close_next_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-prev-diagnostic<Enter>')
|
|
|
|
vis:map(vis.modes.NORMAL, ' ]', '<vis-prompt-show>lspc-next-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')
|
|
|
|
open_file_current_line('o')
|
|
|
|
end, 'open file from current line in new window (with optional line and col)')
|
|
|
|
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>')
|
|
|
|
open_file_current_line('e', '<vis-window-prev>')
|
|
|
|
end, 'open file from current line in above window (with optional line and col)')
|
|
|
|
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>')
|
|
|
|
open_file_current_line('e', '<vis-window-next>')
|
|
|
|
end, 'open file from current line in below window (with optional line and col)')
|
|
|
|
end, 'open file from current line in below window (with optional line and col)')
|
|
|
|
|
|
|
|
|
|
|
|
|