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

NNP is not enabled when running :checkhealth #367

Closed
sand4rt opened this issue May 30, 2024 · 21 comments
Closed

NNP is not enabled when running :checkhealth #367

sand4rt opened this issue May 30, 2024 · 21 comments
Labels
enhancement New feature or request help wanted Extra attention is needed need investigation When an issue lack context/is not straight forward to solve

Comments

@sand4rt
Copy link

sand4rt commented May 30, 2024

Description

NNP is not enabled when running :checkhealth

Steps to reproduce

  1. I did the command :checkhealth
  2. Then I saw that NNP is not enabled

Expected behavior

NNP should be enabled when running :checkhealth

Environment

  • Neovim version: 0.10.0
  • no-neck-pain.nvim version: latest
@shortcuts
Copy link
Owner

Hey @sand4rt, thanks for opening the issue! I'm not sure what should NNP report as there's no external dependencies, maybe it could be great to do an assertion of the user config in order to report usage of deprecated/unknown options?

Let me know if you have any use cases in mind

@shortcuts shortcuts added enhancement New feature or request help wanted Extra attention is needed need investigation When an issue lack context/is not straight forward to solve labels May 31, 2024
@sand4rt
Copy link
Author

sand4rt commented May 31, 2024

Hi @shortcuts, thanks for the reply. The issue is not about the NNP checkhealth results/reports. It is that the NNP side windows are not enabled there

@shortcuts
Copy link
Owner

Ahhhh ok sorry I misunderstood, weirdly with one side opened only I did not noticed it, I'll try with both!

@shortcuts
Copy link
Owner

Hey! So I just tried it and the reason why it works for me is because I have autocmds.enableOnTabEnter set to true, not sure if you do too. As checkhealth runs in its own tab, it is required for it to work

@shortcuts
Copy link
Owner

Makes me think that for simplicity, I should default enableOnTabEnter if enableOnVimEnter is true, as the behavior should stay consistent

@sand4rt
Copy link
Author

sand4rt commented Jun 2, 2024

Hey! So I just tried it and the reason why it works for me is because I have autocmds.enableOnTabEnter set to true, not sure if you do too. As checkhealth runs in its own tab, it is required for it to work

Thanks for the reply! Ah, NNP is enabled now when autocmds.enableOnTabEnter = true is set! It's kind of slow, though, because :checkhealth runs first before NNP kicks in, but I can live with that.

I also noticed that Neovim closes completely when I use :q in a separate :checkhealth tab while NNP is enabled (it should only close the :checkhealth tab).

Makes me think that for simplicity, I should default enableOnTabEnter if enableOnVimEnter is true, as the behavior should stay consistent

That sound reasonable to me, but im also fine with adding the additional autocmds.enableOnTabEnter = true.

@shortcuts
Copy link
Owner

I also noticed that Neovim closes completely when I use :q in a separate :checkhealth tab while NNP is enabled (it should only close the :checkhealth tab).

looks like what I observed here #361 (comment), it's fixed in the next major but I'll fix it here too indeed

@shortcuts
Copy link
Owner

Hey there, hope you are doing well

This should be fixed in 1.15.0! #378

@sand4rt
Copy link
Author

sand4rt commented Aug 30, 2024

Hi @shortcuts, there are a lot of things broken now unfortunately, when i :q inside :checkhealth, the side buffers remain open:

image

Also when i open neotree, when NNP enabled, NNP gets closed

@shortcuts
Copy link
Owner

Hi @shortcuts, there are a lot of things broken now unfortunately, when i :q inside :checkhealth, the side buffers remain open:

Also when i open neotree, when NNP enabled, NNP gets closed

hey!

could you share your config please? I'm not able to reproduce any of the issue

@sand4rt
Copy link
Author

sand4rt commented Aug 30, 2024

Sure, let me know if you need more info!:

return {
    "shortcuts/no-neck-pain.nvim",
    version = "*",
    lazy = false,
    keys = {
        { "<Leader>z", "<cmd>:NoNeckPain<CR>", noremap = true, silent = true },
    },
    opts = {
        width = 148,
        autocmds = {
            enableOnTabEnter = true,
            skipEnteringNoNeckPainBuffer = true,
        },
        mappings = {
            enabled = false,
        },
        integrations = {
            NeoTree = {
                position = "left",
                reopen = true,
            },
            undotree = {
                position = "left",
            },
            neotest = {
                position = "right",
                reopen = true,
            },
            TSPlayground = {
                position = "right",
                reopen = true,
            },
            NvimDAPUI = {
                position = "right",
                reopen = true,
            },
        },
    },
}

@shortcuts
Copy link
Owner

(reproducing from #383)

do you use nvim <0.10 by any chance?

@sand4rt
Copy link
Author

sand4rt commented Aug 30, 2024

i'm using 0.10.1

@shortcuts
Copy link
Owner

ok so that's an other issue then ahah

I'm still unable to reproduce on 0.10.1 🤔

@sand4rt
Copy link
Author

sand4rt commented Aug 30, 2024

when i :q inside :checkhealth, the side buffers remain open

@shortcuts
Just tested it again and this does not happen when i disable all my plugins tough. :checkhealth takes a few sec to load when i enable all my plugins. Maybe that is related to the issue?

the other issue, where NNP closes when i open neotree (or neotest) is consistent, even when i have all my config disabled

@shortcuts
Copy link
Owner

when i :q inside :checkhealth, the side buffers remain open

@shortcuts Just tested it again and this does not happen when i disable all my plugins tough. :checkhealth takes a few sec to load when i enable all my plugins. Maybe that is related to the issue?

It's expected that checkhealth takes a bit of time on startup, it locks everything until it completes but usually plugins operate before the lock (at least nnp does I believe)

if you manage to find the plugin that clashes lmk, I can try to see if it can be fixed on my side

the other issue, where NNP closes when i open neotree (or neotest) is consistent, even when i have all my config disabled

on it!

@sand4rt
Copy link
Author

sand4rt commented Aug 30, 2024

when i :q inside :checkhealth, the side buffers remain open

@shortcuts Thanks! I discovered that the issue only occurs when i access :checkhealth through Telescope cmdline. (I have this remap: { ":", "<cmd>Telescope cmdline<CR>", desc = "telescope: cmdline" })

@shortcuts
Copy link
Owner

Screenshot 2024-08-31 at 00 33 22

I can only try on my laptop right now but if there's enough space for neotree and nnp to live (here the width is 30), it seems to behave correctly.

Could you please let me know the number of columns in your ui? (:lua vim.print(vim.o.columns) so I can try to create a test case with similar setup as yours

@sand4rt
Copy link
Author

sand4rt commented Aug 30, 2024

I can only try on my laptop right now but if there's enough space for neotree and nnp to live (here the width is 30), it seems to behave correctly.

Yeah, this also works fine on my machine.

Could you please let me know the number of columns in your ui? (:lua vim.print(vim.o.columns) so I can try to create a test case with similar setup as yours

:lua vim.print(vim.o.columns) = 240

@shortcuts
Copy link
Owner

hey @sand4rt, others have reported this issue too #389, I fixed it in next I believe!

@sand4rt
Copy link
Author

sand4rt commented Sep 3, 2024

@shortcuts thanks! I'll try it later on!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed need investigation When an issue lack context/is not straight forward to solve
Projects
None yet
Development

No branches or pull requests

2 participants