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.19k stars 50 forks source link

Filetypes Denylist is not working #118

Closed fragov closed 2 years ago

fragov commented 2 years ago

I try to disable illuminate in NvimTree. Here is my setup:

use({
  "RRethy/vim-illuminate",
  config = function()
    require("illuminate").configure({
      filetypes_denylist = {
        "NvimTree",
      },
    })
  end,
})

I thought it should disable illuminate in NvimTree, but illuminate is still working. Am I doing something wrong?

RRethy commented 2 years ago

What's the output of nvim -v, that config is working on my machine. Make sure you're using the right filetype, :set ft?.

fragov commented 2 years ago
nvim -v
NVIM v0.8.0-dev+500-gf3c8f3e5d
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by maksymshevchenko@Maksyms-MBP.lan

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/HEAD-f3c8f3e/share/nvim"

Run :checkhealth for more info
:set ft?
filetype=NvimTree
fragov commented 2 years ago

Ok, it looks like config = callback is not working for nvim-illuminate. I just moved part with require('illuminate').configure to my lsp config and now all works.