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: <leader> Key Stops Working After Opening Aerial Window #434

Open
devxpain opened this issue Dec 17, 2024 · 1 comment
Open

bug: <leader> Key Stops Working After Opening Aerial Window #434

devxpain opened this issue Dec 17, 2024 · 1 comment
Labels
bug Something isn't working question Further information is requested

Comments

@devxpain
Copy link

devxpain commented Dec 17, 2024

Neovim version (nvim -v)

NVIM v0.10.2

Operating system/version

MacOS 15.1.1

Output of :AerialInfo

Aerial Info

Filetype: rust
Configured backends:
treesitter (supported) (attached)
lsp (supported)
markdown (not supported) [Filetype is not markdown]
asciidoc (not supported) [Filetype is not asciidoc]
man (not supported) [Filetype is not man]
Show symbols: Class, Constructor, Enum, Function, Interface, Module, Method, Struct

Describe the bug

After opening the Aerial window, my <leader> key sometimes stops working. However, if I press other keys like ':' or '?', it seems to reset, and then my <leader> key starts working again. My <leader> key is set to the space key.

What is the severity of this bug?

minor (annoyance)

Steps To Reproduce

  1. Clone the repository: https://github.com/barter-rs/barter-rs
  2. Open Neovim in the barter-rs directory.
  3. Open the Aerial window using :AerialOpen.
  4. Navigate around the barter-rs source code.
  5. Each time you open a file, test the <leader> key to check if it works. You will notice that at some point the <leader> key stops working. It will remain non-functional until you press keys like : or ?, which seem to reset something.

Expected Behavior

The <leader> key should function consistently.

Minimal example file

No response

Minimal init.lua

-- 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",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  {
    "stevearc/aerial.nvim",
    config = function()
      require("aerial").setup({
        -- add your aerial config here
      })
    end,
  },
  {
    "nvim-treesitter/nvim-treesitter",
    build = ":TSUpdate",
    config = function()
      require("nvim-treesitter.configs").setup({
        ensure_installed = { "c", "lua" },
        auto_install = true,
        highlight = { enable = true },
      })
    end,
  },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

Additional context

No response

@devxpain devxpain added the bug Something isn't working label Dec 17, 2024
@stevearc
Copy link
Owner

Unable to repro. I'm using the minimal init file

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

vim.g.mapleader = " "

vim.keymap.set("n", "<leader><leader>", "<cmd>echomsg 'leader is working'<CR>")

-- 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",
		"--single-branch",
		"https://github.com/folke/lazy.nvim.git",
		lazypath,
	})
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
	"folke/tokyonight.nvim",
	{
		"stevearc/aerial.nvim",
		config = function()
			vim.keymap.set("n", "<leader>a", "<cmd>AerialToggle<CR>")
			require("aerial").setup({
				-- add your aerial config here
			})
		end,
	},
	{
		"nvim-treesitter/nvim-treesitter",
		build = ":TSUpdate",
		config = function()
			require("nvim-treesitter.configs").setup({
				ensure_installed = { "c", "lua", "rust" },
				auto_install = true,
				highlight = { enable = true },
			})
		end,
	},
	-- add any other plugins here
}
require("lazy").setup(plugins, {
	root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")

I opened files in the repo, toggled aerial open, and confirmed that at all points <space><space> prints the message "leader is working". Can you produce a more specific set of repro steps using this minimal config?

@stevearc stevearc added the question Further information is requested label Dec 21, 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 question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants