From 54e224ee7504ec34f1acc27e0fd6f1b8cbbaa0c8 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 18 Mar 2025 20:24:03 +0100 Subject: [PATCH] avante adjust for markview --- lua/plugins/markview.lua | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lua/plugins/markview.lua b/lua/plugins/markview.lua index 185fc5c..ce79419 100644 --- a/lua/plugins/markview.lua +++ b/lua/plugins/markview.lua @@ -2,6 +2,36 @@ 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)