How do I disable mini.pairs for markdown files? (My autocmd isn't working) #805
-
I want to disable mini.pairs for markdown files because it gets in the way of writing code blocks with triple ` . I wrote this: vim.api.nvim_create_autocmd("FileType", {
pattern = { "gitcommit", "markdown" },
callback = function()
vim.b.mini_pairs_disable = true
end,
}) But it gives the warning How do I fix this? Would it be easier to just unmap ` in that buffer because I like using everything else about the plugin? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Having LSP show a warning has nothing to do with why it is not working. Replace If you want to only disable vim.api.nvim_create_autocmd('FileType', {
pattern = { 'gitcommit', 'markdown' },
callback = function(event) vim.keymap.set('i', '`', '`', { buffer = event.buf }) end,
}) |
Beta Was this translation helpful? Give feedback.
Having LSP show a warning has nothing to do with why it is not working. Replace
mini_pairs_disable
withminipairs_disable
and it should work.If you want to only disable
`
in those filetypes, override its buffer-local mapping so that it works as default. So with something like this: