Added peek to preview markdown files
This commit is contained in:
parent
04fdd708b2
commit
8317381ebc
|
@ -33,6 +33,7 @@
|
|||
"nvim-treesitter-context": { "branch": "master", "commit": "38203f5e6c62617b3c07662dc71ce3047ecd90d3" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "b55fe6175f0001347a433c9df358c8cbf8a4e90f" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "25698e4033cd6cd3745454bfc837dd670eba0480" },
|
||||
"peek.nvim": { "branch": "master", "commit": "67752e7581f88da6899838985a05705b008e4185" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" },
|
||||
"symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" },
|
||||
|
|
34
nvim/.config/nvim/lua/plugins/peek.lua
Normal file
34
nvim/.config/nvim/lua/plugins/peek.lua
Normal file
|
@ -0,0 +1,34 @@
|
|||
-- https://github.com/toppair/peek.nvim
|
||||
return {
|
||||
'toppair/peek.nvim',
|
||||
build = 'deno task --quiet build:fast',
|
||||
cond = function()
|
||||
return vim.fn.executable 'deno' == 1
|
||||
end,
|
||||
lazy = true,
|
||||
cmds = { "PeekOpen", "PeekClose" },
|
||||
init = function()
|
||||
vim.api.nvim_create_user_command('PeekOpen', function() require('peek').open() end, {})
|
||||
vim.api.nvim_create_user_command('PeekClose', function() require('peek').close() end, {})
|
||||
|
||||
local augroup = vim.api.nvim_create_augroup('Peek', { clear = true })
|
||||
|
||||
-- Automatically open a markdown preview window
|
||||
vim.api.nvim_create_autocmd({ "FileType"}, {
|
||||
callback = function()
|
||||
require('peek').open()
|
||||
end,
|
||||
group = augroup,
|
||||
pattern = "markdown",
|
||||
})
|
||||
end,
|
||||
opts = {},
|
||||
-- config = function()
|
||||
-- local peek = require('peek');
|
||||
--
|
||||
--
|
||||
-- peek.setup {
|
||||
--
|
||||
-- }
|
||||
-- end
|
||||
}
|
Loading…
Reference in New Issue
Block a user