Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with showtablines when toggling Ataraxis or Minimalist off #125

Open
clockworkpc opened this issue Jan 23, 2024 · 4 comments
Open

Comments

@clockworkpc
Copy link

Neovim Config:

NVIM v0.10.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Installed the plugin with Lazy.nvim in NVChad:

  {
    'pocco81/true-zen.nvim', lazy = false
  }

GIVEN the above installation
WHEN I enter any mode
THEN everything works fine
BUT WHEN I exit any mode
THEN I get an error such as the following:

Error:

Error executing Lua callback: ...hare/nvim/lazy/true-zen.nvim/lua/true-zen/minimalist.lua:118: Invalid value for option 'showtabline': expected number, got boolean true
stack traceback:                                                                                                                                                                              
        [C]: in function '__newindex'                                                                                                                                                         
        ...hare/nvim/lazy/true-zen.nvim/lua/true-zen/minimalist.lua:118: in function 'off'                                                                                                    
        .../share/nvim/lazy/true-zen.nvim/lua/true-zen/ataraxis.lua:252: in function 'off'                                                                                                    
        .../share/nvim/lazy/true-zen.nvim/lua/true-zen/ataraxis.lua:291: in function 'toggle'                                                                                                 
        ...ocal/share/nvim/lazy/true-zen.nvim/lua/true-zen/init.lua:4: in function 'ataraxis'                                                                                                 
        .../local/share/nvim/lazy/true-zen.nvim/plugin/true-zen.lua:9: in function <.../local/share/nvim/lazy/true-zen.nvim/plugin/true-zen.lua:8>   

The stack trace always comes back to true-zen/minimalist.lua:118.

What is happening to showtablines in this loop?

@clockworkpc
Copy link
Author

Update:

I disabled all of the minimalist options and can toggle Ataraxis mode without error:

		minimalist = {
			ignored_buf_types = { "nofile" }, -- save current options from any window except ones displaying these kinds of buffers
			options = { -- options to be disabled when entering Minimalist mode
				-- number = false,
				-- relativenumber = false,
				-- showtabline = 0,
				-- signcolumn = "no",
				-- statusline = "",
				-- cmdheight = 1,
				-- laststatus = 0,
				-- showcmd = false,
				-- showmode = false,
				-- ruler = false,
				-- numberwidth = 1
			},

This is what it looks like, not perfect but usable for me.

image

When all the options are enabled with default values, the error is this:

Error executing Lua callback: ...hare/nvim/lazy/true-zen.nvim/lua/true-zen/minimalist.lua:118: Invalid value for option 'showtabline': expected number, got boolean true

If I comment out showtabline, exit, re-open Neovim and try toggling Ataraxis on and then off:

...Invalid value for option 'ruler': expected boolean, got number 0

If I then comment out ruler, exit, re-open Neovim and try toggling Ataraxis on and then off:

...Invalid value for option 'cmdheight': expected number, got boolean true

If I then comment out cmdheight, exit, re-open Neovim and try toggling Ataraxis on and then off:

...Invalid value for option 'showmode': expected boolean, got number 0

If I then comment out showmode, exit, re-open Neovim and try toggling Ataraxis on and then off:

Then it works.

I have to disable the following options to get Ataraxis mode to work.
As far as I can tell, if I enable any of the following, I get one of the above errors.

minimalist = {
    ignored_buf_types = { "nofile" }, -- save current options from any window except ones displaying these kinds of buffers
    options = { -- options to be disabled when entering Minimalist mode
        number = false,
        relativenumber = false,
        -- showtabline = 0,
        signcolumn = "no",
        statusline = "",
        -- cmdheight = 1,
        laststatus = 0,
        showcmd = false,
        -- showmode = false,
        -- ruler = false,
        numberwidth = 1
    },

@EJunger
Copy link

EJunger commented Feb 1, 2024

Having the same issue, however amending the minimalist options doesn't seem to have helped. I can enter ataraxis but zen crashes when I try to exit.

@Qkessler
Copy link

Hi there! Any update on this ticket? Would be happy to get it fixed!

@joshuadanpeterson
Copy link

Just set this up today and started seeing this exact error. Glad I'm not the only one. Hopefully it gets fixed. Tried @clockworkpc's solution, but that didn't work for me either. Looks like I'm going to have to switch to Zen Mode until this gets fixed.

satlank added a commit to satlank/satlank that referenced this issue Jun 5, 2024
true-zen is crashing for me at the moment when exiting the zen mode.
There seems to be an issue related to that under
pocco81/true-zen.nvim#125.  Might consider
switching back once that is addressed, but for the time being zen-mode
seems fine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants