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: Error Invalid window id: ... when I close the LSP hover window with the new fclose! command. #832

Open
3 tasks done
mawkler opened this issue Jun 3, 2024 · 14 comments
Labels
bug Something isn't working

Comments

@mawkler
Copy link

mawkler commented Jun 3, 2024

Did you check docs and existing issues?

  • I have read all the noice.nvim docs
  • I have searched the existing issues of noice.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.11.0-dev-164+g3a1515bfe

Operating system/version

Arch (btw) Linux

Describe the bug

I get the error Invalid window id: ... when I open the LSP hover window twice, after closing it the first time with :fclose!.

Steps To Reproduce

  1. echo 'local foo = "bar"' > test.lua
  2. nvim -u path/to/config/above test.lua
  3. Press K with the cursor on foo to do LSP hover on it
  4. :fclose!
  5. (make sure not to move the cursor until the next step)
  6. Press K
  7. Error: noice.nvim  ERROR ...r/.local/share/nvim/lazy/nui.nvim/lua/nui/popup/init.lua:168: Invalid window id: 1002

Note that if I move the cursor back and forth before pressing K the second time, I get no error.

Expected Behavior

No error message after pressing K the second time

Repro

-- 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",
  {
    "folke/noice.nvim",
    dependencies = { "MunifTanjim/nui.nvim", "rcarriga/nvim-notify" },
    opts = {},
  },
  {
    'neovim/nvim-lspconfig',
    dependencies = {
      { 'williamboman/mason.nvim', config = true },
      'williamboman/mason-lspconfig.nvim',
      'WhoIsSethDaniel/mason-tool-installer.nvim',
    },
    config = function()
      require('mason').setup()

      local servers = {}

      require('mason-tool-installer').setup { ensure_installed = { 'lua_ls' } }

      require('mason-lspconfig').setup {
        handlers = {
          function(server_name)
            local server = servers[server_name] or {}
            require('lspconfig')[server_name].setup(server)
          end,
        },
      }
    end,
  },
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

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

github-actions bot commented Jul 6, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Jul 6, 2024
@mawkler
Copy link
Author

mawkler commented Jul 6, 2024

Please don't close this issue Mr. Bot

@github-actions github-actions bot removed the stale label Jul 7, 2024
Copy link
Contributor

github-actions bot commented Aug 7, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Aug 7, 2024
@mawkler
Copy link
Author

mawkler commented Aug 7, 2024

The bug isn't fixed. Please don't close this issue Mr. Bot

@github-actions github-actions bot removed the stale label Aug 8, 2024
Copy link
Contributor

github-actions bot commented Sep 7, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Sep 7, 2024
@mawkler
Copy link
Author

mawkler commented Sep 9, 2024

Mr. Actions, we've already been through this. Please for the love of all that is holy don't close this issue because the bug is still there.

@github-actions github-actions bot removed the stale label Sep 10, 2024
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Oct 10, 2024
@mawkler
Copy link
Author

mawkler commented Oct 10, 2024

Bruh

@github-actions github-actions bot removed the stale label Oct 11, 2024
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Nov 10, 2024
@mawkler
Copy link
Author

mawkler commented Nov 10, 2024

My brother in christ please stop this suffering

@github-actions github-actions bot removed the stale label Nov 11, 2024
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Dec 11, 2024
@mawkler
Copy link
Author

mawkler commented Dec 11, 2024

Potato

@folke
Copy link
Owner

folke commented Dec 11, 2024

Why not provide a PR instead?

@github-actions github-actions bot removed the stale label Dec 12, 2024
@mawkler
Copy link
Author

mawkler commented Dec 23, 2024

I could give it a try. Do you have any idea what the issue might be?

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

2 participants