refactor(nvim): make heirline bit less fragile
Some checks failed
Check Formatting of Files / Check-Formatting (push) Failing after 1m5s

This commit is contained in:
Price Hiller 2024-06-12 03:34:43 -05:00
parent 57e03fa85b
commit 878642d009
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -32,7 +32,7 @@ return {
-- NOTE: Vim Mode
local VimMode = {
init = function(self)
self.mode = vim.fn.mode(1)
self.mode = vim.api.nvim_get_mode().mode
end,
static = {
mode_names = { -- change the strings if you like it vvvvverbose!
@ -87,7 +87,7 @@ return {
t = colors.peachRed,
},
mode_color = function(self)
local mode = conditions.is_active() and vim.fn.mode() or "n"
local mode = conditions.is_active() and vim.api.nvim_get_mode().mode or "n"
return self.mode_colors[mode]
end,
},
@ -889,7 +889,8 @@ return {
},
{
condition = function()
return vim.fn.reg_recording() ~= ""
local _, reg_recording = pcall(vim.fn.reg_recording)
return reg_recording ~= ""
end,
update = {
"RecordingEnter",