44 lines
1002 B
Lua
44 lines
1002 B
Lua
return {
|
|
'OXY2DEV/markview.nvim',
|
|
lazy = false,
|
|
config = function()
|
|
require('markview').setup({
|
|
preview = {
|
|
filetypes = {
|
|
'md',
|
|
'markdown',
|
|
'norg',
|
|
'rmd',
|
|
'org',
|
|
'vimwiki',
|
|
'typst',
|
|
'latex',
|
|
'quarto',
|
|
'Avante',
|
|
'codecompanion',
|
|
},
|
|
ignore_buftypes = {},
|
|
|
|
condition = function(buffer)
|
|
local ft, bt = vim.bo[buffer].ft, vim.bo[buffer].bt;
|
|
|
|
if bt == 'nofile' and ft == 'Avante' then
|
|
return true;
|
|
elseif bt == 'nofile' then
|
|
return false;
|
|
else
|
|
return true;
|
|
end
|
|
end
|
|
}
|
|
})
|
|
vim.api.nvim_create_autocmd('User', {
|
|
pattern = 'MarkviewAttach',
|
|
callback = function(event)
|
|
vim.keymap.set('n', '<CR>', require('markview').commands.open,
|
|
{ buffer = event.buf, desc = 'Open Link', silent = false })
|
|
end
|
|
})
|
|
end
|
|
};
|