1 -- (Neo)Vim plugin for automatically highlighting other uses of the word under
2 -- the cursor using either LSP, Tree-sitter, or regex matching.
3 -- https://github.com/RRethy/vim-illuminate
8 require("illuminate").configure({
9 -- providers: provider used to get references in the buffer, ordered by priority
15 -- delay: delay in milliseconds
17 -- filetype_overrides: filetype specific overrides.
18 -- The keys are strings to represent the filetype while the values are tables that
19 -- supports the same keys passed to .configure except for filetypes_denylist and filetypes_allowlist
20 filetype_overrides = {},
21 -- filetypes_denylist: filetypes to not illuminate, this overrides filetypes_allowlist
22 filetypes_denylist = {
32 -- filetypes_allowlist: filetypes to illuminate, this is overridden by filetypes_denylist
33 -- You must set filetypes_denylist = {} to override the defaults to allow filetypes_allowlist to take effect
34 filetypes_allowlist = {},
35 -- modes_denylist: modes to not illuminate, this overrides modes_allowlist
36 -- See `:help mode()` for possible values
38 -- modes_allowlist: modes to illuminate, this is overridden by modes_denylist
39 -- See `:help mode()` for possible values
41 -- providers_regex_syntax_denylist: syntax to not illuminate, this overrides providers_regex_syntax_allowlist
42 -- Only applies to the 'regex' provider
43 -- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')
44 providers_regex_syntax_denylist = {},
45 -- providers_regex_syntax_allowlist: syntax to illuminate, this is overridden by providers_regex_syntax_denylist
46 -- Only applies to the 'regex' provider
47 -- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')
48 providers_regex_syntax_allowlist = {},
49 -- under_cursor: whether or not to illuminate under the cursor
51 -- large_file_cutoff: number of lines at which to use large_file_config
52 -- The `under_cursor` option is disabled when this cutoff is hit
53 large_file_cutoff = 10000,
54 -- large_file_config: config to use for large files (based on large_file_cutoff).
55 -- Supports the same keys passed to .configure
56 -- If nil, vim-illuminate will be disabled for large files.
57 large_file_overrides = nil,
58 -- min_count_to_highlight: minimum number of matches required to perform highlighting
59 min_count_to_highlight = 1,
60 -- should_enable: a callback that overrides all other settings to
61 -- enable/disable illumination. This will be called a lot so don't do
62 -- anything expensive in it.
63 should_enable = function(bufnr)
66 -- case_insensitive_regex: sets regex case sensitivity
67 case_insensitive_regex = false,
68 -- disable_keymaps: disable default keymaps
69 disable_keymaps = false,