RRethy / vim-illuminate

illuminate.vim - (Neo)Vim plugin for automatically highlighting other uses of the word under the cursor using either LSP, Tree-sitter, or regex matching.
2.16k stars 47 forks source link

Blacklisting other languages than VimScript #43

Closed sefechit closed 4 years ago

sefechit commented 4 years ago

Hello, I saw your example of how to blacklist a language highlighting, this one:

let g:Illuminate_ftHighlightGroups = {
      \ 'vim:blacklist': ['vimVar', 'vimString', 'vimLineComment',
      \         'vimFuncName', 'vimFunction', 'vimUserFunc', 'vimFunc']
      \ }

So I tried to implement that on other language (JS, in my case), and I didn't work to my regret. Tried this:

let g:Illuminate_ftHighlightGroups = {
      \ 'vim:blacklist': ['vimVar', 'vimString', 'vimLineComment',
      \         'vimFuncName', 'vimFunction', 'vimUserFunc', 'vimFunc']
      \ 'js:blacklist': ['jsString', 'jsLineComment']
      \ }

Is there a reason behind the failure?

Thank you very much in advance man!

RRethy commented 4 years ago

js is not a filetype, look at the output of :set ft? when you have a javascript file open.

sefechit commented 4 years ago

Changed it 'javascript:blacklist', still doesn't work though :(

RRethy commented 4 years ago

['jsString', 'jsLineComment'] those also don't look like real highlight groups, use :echo synIDattr(synID(line("."), col("."), 1), "name") to determine highlight groups.

sefechit commented 4 years ago

Yes, that's what was missing Thanks man!