hydra.nvim
hydra.nvim copied to clipboard
Lualine Mode not working
Im trying to customize my Lualine A section with Hydra's name, but using require('hydra.statusline').get_name with conditioning using require('hydra.statusline').is_active shows nothing .
local hydra = require("hydra.statusline")
require'lualine'.setup {
options = {
icons_enabled = true,
theme = 'auto',
-- component_separators = {'', ''},
-- section_separators = {'', ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = true,
refresh ={
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode',{hydra.get_name, cond = hydra.is_active}},
-- lualine_a = {hydra_status.get_name()},
lualine_b = {'branch'},
lualine_c = {'filename', {gps.get_location, cond = gps.is_available}},
lualine_x = {'filetype', 'fileformat', 'encoding'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
extensions = {}
}
Is this problem valid after #49?
It's still a problem
This is where i set a test function called hello returning hydra.statusline.get_name()
Here is the result when i'm HYDRA mode
This is the hello function for test
Do You still have this problem? I'm also using lualine and it is working fine for me. (Tested Your lualine configuration without the gps part.) Does your hydra have a name? If You don't define one, nil is returned by `hydra.get_name()'?
nil is returned by `hydra.get_name()'? Yes Do You still have this problem? Yes Tested Your lualine configuration without the gps part. Tried, same result! Yes all my hydras have a name.
Same, status not updated when activate a hydra.
require("hydra.statusline").is_active()
always returns false here.
{
function()
return require("hydra.statusline").is_active()
--return hydra.get_name() .. ": " .. hydra.get_hint()
end,
-- cond = require("hydra.statusline").is_active,
color = { fg = "#ffffff", gui = "bold" }
},
Same, status not updated when activate a hydra.
require("hydra.statusline").is_active()
always returns false here.{ function() return require("hydra.statusline").is_active() --return hydra.get_name() .. ": " .. hydra.get_hint() end, -- cond = require("hydra.statusline").is_active, color = { fg = "#ffffff", gui = "bold" } },
Works with heirline.