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: custom errorformat with overseer breaks neovim ui #377

Closed
monkoose opened this issue Nov 5, 2024 · 4 comments
Closed

bug: custom errorformat with overseer breaks neovim ui #377

monkoose opened this issue Nov 5, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@monkoose
Copy link

monkoose commented Nov 5, 2024

Neovim version (nvim -v)

0.10.2

Operating system/version

Linux

Describe the bug

Custom errorformat and using overseer task with

components = {  { "on_output_quickfix", open = true }, "default"  },

totally breaks neovim ui (non floating windows and statusline become hidden)

What is the severity of this bug?

breaking (some functionality is broken)

Steps To Reproduce

  1. Run nvim -u minimal.lua
  2. Execute OverseerRun ls
  3. For better understanding what is going on run :copen

It seems like some multiple windows have opened, and multiple :q doesn't quit neovim, only like third I guess.

Expected Behavior

Plugin shouldn't break neovim ui in any way no matter which options user uses.

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)

vim.opt.errorformat:append([[,%f\|%\s%#%l col%\s%#%c%\s%#\| %m]])
-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  {
    "stevearc/overseer.nvim",
    config = function()
      local overseer = require("overseer")
      overseer.setup({})
      overseer.register_template({
        name = "ls",
        builder = function()
          return {
            cmd = { "ls" },
            components = {
              { "on_output_quickfix", open = true },
              "default",
            },
          }
        end,
      })
    end,
  },
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
@monkoose monkoose added the bug Something isn't working label Nov 5, 2024
@stevearc
Copy link
Owner

stevearc commented Nov 9, 2024

Could you use a minimal init.lua file to reproduce the issue, as is requested in the bug report template?

@stevearc stevearc added the question Further information is requested label Nov 9, 2024
@monkoose
Copy link
Author

monkoose commented Nov 10, 2024

I have updated the issue.

@github-actions github-actions bot removed the question Further information is requested label Nov 10, 2024
@stevearc
Copy link
Owner

Thanks for making the repro! I was able to find the issue pretty quickly. There was a utility method that needs to create a fullscreen float, do some operation in that context, then close the float. The errorformat is invalid and was causing a crash during that middle operation, so we weren't cleaning up the float afterwards. I've properly guarded against this behavior now with xpcall, but you'll still have to figure out how to fix your errorformat

@monkoose
Copy link
Author

monkoose commented Nov 11, 2024

Thanks. Before this happen, I wasn't aware that it is broken, I have translated it from my old vim config, , and now I'm not even remember why I had it in the config, so I have commented out it anyway.

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