-
Contributing guidelines
Module(s)mini.extra QuestionIs it possible to use the mini.extra explorer picker without having it change cwd? For new projects, or ones I'm not as familiar with, I really like being able to browse through the project structure rather than using the files or git pickers to directly find a file. However, if I ever open a file in a subdirectory with explorer it changes the cwd, which then makes the file picker behave differently (because cwd changed). |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I can not reproduce the change in the working directory with the described steps:
Do you, by any chance, have "auto root" set up? With 'mini.nvim' it is a part of 'mini.misc' as |
Beta Was this translation helpful? Give feedback.
-
You're right! It was something else in my config. I had assumed from reading the explorer documentation ("Choosing a directory navigates inside it, changing picker's items and current working directory") that this was normal behavior. I have an autocommand that runs on BufReadPost with the goal of making buffer names relative:
That works fine with other pickers and with normal vim file open commands, but when using explorer that autocommand results in the global cwd being changed. After a bit of testing, it doesn't look like I need that autocommand. I added it a couple of years ago, but I don't recall why, so I'll just drop it. 🙂 |
Beta Was this translation helpful? Give feedback.
You're right! It was something else in my config. I had assumed from reading the explorer documentation ("Choosing a directory navigates inside it, changing picker's items and current working directory") that this was normal behavior.
I have an autocommand that runs on BufReadPost with the goal of making buffer names relative:
That works fine with other pickers and with normal vim file open commands, but when using explorer that autocommand results in the global cwd being changed.
A…