Add custom plugin markview
This commit is contained in:
parent
e49f56f834
commit
21336806ff
2
init.lua
2
init.lua
|
@ -737,7 +737,7 @@ require('lazy').setup({
|
||||||
--
|
--
|
||||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||||
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
|
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
|
||||||
-- { import = 'custom.plugins' },
|
{ import = 'custom.plugins' },
|
||||||
}, {
|
}, {
|
||||||
ui = {
|
ui = {
|
||||||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||||
|
|
|
@ -2,4 +2,35 @@
|
||||||
-- I promise not to create any merge conflicts in this directory :)
|
-- I promise not to create any merge conflicts in this directory :)
|
||||||
--
|
--
|
||||||
-- See the kickstart.nvim README for more information
|
-- See the kickstart.nvim README for more information
|
||||||
return {}
|
return {
|
||||||
|
{
|
||||||
|
'OXY2DEV/markview.nvim',
|
||||||
|
lazy = false, -- Recommended
|
||||||
|
-- ft = "markdown" -- If you decide to lazy-load anyway
|
||||||
|
|
||||||
|
dependencies = {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
'nvim-tree/nvim-web-devicons',
|
||||||
|
},
|
||||||
|
|
||||||
|
opts = {
|
||||||
|
initial_state = false,
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
require('markview').setup(opts)
|
||||||
|
|
||||||
|
local splitToggle_state = false
|
||||||
|
vim.keymap.set('n', '<C-ö>', function()
|
||||||
|
if not splitToggle_state then
|
||||||
|
-- The split toggle will not work unless markview is disabled in the initial window beforehand
|
||||||
|
vim.cmd 'Markview disableAll'
|
||||||
|
vim.cmd 'Markview splitEnable'
|
||||||
|
splitToggle_state = true
|
||||||
|
else
|
||||||
|
vim.cmd 'Markview splitDisable'
|
||||||
|
splitToggle_state = false
|
||||||
|
end
|
||||||
|
end, { silent = true, desc = 'Toggle Markview split view' })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue