-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Ignore_filetypes fails for mode changes inside ignored file #28
Comments
I'm not sure if this is possible – we disable the cursorline for inactive windows so that they are not highlighted by modes. In the linked PR, I tried using just highlights instead of toggling I'm curious if removing any combination of neo-tree/neo-tree-popup from ignored filetypes would give you a better experience? |
The only way I see this as being possible with desirable behavior is if there is a way we can see what window the Imo – I think I can live with having the cursorline managed and on-screen in multiple windows for now, I don't know a great fix to this that keeps the same behavior and keeps it simple to set up
No luck I'm afraid. Tried a bunch of combos and played around with ftplugin, but I still don't get desirable behavior 😔. Primary core of the problem for it is detecting what window is being left to, that would be the best way to resolve this. |
On another note, maybe neo-tree has a way to change search match highlights? |
Neo-tree does not unfortunately, I have a working solution for myself currently, but I do get cursorlines in windows I'm not in. This is a more fundamental problem to my eyes, not something that can be trivially solved and still maintain all desired functionality across all use cases. |
This is interesting neovim/neovim#18500 |
Closing as I don't have a good solution for this. PR's are welcome 😌 |
@treatybreaker can you try the latest version of modes.nvim to confirm if this issue still exists ? with and without |
@fitrh Only just saw this now, it still does not work unfortunately. I gave it a shot myself previously to resolve this, but the problem is more fundamental and has to do with how neo-tree handles its own cursor highlights and missing features in the neovim api. At least, that's my understanding. |
@treatybreaker how to reproduce your issue ? I never use neo-tree |
Description
I use
neo-tree
for my file browser and recently noticed that thefuzzy_search
functionality in it, when combined with modes.nvim, leaves mycursorline
invisible in insert mode. Thecursorline
works as expected when I disablemodes.nvim
. My config hasneo-tree
& theneo-tree-popup
in theignore_filetypes
and I still am getting an invisible cursorline in thefuzzy_search
mode.My relevant modes config:
Here's a gif of the bug in action:

Here's a gif with modes removed &

neo-tree
working as expected:Potential Fix
It's 100% related to this single
nvim_autocmd
, when I remove it, the plugin works mostly as expected:Solution One
A fix would be to change the pattern to only act on non-excluded filetypes, or just live with the fact that it's going to highlight the other windows. I'm not sure what a proper fix to this is, but it makes it very difficult to use
neo-tree
.The reason this occurs is because when a switch happens to the fuzzy finder, it invokes a
WinLeave
event which this then catches and disables thecursorlin
e for, disabling the ability to actively browse the file tree with the search window up.When I state
mostly
, there is also an issue with theinsertenter
not respecting the filetype beneath because it's setting thecursorline
green when really it's just a picker.Solution Two
The other way to fix this is to remove this single section in
disable_managed_ui
:When the above is removed it also works mostly as expected.
A potential way to "fix" this is to make a note of it in the docs and mention setting the
cursorline
to false in the setup and settingvim.opt.cursorline = true
elsewhere by the user.Solution Three
In the
modes.nvim
setup function, passingset_cursorline = false
then settingvim.opt.cursorline = true
elsewhere in the configuration works, but exited windows still keep theircursorlines
asmodes
is no longer managing theWinLeave
events to disable thecursorline
.The text was updated successfully, but these errors were encountered: