feat(ui): config option to override buffer switching logic#288
feat(ui): config option to override buffer switching logic#288mrcjkb wants to merge 2 commits intodmtrKovalenko:mainfrom
Conversation
9f0437f to
2835f31
Compare
|
I'd probably have a suggestion to have a function override here we might want to extend the logic with more heuristics there for example if the buffer is modifiable or not |
I removed that check because it seemed too strict to me (terminal buffers aren't modifiable, for instance). |
|
Please do not remove any checks. There are a plenty of buffers of special file types that we should never replace this is simply the worst experience when your file opens in the sidebar which is always happens to snacks nvim for example |
Do you have an example? |
|
https://github.com/hedyhli/outline.nvim I use this one personally |
|
Hmm, how about keeping the behaviour as is and adding a config option to disable it altogether? Or a config option to override the behaviour with a function? |
|
Yeah that’s what I’m saying you can make a function that overrides the existing one without changing the behavior |
2835f31 to
69f840c
Compare
|
Done. I moved the logic for finding a suitable window to the config module. That might not be the best place - perhaps you'd want a hooks module or something. |
80abd24 to
85b432a
Compare
d613c43 to
ce78633
Compare
This is my suggestion to fix #287.