]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/nvim/lua/plugins/illuminate.lua
neovim: configure, using ghostty and tmux
[julm/julm-nix.git] / home-manager / profiles / nvim / lua / plugins / illuminate.lua
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
4 return {
5 "vim-illuminate",
6 lazy = false,
7 after = function()
8 require("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 = 100,
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 = {
23 "NvimTree",
24 "TelescopePrompt",
25 "dirbuf",
26 "dirvish",
27 "fugitive",
28 "help",
29 "neo-tree",
30 "notify",
31 },
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
37 modes_denylist = {},
38 -- modes_allowlist: modes to illuminate, this is overridden by modes_denylist
39 -- See `:help mode()` for possible values
40 modes_allowlist = {},
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
50 under_cursor = true,
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)
64 return true
65 end,
66 -- case_insensitive_regex: sets regex case sensitivity
67 case_insensitive_regex = false,
68 -- disable_keymaps: disable default keymaps
69 disable_keymaps = false,
70 })
71 end,
72 }