neovim-session-manager icon indicating copy to clipboard operation
neovim-session-manager copied to clipboard

Feature Request: Enable / Disable based on configurable directory paths?

Open erwin opened this issue 3 years ago • 7 comments

Describe the problem or limitation you are having I tend to have a few different modes for my neovim usage... Development mode --- cd to project directory, edit files, neovim-session-manager currently works great in this context

However, when I'm editing config files, sometimes the session manager gets in the way.

For example...

cd ~
nvim .config/nvim/init.nvim
# now my session for ~ is nvim/init.vim
# :wq
nvim .config/kitty/kitty.conf
# now my session for ~ is kitty/kitty.conf

In this example, there's no connection between nvim's init.vim or kitty's kitty.conf, yet I still will have a session pointing somewhere that's not necessary relevant.

Describe the solution you'd like

I would like an option to set a list of paths that must match the current path before neovim-session-manager activates.

For example, I would like the session manager to be active for any subfolder of ~/Dev

I would like the session manager to be disabled completely for /etc and ~/.config

Describe alternatives you've considered

It's workable now... This just would be a usability enhancement from my perspective. In fact, I think for most users disabling the session for ~, ~/.config, /etc would be a helpful default behavior.

erwin avatar Nov 16 '21 16:11 erwin

I found the current behavior useful because the plugin is more like "recent directories" than "recent projects". But I would not mind if someone sends PR for what you described.

Shatur avatar Nov 16 '21 16:11 Shatur

+1 - I could really use this functionality, for disabling ~, etc.

dsully avatar Jan 30 '22 00:01 dsully

Same, my only issue currently with this plugin is not being able to disable it for ~

JulesNP avatar Oct 17 '22 03:10 JulesNP

I have pull request #59 pending to implement a solution for this requested feature. @Shatur, could you have a look at integrating it?

JulesNP avatar Nov 07 '22 00:11 JulesNP

@JulesNP I did and left a review. Please, resolve it and I will merge it.

Shatur avatar Nov 07 '22 08:11 Shatur

Hi @Shatur, I'm not seeing any review on #59, could you be thinking of the other pull request you have?

JulesNP avatar Nov 08 '22 02:11 JulesNP

Oh, sorry, I forgot to press "Send" :smile: I did it 20 days ago. Thanks for noticing me.

Shatur avatar Nov 08 '22 08:11 Shatur