diff --git a/after/plugin/peek.lua b/after/plugin/peek.lua new file mode 100644 index 0000000..e3a2b96 --- /dev/null +++ b/after/plugin/peek.lua @@ -0,0 +1,26 @@ +-- 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, + + app = 'browser', -- 'webview', 'browser', string or a table of strings + -- explained below + + filetype = { 'markdown' }, -- list of filetypes to recognize as markdown + + -- 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 +}) + +vim.api.nvim_create_user_command('PeekOpen', require('peek').open, {}) +vim.api.nvim_create_user_command('PeekClose', require('peek').close, {}) diff --git a/lua/talksik/packer.lua b/lua/talksik/packer.lua index faceaa7..ca10cd6 100644 --- a/lua/talksik/packer.lua +++ b/lua/talksik/packer.lua @@ -96,5 +96,7 @@ return require('packer').startup(function(use) 'stevearc/dressing.nvim', -- optional for vim.ui.select }, } + + use { 'toppair/peek.nvim', run = 'deno task --quiet build:fast' } end) diff --git a/lua/talksik/set.lua b/lua/talksik/set.lua index f78dbd3..b124ade 100644 --- a/lua/talksik/set.lua +++ b/lua/talksik/set.lua @@ -9,7 +9,7 @@ vim.opt.expandtab = true vim.opt.smartindent = true -vim.opt.wrap = true +vim.opt.wrap = false vim.opt.swapfile = false vim.opt.backup = false diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua index c7d438f..8ad1638 100644 --- a/plugin/packer_compiled.lua +++ b/plugin/packer_compiled.lua @@ -220,6 +220,11 @@ _G.packer_plugins = { path = "/home/talksik/.local/share/nvim/site/pack/packer/start/packer.nvim", url = "https://github.com/wbthomason/packer.nvim" }, + ["peek.nvim"] = { + loaded = true, + path = "/home/talksik/.local/share/nvim/site/pack/packer/start/peek.nvim", + url = "https://github.com/toppair/peek.nvim" + }, playground = { loaded = true, path = "/home/talksik/.local/share/nvim/site/pack/packer/start/playground",