Skip to content

How do I disable mini.pairs for markdown files? (My autocmd isn't working) #805

Closed Answered by echasnovski
samgarmany asked this question in Q&A
Discussion options

You must be logged in to vote

Having LSP show a warning has nothing to do with why it is not working. Replace mini_pairs_disable with minipairs_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:

vim.api.nvim_create_autocmd('FileType', {
  pattern = { 'gitcommit', 'markdown' },
  callback = function(event) vim.keymap.set('i', '`', '`', { buffer = event.buf }) end,
})

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@samgarmany
Comment options

@echasnovski
Comment options

@samgarmany
Comment options

Answer selected by echasnovski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants