Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

Commit 1e8ba28

Browse files
author
connorgmeean
committed
refact(modules,illuminate)!: Change plugin to mini cursorword.
1 parent e6f4486 commit 1e8ba28

File tree

3 files changed

+13
-18
lines changed

3 files changed

+13
-18
lines changed

lua/colors/doom-one/config/init.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ local configuration = {
2424
startify = true,
2525
whichkey = true,
2626
indent_blankline = true,
27-
vim_illuminate = true,
2827
lspsaga = false,
2928
},
3029
}

lua/doom/modules/features/illuminate/init.lua

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
local illuminate = {}
22

33
illuminate.settings = {
4+
cursorword_config = {
5+
delay = 100,
6+
},
47
blacklist = {
58
"help",
69
"dashboard",
@@ -14,16 +17,21 @@ illuminate.settings = {
1417
}
1518

1619
illuminate.packages = {
17-
["vim-illuminate"] = {
18-
"RRethy/vim-illuminate",
19-
commit = "0603e75fc4ecde1ee5a1b2fc8106ed6704f34d14",
20+
["mini.cursorword"] = {
21+
"echasnovski/mini.cursorword",
22+
commit = "21af5679b39cf1a6bc6bf4eeaabc35e1b5ee7110",
2023
event = "VeryLazy",
2124
},
2225
}
2326

2427
illuminate.configs = {}
25-
illuminate.configs["vim-illuminate"] = function()
26-
vim.g.Illuminate_ftblacklist = doom.features.illuminate.settings.blacklist
28+
illuminate.configs["mini.cursorword"] = function()
29+
_G.cursorword_blocklist = function()
30+
local filetype = vim.api.nvim_buf_get_option(0, "filetype")
31+
local blacklist = doom.features.illuminate.settings.blacklist
32+
vim.b.minicursorword_disable = vim.tbl_contains(blacklist, filetype)
33+
end
34+
require("mini.cursorword").setup(doom.features.illuminate.cursorword_config)
2735
end
2836

2937
return illuminate

lua/doom/modules/langs/utils.lua

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,6 @@ module.use_lsp_mason = function(lsp_name, options)
215215

216216
-- Combine default on_attach with provided on_attach
217217
local on_attach_functions = {}
218-
if utils.is_module_enabled("features", "illuminate") then
219-
table.insert(on_attach_functions, utils.illuminate_attach)
220-
end
221218
if user_config and user_config.on_attach then
222219
table.insert(on_attach_functions, user_config.on_attach)
223220
end
@@ -285,15 +282,6 @@ end
285282
-- end
286283
-- end
287284

288-
--- Helper to attach illuminate on LSP
289-
module.illuminate_attach = function(client)
290-
require("illuminate").on_attach(client)
291-
-- Set underline highlighting for Lsp references
292-
vim.cmd("hi! LspReferenceText cterm=underline gui=underline")
293-
vim.cmd("hi! LspReferenceWrite cterm=underline gui=underline")
294-
vim.cmd("hi! LspReferenceRead cterm=underline gui=underline")
295-
end
296-
297285
--- Get LSP capabilities for DOOM
298286
module.get_capabilities = function()
299287
local capabilities = vim.lsp.protocol.make_client_capabilities()

0 commit comments

Comments
 (0)