AstroNvim / astrocommunity

A community repository of common plugin specifications
GNU General Public License v3.0
1.04k stars 212 forks source link

[ FIXED ] Overseer open display on the wrong side with error #1023

Closed MrMic closed 3 weeks ago

MrMic commented 4 weeks ago

Checklist

Neovim version (nvim -v)

0.10.0

Operating system/version

Linux Ubuntu 22.04

Terminal/GUI

kitty

Describe the bug

The window of Overseer display on the left side instead of the bottom side, and with this error:

Failed to run `config` for overseer.nvim

...hare/AstroNvim4/lazy/overseer.nvim/lua/overseer/init.lua:278: attempt to index field 'on_config' (a nil value)

# stacktrace:
  - /overseer.nvim/lua/overseer/init.lua:278 _in_ **enable_dap**
  - /overseer.nvim/lua/overseer/init.lua:303 _in_ **setup**
  - /astrocommunity/lua/astrocommunity/code-runner/compiler-nvim/init.lua:17 _in_ **config**

Steps to Reproduce

Apply command: :OverseerToggle

Expected behavior

Display the window on the bottom, as before (usual).

Screenshots

Capture d’écran du 2024-06-03 09-07-18

Additional Context

No response

Minimal configuration

-- save as repro.lua
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "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
  -- stylua: ignore
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)

-- install plugins
local plugins = {
  { "AstroNvim/AstroNvim", import = "astronvim.plugins" },
  { "AstroNvim/astrocommunity" },

  -- add any other plugins/customizations here
  { import = "astrocommunity.code-runner/overseer-nvim" },

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

-- add anything else here (autocommands, vim.filetype, etc.)
Uzaaft commented 4 weeks ago

You're mistaken. It's not opening on the wrong side, it's working correctly

MrMic commented 4 weeks ago

Nope. I have been working with it for many months and It was opening on the bottom side and got an error too, as mentioned.

Uzaaft commented 4 weeks ago

i'm not sure what to tell you. take a look at the overseer.nvim repo, opening on the left is how it works OOB.

Taking a look at the error.

mehalter commented 4 weeks ago

@Uzaaft you are confusing :OverseerToggle and :OverseerOpen. The toggle should display it on the bottom. My guess is execution is getting stopped early and messed up because of whatever that error is

mehalter commented 4 weeks ago

Also I cannot replicate the issue with the provided minimal configuration. It looks like it was not properly set up and tested as it's not adding overseer at all

MrMic commented 4 weeks ago
nvim -u repro.lua 

works fine.

mehalter commented 4 weeks ago

yeah, that works fine because that's the file I made, but :OverseerToggle shows no command....

mehalter commented 4 weeks ago

so I cannot reproduce the bug given that configuration

mehalter commented 4 weeks ago

I can replicate the bug with the minimal repro.lua provided below

This requirement (which you checked) is added to the checklist for a reason 😄

MrMic commented 4 weeks ago

Do you need temporary access to my config repo?

mehalter commented 4 weeks ago

No, I would like you to make a minimal reproducing configuration based on the template above to recreate the bug with as few changes as necessary. This helps us weed out if the issue is on our end or something in your configuration. Edit the file in your original message, import overseer, see if the problem exists. If it doesn't then you should do some more research to figure out what you may have in your configuration that is breaking things. We as maintainers do not have the time to go through each person's hundreds of lines of personal configuration to identify bugs, sorry!

mehalter commented 4 weeks ago

Also in the future, when doing the checklist we provide as a requirement to open an issue, please pay attention to those and do not check off things that have not been done. Until it has been done then an issue isn't investigated enough to be opened.

mehalter commented 4 weeks ago

We also need clear steps to reproduce the error. For example, Step 1: nvim (open neovim), Step 2: :OverseerToggle (see error). You should test this step by step process exactly given a fresh installation of the repro.lua that you provide so that we can actually reproduce whatever bug you are claming. The idea of the issue template is for us as maintainers to actually get to the bug and be able to debug it. These steps could include filetypes/language servers/other packs that are required to replicate the bug/example files if they are used to recreate the bug/etc.

Hopefully this is clear! Let me know if you have any questions about this 😄

Uzaaft commented 4 weeks ago

@Uzaaft you are confusing :OverseerToggle and :OverseerOpen. The toggle should display it on the bottom. My guess is execution is getting stopped early and messed up because of whatever that error is

Am I....?

MrMic commented 4 weeks ago

Test with repro.lua and:

{ import = "astrocommunity.code-runner/overseer-nvim" },

No error reported but both open on the left side:

:OverseerOpen
:OverseerToggle

Which is not expected. I have also tested with my config and noticed the same behavior but this time, with the error reported above in the discussion, and It happens once. After, It misbehaves (left position for both commands) but no error was reported. It seems to occur at the loading stage I think.

mehalter commented 4 weeks ago

Ok,if you are able to replicate it reliably then definitely respond back here. For now we can leave it open just in case anyone else runs into it and can provide information

mehalter commented 4 weeks ago

Please update the minimal repro.lua in your original message to help aid this and futureproof the issue

MrMic commented 4 weeks ago

Please update the minimal repro.lua in your original message to help aid this and futureproof the issue

Done.

MrMic commented 3 weeks ago

After update

:OverseerToggle

open as expected at the bottom (even if it is a bit small...) But I still get the error 🤔

mehalter commented 3 weeks ago

Nice! Good luck resolving that last bit!

Uzaaft commented 3 weeks ago

After update

:OverseerToggle

open as expected at the bottom (even if it is a bit small...) But I still get the error 🤔

added in a commit from like 1 hour ago 😂😂 So I was right all along.

MrMic commented 3 weeks ago

See the issue with the creator of Overseer and it comes from nvim-dap that seems too old. I will try to fix that alone.