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

BUG: foldlevel breaks help display #1476

Open
3 tasks done
ActionScripted opened this issue May 18, 2024 · 1 comment
Open
3 tasks done

BUG: foldlevel breaks help display #1476

ActionScripted opened this issue May 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ActionScripted
Copy link
Contributor

ActionScripted commented May 18, 2024

Did you check docs and existing issues?

  • I have read all the docs.
  • I have searched the existing issues.
  • I have searched the existing discussions.

Neovim Version (nvim -v)

v0.10.0

Operating System / Version

macOS 14.4.1

Describe the Bug

When I set vim.opt.foldlevel = 3 in my config the neo-tree help menu gets super wonky:

Screenshot 2024-05-17 at 10 31 01 PM

When I remove this or set it to something like vim.opt.foldlevel = 999 things work as expected:

Screenshot 2024-05-17 at 10 32 07 PM

I can't use fold commands to show the text but I can expand/collapse stuff in the help menu using :foldopen a few times on certain items:

May-17-2024 22-39-41


Is there something I can do short of disabling foldlevel in my config or is there maybe a way to have the help pop-up have a different fold level or ignore folding? This feels like a bug but it also feels like one of those weird ones where it's my fault for having a lower fold level.

Screenshots, Traceback

No response

Steps to Reproduce

  1. Set vim.opt.foldlevel = 3
  2. Open file explorer
  3. Toggle help

Expected Behavior

Full help menu is displayed without issue

Your Configuration

vim.opt.foldlevel = 3

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  -- add any other plugins here
}

local neotree_config = {
  "nvim-neo-tree/neo-tree.nvim",
  dependencies = { "MunifTanjim/nui.nvim", "nvim-tree/nvim-web-devicons", "nvim-lua/plenary.nvim" },
  cmd = { "Neotree" },
  keys = {
    { "<Leader>e", "<Cmd>Neotree<CR>" }, -- change or remove this line if relevant.
  },
  opts = {
    -- Your config here
    -- ...
  },
}

table.insert(plugins, neotree_config)
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
@ActionScripted ActionScripted added the bug Something isn't working label May 18, 2024
@ActionScripted
Copy link
Contributor Author

I haven't had a chance to test it locally but I wonder if something like this:

  vim.api.nvim_buf_set_option(popup.bufnr, 'foldenable', false)

Inside of lua/neo-tree/sources/common/help.lua might take care of things.

ActionScripted added a commit to ActionScripted/neo-tree.nvim that referenced this issue May 18, 2024
pynappo added a commit that referenced this issue Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant