hydra.nvim icon indicating copy to clipboard operation
hydra.nvim copied to clipboard

Lualine Mode not working

Open dantearaujo1 opened this issue 2 years ago • 6 comments

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 = {}
}

dantearaujo1 avatar Sep 19 '22 19:09 dantearaujo1

Is this problem valid after #49?

anuvyklack avatar Sep 20 '22 16:09 anuvyklack

It's still a problem

This is where i set a test function called hello returning hydra.statusline.get_name() image

Here is the result when i'm HYDRA mode image

This is the hello function for test image

image

dantearaujo1 avatar Sep 20 '22 17:09 dantearaujo1

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()'?

bschnitz avatar Sep 29 '22 15:09 bschnitz

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.

dantearaujo1 avatar Sep 29 '22 15:09 dantearaujo1

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" }
},

2022-12-29_17-09

ghost avatar Dec 29 '22 09:12 ghost

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" }
},

2022-12-29_17-09

Works with heirline.

ghost avatar Jan 09 '23 09:01 ghost