neoclide / coc-lists

Common lists for coc.nvim
264 stars 24 forks source link

Syntax highlighting doesn't work in list preview window with treesitter #120

Closed ravisumit33 closed 3 years ago

ravisumit33 commented 3 years ago

When opening list preview, filetype is not set due to which syntax highlighting (I am using nvim-treesitter) doesn't work. Other syntax plugins like vim-polyglot works. If I manually set filetype of list preview window syntax highlighting with treesitter works very well.

I think there is a need to set filetype when opening list preview window.

chemzqm commented 3 years ago

It's intended to highlight range of preview window (instead of set filetype) for performance reason, you can hack this function https://github.com/neoclide/coc.nvim/blob/master/autoload/coc/list.vim#L220