sheerun / vim-polyglot

A solid language pack for Vim.
5.6k stars 296 forks source link

How to disable syntax highlighting for specific language if using nvim #809

Open beyond9thousand opened 2 years ago

beyond9thousand commented 2 years ago

How can I make this work with nvim?

image

cpmsmith commented 2 years ago

You can check whether you're in Neovim in your .vimrc using has('nvim'), and change the behaviour based on that.

XeroOl commented 1 year ago

In NeoVim, if you are configuring in Lua instead of VimScript, the equivalent code would be

vim.g.polyglot_disabled = {'markdown'}

or

vim.g.polyglot_disabled = {'markdown.plugin'}

respectively.