Skip to content

bug: Shortcuts to mason.nvim not working in lazy menu #2060

@usta

Description

@usta

I have opened same bug entry on nvim 's issues part as LazyVim/LazyVim#7008
and wantted to crossreport here too.

Neovim version (nvim -v)
v0.11.6

Operating system/version
Arch Linux

Describe the bug

In lazy menu ( l ) you couldnt reach mason.nvim though space c m shortcut instead it just stays still

Steps To Reproduce

1- Open nvim
2- Press l to get in lazy menu
3- Press space
4- Press c
5- Press m

Expected Behavior

Reach the mason.nvim's menu but instead does nothing

Also from there @dpetka2001 made this comment about related bug as :

Not a LazyVim bug. Same thing happens with following minimal repro


-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
	local lazyrepo = "https://github.com/folke/lazy.nvim.git"
	local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
	if vim.v.shell_error ~= 0 then
		vim.api.nvim_echo({
			{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
			{ out, "WarningMsg" },
			{ "\nPress any key to exit..." },
		}, true, {})
		vim.fn.getchar()
		os.exit(1)
	end
end
vim.opt.rtp:prepend(lazypath)

-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"

-- Setup lazy.nvim
require("lazy").setup({
	spec = {
		{
			"mason-org/mason-lspconfig.nvim",
			event = "BufReadPre",
			opts = {
				ensure_installed = { "lua_ls" },
			},
			dependencies = {
				{ "mason-org/mason.nvim", cmd = "Mason", opts = {} },
				"neovim/nvim-lspconfig",
			},
		},
	},
})

Some weird interaction between Lazy and Mason because they are both floating windows with different zindex value. lazy.nvim has 50 and Mason has 45, so it's behind the Lazy UI when both are open because it has lower zindex value. Just don't open both together.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions