-- You can add your own plugins here or in other files in this directory! -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information return { -- Configure copilot { 'zbirenbaum/copilot.lua', cmd = 'Copilot', build = ':Copilot auth', event = 'InsertEnter', config = function() require('copilot').setup { suggestion = { enabled = false }, panel = { enabled = false }, filetypes = { markdown = true, help = true, }, } vim.api.nvim_create_autocmd('User', { pattern = 'BlinkCmpMenuOpen', callback = function() vim.b.copilot_suggestion_hidden = true end, }) vim.api.nvim_create_autocmd('User', { pattern = 'BlinkCmpMenuClose', callback = function() vim.b.copilot_suggestion_hidden = false end, }) end, }, { 'iamcco/markdown-preview.nvim', cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' }, ft = { 'markdown' }, build = function(plugin) if vim.fn.executable 'npx' then vim.cmd('!cd ' .. plugin.dir .. ' && cd app && npx --yes yarn install') else vim.cmd [[Lazy load markdown-preview.nvim]] vim.fn['mkdp#util#install']() end end, init = function() if vim.fn.executable 'npx' then vim.g.mkdp_filetypes = { 'markdown' } end end, keys = { { 'cp', ft = 'markdown', 'MarkdownPreviewToggle', desc = 'Markdown Preview', }, }, }, }