LunarVim / Launch.nvim

🚀 Launch.nvim is modular starter for Neovim.
GNU General Public License v3.0
2k stars 474 forks source link

vim-illuminate plugin configure not work #142

Closed waynerv closed 1 year ago

waynerv commented 1 year ago

I tried to change delay and filetypes_denylist config, but seems nothing has changed.

Dont know how to upload a gif here, but pretty sure illuminate shows in 0.5s in my golang project.

example:

  illuminate.configure {
    providers = {
      "lsp",
      "treesitter",
      "regex",
    },
    delay = 2000,
    filetypes_denylist = {
      "dirvish",
      "fugitive",
      "alpha",
      "NvimTree",
      "packer",
      "neogitstatus",
      "Trouble",
      "lir",
      "Outline",
      "spectre_panel",
      "toggleterm",
      "DressingSelect",
      "TelescopePrompt",
      "go",
    },
    filetypes_allowlist = {},
    modes_denylist = {},
    modes_allowlist = {},
    providers_regex_syntax_denylist = {},
    providers_regex_syntax_allowlist = {},
    under_cursor = false,
  }
wadeduvall commented 1 year ago

Not clear what you are trying to do? Disable vim-illuminate for golang? If so, adding go to filetype_denylist works for me.

waynerv commented 1 year ago

this project is using deprecated configuration of vim-illuminate, so options in illuminate.configure() won't work properly, just remove lines outside configure() can fix it.

local M = {
  "RRethy/vim-illuminate",
  commit = "d6ca7f77eeaf61b3e6ce9f0e5a978d606df44298",
  event = { "BufReadPost", "BufNewFile" },
}

function M.config()
  require("illuminate").configure {
    delay = 300,
    under_cursor = true,
    large_file_cutoff = 5000,
    large_file_overrides = {
      -- disable treesitter in large file for performance
      providers = { "lsp" },
    },
  }

  -- use illuminate instead of underline
  vim.api.nvim_set_hl(0, "IlluminatedWordText", { link = "LspReferenceText" })
  vim.api.nvim_set_hl(0, "IlluminatedWordRead", { link = "LspReferenceText" })
  vim.api.nvim_set_hl(0, "IlluminatedWordWrite", { link = "LspReferenceText" })
end

return M