pocco81 / true-zen.nvim

🦝 Clean and elegant distraction-free writing for NeoVim
GNU General Public License v3.0
953 stars 23 forks source link

Lualine is visible in Ataraxis mode #110

Open aleksey-rowan opened 1 year ago

aleksey-rowan commented 1 year ago

The minimalist mode properly hides the status line, but in the Ataraxis mode Lualine is still visible:

image

I have globalstatus for Lualine enabled and that renders the line at the top of the document as well in Ataraxis.

devstefancho commented 1 year ago

I set callback function for ataraxis mode

hide lualine when open ataraxis mode, and unhide lualine when quitting it

here is my config

local status, true_zen = pcall(require, "true-zen")
if not status then
  return
end

true_zen.setup({
  modes = {
    ataraxis = {
      callbacks = {
        open_pre = function()
          require("lualine").hide()
        end,
        close_pre = function()
          require("lualine").hide({ unhide = true })
        end,
      },
    },
  },
})

or maybe this is an another way (I didn't try it)

use({
    "Pocco81/true-zen.nvim",
    config = function()
         require("true-zen").setup {
            -- your config goes here
            -- or just leave it empty :)
                        modes = {
                          ataraxis = {
                            callbacks = {
                              open_pre = function()
                                require("lualine").hide()
                              end,
                              close_pre = function()
                                require("lualine").hide({ unhide = true })
                              end,
                            },
                          },
                        },
         }
    end,
})
LamprosPitsillos commented 1 year ago

I am also having this issue

plum commented 1 year ago

I mange to get lualine hiding well without callbacks requiring lualine. The true-zen integrations with lualine make it simple, as shown in the README, serving to hide lualine in ataraxis, when lualine is set to true (the default is 'false')

I use that at the end of my config beginning with something like your suggested second (untried by yourself) method. I'm using lazy.vim, so I preferred 'return', rather than 'use'

return {
    "Pocco81/true-zen.nvim",
    config = function()
         require("true-zen").setup( {
            -- your config goes here
            -- or just leave it empty :)

    integrations = {
        twilight = true, -- enable twilight (ataraxis)
        lualine = true, -- hide nvim-lualine (ataraxis)
      },
    })
  end,
}

Regards, John

rafo commented 8 months ago
return {
  "Pocco81/true-zen.nvim",
  config = function()
       require("true-zen").setup( {
          -- your config goes here
          -- or just leave it empty :)

    integrations = {
        twilight = true, -- enable twilight (ataraxis)
        lualine = true, -- hide nvim-lualine (ataraxis)
      },
    })
  end,
}

OT but this could be a good starting point to show how to install this with lazy.vim and should be copied to the README.md of this project.