wfxr / minimap.vim

📡 Blazing fast minimap / scrollbar for vim, powered by code-minimap written in Rust.
MIT License
1.19k stars 23 forks source link

nvim-tree doesn't ignore minimap, tree considers it as separate window #142

Closed raven2cz closed 1 year ago

raven2cz commented 2 years ago

I'm using nvim-tree and if I try open the file from the tree. The message is shown "Pick window:" And I have to select A, B because the minimap is considered as second window B.

Do you have some trick how to correctly configure the minimap which cannot be regular window, just part of editor window? Or provide information to other plugins that it is not regular window?

ZNielsen commented 2 years ago

If there is a plugin that does it that way, I don't know of it. I think that's a fundamental vimism.

There might be a way to indicate a window is not a "regular" window and should be ignored, but I haven't personally looked into it. If you find something in the documentation, please do let us know so we can give it a try!

dsully commented 2 years ago

I'd definitely like to "ignore" the minimap window as well. As in, I never want to switch my cursor to it.

ZNielsen commented 2 years ago

If you can find some vim setting that enables that, please let us know 😃

dsully commented 2 years ago

This is what I ended up with: https://github.com/dsully/dotfiles/commit/caa22b703cdee4b96c023050964c8ce32bdd48c1 based off of your answer in https://github.com/wfxr/minimap.vim/issues/106#issuecomment-994143555

ZNielsen commented 2 years ago

Cool, this could possibly be gated by a setting when minimap.vim is setting up the auto commands. Moving that out to a new issue, since it seems different than the original ask.

axsaucedo commented 2 years ago

Currently I have managed to get a sane way of solving this by ensuring minimap is hidden when entering NvimTree, and displayed when entering the main window(s).

    let g:minimap_auto_start = 1
    let g:minimap_auto_start_win_enter = 1
    let minimap_close_buftypes = ["nofile"]
    let g:minimap_block_filetypes = [ 'fugitive', 'nerdtree', 'tagbar', 'fzf', 'NvimTree' ]

The only inconvenience is that if now I want to properly disable / hide the nvimtree it would re-appear every time, so it would be useful to have a :MinimapToggleEnabled (as well as a function to retrieve whether it's enabled so it can be displayed in Airline tab).

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.