summaryrefslogtreecommitdiff
path: root/lua/lvim/core/illuminate.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lvim/core/illuminate.lua')
-rw-r--r--lua/lvim/core/illuminate.lua94
1 files changed, 45 insertions, 49 deletions
diff --git a/lua/lvim/core/illuminate.lua b/lua/lvim/core/illuminate.lua
index f9b4e918..c1ba9a58 100644
--- a/lua/lvim/core/illuminate.lua
+++ b/lua/lvim/core/illuminate.lua
@@ -1,57 +1,53 @@
local M = {}
M.config = function()
- local config = {
- opts = {
- -- providers: provider used to get references in the buffer, ordered by priority
- providers = {
- "lsp",
- "treesitter",
- "regex",
- },
- -- delay: delay in milliseconds
- delay = 120,
- -- filetype_overrides: filetype specific overrides.
- -- The keys are strings to represent the filetype while the values are tables that
- -- supports the same keys passed to .configure except for filetypes_denylist and filetypes_allowlist
- filetype_overrides = {},
- -- filetypes_denylist: filetypes to not illuminate, this overrides filetypes_allowlist
- filetypes_denylist = {
- "dirvish",
- "fugitive",
- "alpha",
- "NvimTree",
- "lazy",
- "neogitstatus",
- "Trouble",
- "lir",
- "Outline",
- "spectre_panel",
- "toggleterm",
- "DressingSelect",
- "TelescopePrompt",
- },
- -- filetypes_allowlist: filetypes to illuminate, this is overridden by filetypes_denylist
- filetypes_allowlist = {},
- -- modes_denylist: modes to not illuminate, this overrides modes_allowlist
- modes_denylist = {},
- -- modes_allowlist: modes to illuminate, this is overridden by modes_denylist
- modes_allowlist = {},
- -- providers_regex_syntax_denylist: syntax to not illuminate, this overrides providers_regex_syntax_allowlist
- -- Only applies to the 'regex' provider
- -- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')
- providers_regex_syntax_denylist = {},
- -- providers_regex_syntax_allowlist: syntax to illuminate, this is overridden by providers_regex_syntax_denylist
- -- Only applies to the 'regex' provider
- -- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')
- providers_regex_syntax_allowlist = {},
- -- under_cursor: whether or not to illuminate under the cursor
- under_cursor = true,
+ lvim.builtin.illuminate.opts = {
+ -- providers: provider used to get references in the buffer, ordered by priority
+ providers = {
+ "lsp",
+ "treesitter",
+ "regex",
},
+ -- delay: delay in milliseconds
+ delay = 120,
+ -- filetype_overrides: filetype specific overrides.
+ -- The keys are strings to represent the filetype while the values are tables that
+ -- supports the same keys passed to .configure except for filetypes_denylist and filetypes_allowlist
+ filetype_overrides = {},
+ -- filetypes_denylist: filetypes to not illuminate, this overrides filetypes_allowlist
+ filetypes_denylist = {
+ "dirvish",
+ "fugitive",
+ "alpha",
+ "NvimTree",
+ "lazy",
+ "neogitstatus",
+ "Trouble",
+ "lir",
+ "Outline",
+ "spectre_panel",
+ "toggleterm",
+ "DressingSelect",
+ "TelescopePrompt",
+ },
+ -- filetypes_allowlist: filetypes to illuminate, this is overridden by filetypes_denylist
+ filetypes_allowlist = {},
+ -- modes_denylist: modes to not illuminate, this overrides modes_allowlist
+ modes_denylist = {},
+ -- modes_allowlist: modes to illuminate, this is overridden by modes_denylist
+ modes_allowlist = {},
+ -- providers_regex_syntax_denylist: syntax to not illuminate, this overrides providers_regex_syntax_allowlist
+ -- Only applies to the 'regex' provider
+ -- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')
+ providers_regex_syntax_denylist = {},
+ -- providers_regex_syntax_allowlist: syntax to illuminate, this is overridden by providers_regex_syntax_denylist
+ -- Only applies to the 'regex' provider
+ -- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')
+ providers_regex_syntax_allowlist = {},
+ -- under_cursor: whether or not to illuminate under the cursor
+ under_cursor = true,
}
- ---@cast config +LvimBuiltin
- require("lvim.core.builtins").extend_defaults(config)
- lvim.builtin.illuminate = config
+ lvim.builtin.illuminate = require("lvim.core.builtins").add_completion "illuminate"
end
M.setup = function()