Skip to content

Commit

Permalink
revert(vim-illuminate): revert back to 'vim-illuminate' (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
linrongbin16 authored Feb 10, 2025
1 parent 293b6f2 commit df7077a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
uses: actions/checkout@v4
- uses: stevearc/nvim-typecheck-action@v2
with:
nvim-version: v0.10.3
path: lua
configpath: ".luarc.json"
selene:
Expand Down
20 changes: 15 additions & 5 deletions lua/configs/RRethy/vim-illuminate/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,21 @@ require("illuminate").configure({
})

-- highlight style
local vim_illuminate_augroup =
vim.api.nvim_create_augroup("vim_illuminate_augroup", { clear = true })
vim.api.nvim_create_autocmd({ "UIEnter", "BufReadPre", "BufNewFile" }, {
group = vim_illuminate_augroup,
local illuminate_augroup = vim.api.nvim_create_augroup("illuminate_augroup", { clear = true })
vim.api.nvim_create_autocmd({ "UIEnter", "VimEnter", "Colorscheme" }, {
group = illuminate_augroup,
callback = function()
vim.cmd([[hi illuminatedWord cterm=underline gui=underline]])
vim.schedule(function()
local cl = vim.api.nvim_get_hl(0, { name = "CursorLine", link = false }) --[[@as table]]
cl.bold = true
cl.underline = true
if type(cl.cterm) ~= "table" then
cl.cterm = {}
end
cl.cterm.bold = true
cl.cterm.underline = true
cl.force = true
vim.api.nvim_set_hl(0, "illuminatedWord", cl)
end)
end,
})
2 changes: 1 addition & 1 deletion lua/configs/itchyny/vim-cursorword/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ vim.api.nvim_create_autocmd({ "UIEnter", "Colorscheme" }, {
group = cursorword_augroup,
callback = function()
vim.schedule(function()
local cl = vim.api.nvim_get_hl(0, { name = "CursorLine", link = false })
local cl = vim.api.nvim_get_hl(0, { name = "CursorLine", link = false }) --[[@as table]]
cl.bold = true
cl.underline = true
if type(cl.cterm) ~= "table" then
Expand Down
4 changes: 2 additions & 2 deletions lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ local M = {
-- ---- HIGHLIGHT ----

{
"itchyny/vim-cursorword",
"RRethy/vim-illuminate",
event = { VeryLazy },
init = lua_init("itchyny/vim-cursorword"),
config = lua_config("RRethy/vim-illuminate"),
},
{
"brenoprata10/nvim-highlight-colors",
Expand Down

0 comments on commit df7077a

Please sign in to comment.