Nvim: restructure all plugins configuration

This commit is contained in:
Robert Kmieć
2022-12-06 01:19:27 +01:00
parent 2b5a09d902
commit ab7595214f
89 changed files with 1477 additions and 879 deletions

View File

@@ -0,0 +1,34 @@
-- default config:
require('peek').setup({
auto_load = true, -- whether to automatically load preview when
-- entering another markdown buffer
close_on_bdelete = true, -- close preview window on buffer delete
syntax = true, -- enable syntax highlighting, affects performance
theme = 'dark', -- 'dark' or 'light'
update_on_change = true,
-- relevant if update_on_change is true
throttle_at = 200000, -- start throttling when file exceeds this
-- amount of bytes in size
throttle_time = 'auto', -- minimum amount of time in milliseconds
-- that has to pass before starting new render
})
local peek = require('peek')
vim.api.nvim_create_user_command('PeekOpen', function()
if not peek.is_open() and vim.bo[vim.api.nvim_get_current_buf()].filetype == 'markdown' then
vim.fn.system('i3-msg split horizontal')
peek.open()
end
end, {})
vim.api.nvim_create_user_command('PeekClose', function()
if peek.is_open() then
peek.close()
vim.fn.system('i3-msg move left')
end
end, {})