project.nvim icon indicating copy to clipboard operation
project.nvim copied to clipboard

autochdir (nor any other global vim opt) should not be set by this plugin

Open myarcana opened this issue 1 year ago • 5 comments

https://github.com/ahmedkhalf/project.nvim/blob/628de7e433dd503e782831fe150bb750e56e55d6/lua/project_nvim/config.lua#L60

There should at least be a config option to allow the user to turn this on or off, just like manual_mode

myarcana avatar Mar 26 '23 02:03 myarcana

Why?

ahmedkhalf avatar Mar 31 '23 02:03 ahmedkhalf

Because some people like autochdir. Is there technical reason that project.nvim must disable autochdir?

pillmuncher avatar Sep 30 '23 23:09 pillmuncher

Because some people like autochdir. Is there technical reason that project.nvim must disable autochdir?

Just had an issue in which this plugin didn't work due to enabling autochdir after the plug. It basically overwrites the project root set by the plugin each time you open a file, making the default automatic mode basically useless.

I think that the only case in which you might want to have autochdir active along with this plugin is if you're just going to use the plugin manually or if the plugin doesn't find a project root automatically. But I think this isn't the case for most users of the plugin.

javalsai avatar Jul 04 '24 16:07 javalsai

I think that the only case in which you might want to have autochdir active along with this plugin is if you're just going to use the plugin manually or if the plugin doesn't find a project root automatically. But I think this isn't the case for most users of the plugin.

This is absolutely the case for the most users of plugin. Not all files we edit belong to projects, nor should they. Sometimes it is a bunch of config files in an unusual location; this plugin silently setting noautochdir causes breaking behavior.

ekorchmar avatar Jul 19 '24 07:07 ekorchmar

I think that the only case in which you might want to have autochdir active along with this plugin is if you're just going to use the plugin manually or if the plugin doesn't find a project root automatically. But I think this isn't the case for most users of the plugin.

This is absolutely the case for the most users of plugin. Not all files we edit belong to projects, nor should they. Sometimes it is a bunch of config files in an unusual location; this plugin silently setting noautochdir causes breaking behavior.

Not gonna argue if it's the most popular case or not anyways, I still believe so. But you can just re-set it after loading the plugin?

javalsai avatar Jul 19 '24 10:07 javalsai