Skip to content

Commit

Permalink
feat(statusline): add cursor hex (#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
linrongbin16 authored Oct 22, 2024
1 parent 6b752d3 commit 696e1fd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lua/configs/rebelot/heirline-nvim/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,17 @@ local Location = {
},
}

local CursorHex = {
init = function(self)
self.mode = vim.api.nvim_get_mode().mode
end,
hl = function(self)
local mode_hl = GetModeHighlight(self.mode)
return { fg = mode_hl.fg, bg = mode_hl.bg, bold = true }
end,
provider = " 0x%04B",
}

local Progress = {
init = function(self)
self.mode = vim.api.nvim_get_mode().mode
Expand All @@ -579,6 +590,7 @@ local StatusLine = {
FileFormat,
FileType,
Location,
CursorHex,
Progress,
}

Expand Down

0 comments on commit 696e1fd

Please sign in to comment.