vim-markdown icon indicating copy to clipboard operation
vim-markdown copied to clipboard

can't reassign names to fenced languages

Open michael-odonovan opened this issue 4 years ago • 1 comments

Hi, thanks for this plugin, it's great.

However I'm just having trouble assigning 'jsx=javascript' in the markdown_fenced_languages setting. Here is what I have in my init.vim:

Plug 'godlygeek/tabular' Plug 'plasticboy/vim-markdown' ... " Syntax highlighting in code blocks let g:markdown_fenced_languages = ['html', 'python', 'bash=sh', 'css', 'javascript', 'js=javascript', 'json=javascript', 'sass', 'xml', 'jsx=javascript.jsx',]

The highlighting works if I surround them with javascript but not the reassigned jsx or js

michael-odonovan avatar Oct 25 '21 09:10 michael-odonovan

I had this exact same issue though it was due to a specific set of circumstances. I am running Neovim with the Markdown Treesitter grammar. However, I realized that treesitter's markdown highlighting overrode vim-markdown's highlighting. I disabled it with the following:

require("nvim-treesitter.configs").setup({
    highlight = {
        enable = true,
        disable = { "markdown" },
        additional_vim_regex_highlighting = { "markdown" },
    }
})

If someone knows how to make treesitter's highlight change for markdown or have vim-markdown override, please do tell me. I would appreciate it a lot

kvietcong avatar May 19 '22 00:05 kvietcong