illuminate.lua 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. local M = {}
  2. M.config = function()
  3. local status_ok, illuminate = pcall(require, "illuminate")
  4. if not status_ok then
  5. return
  6. end
  7. -- default configuration
  8. illuminate.configure {
  9. -- providers: provider used to get references in the buffer, ordered by priority
  10. providers = {
  11. "lsp",
  12. "treesitter",
  13. "regex",
  14. },
  15. -- delay: delay in milliseconds
  16. delay = 120,
  17. -- filetypes_denylist: filetypes to not illuminate, this overrides filetypes_allowlist
  18. filetypes_denylist = {
  19. "dirvish",
  20. "fugitive",
  21. "alpha",
  22. "NvimTree",
  23. "packer",
  24. "neogitstatus",
  25. "Trouble",
  26. "lir",
  27. "Outline",
  28. "spectre_panel",
  29. "toggleterm",
  30. "DressingSelect",
  31. "TelescopePrompt",
  32. },
  33. -- filetypes_allowlist: filetypes to illuminate, this is overriden by filetypes_denylist
  34. filetypes_allowlist = {},
  35. -- modes_denylist: modes to not illuminate, this overrides modes_allowlist
  36. modes_denylist = {},
  37. -- modes_allowlist: modes to illuminate, this is overriden by modes_denylist
  38. modes_allowlist = {},
  39. -- providers_regex_syntax_denylist: syntax to not illuminate, this overrides providers_regex_syntax_allowlist
  40. -- Only applies to the 'regex' provider
  41. -- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')
  42. providers_regex_syntax_denylist = {},
  43. -- providers_regex_syntax_allowlist: syntax to illuminate, this is overriden by providers_regex_syntax_denylist
  44. -- Only applies to the 'regex' provider
  45. -- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')
  46. providers_regex_syntax_allowlist = {},
  47. -- under_cursor: whether or not to illuminate under the cursor
  48. under_cursor = true,
  49. }
  50. end
  51. return M