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: mini.identscope animation on neo-tree if neo-tree is opened before buffer #318

Closed
3 tasks done
georgeguimaraes opened this issue Feb 21, 2023 · 3 comments · Fixed by #343
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@georgeguimaraes
Copy link
Contributor

Did you check docs and existing issues?

  • I have read all the LazyVim docs
  • I have searched the existing issues of LazyVim
  • I have searched the exsiting issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.9.0-dev-1011+g350747461-dirty

Operating system/version

macOS v12.6.3

Describe the bug

When you open neo-tree before opening a file, and then open a file, lazy then loads mini.indentscope.

What happens is that now your neo-tree window has the mini.indentscope animation enabled, which shouldn't happen.

Steps To Reproduce

  1. nvim . to open neovim with neo-tree already opened
  2. open any file
  3. return focus to the neo-tree window
  4. now you can see the animation from mini.identscope (see screenshot)

CleanShot 2023-02-21 at 12 27 31

Expected Behavior

I'd expect to identscope to not be attached to the neo-tree window.

I managed to solve this by copying this into my lua/config/autocms.lua:

      vim.api.nvim_create_autocmd("FileType", {
        pattern = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason" },
        callback = function()
          vim.b.miniindentscope_disable = true
        end

This way I think it ensures mini.identscope is disabled in neo-tree even before mini.identscope is loaded by lazy.vim.

Repro

No response

@georgeguimaraes georgeguimaraes added the bug Something isn't working label Feb 21, 2023
@dpetka2001
Copy link
Contributor

dpetka2001 commented Feb 23, 2023

I didn't manage to reproduce following the steps you provided. I followed steps 1-3 and in step 4 I can't see any animation in neo-tree. The autocmd you put in your lua/config/autocmds.lua is already part of mini.identscope default configuration, so I don't know if it makes any difference.

@georgeguimaraes
Copy link
Contributor Author

@dpetka2001 when browsing through nested files in neo-tree can you try hitting $ to move the cursor to the end of line?
That's the difference in my setup. I was noticing it because I also use my mouse to click the files in the list (which will also trigger the animation from mini.identscope).

CleanShot 2023-02-23 at 18 33 59
CleanShot 2023-02-23 at 18 33 53

@dpetka2001
Copy link
Contributor

Yes, I see what you mean and I can confirm this is the case. I just never used $ to go to the end of the line or the mouse. Just up and down to go to the file i wanted to open. Indeed the autocmd in your own config solves this issue.

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

Successfully merging a pull request may close this issue.

2 participants