natecraddock / workspaces.nvim

a simple plugin to manage workspace directories in neovim
MIT License
309 stars 15 forks source link

option to autoload workspaces #21

Closed apmyplol closed 1 year ago

apmyplol commented 1 year ago

I added an option to autoload workspaces when starting neovim in a directory that is registered as a workspace directory. This could further be expanded by adding an autoload option to each workspace when it is being added.

This is my first time doing a pull request so please excuse me if I'm doing something wrong. (My code formater formats the code differently so there may be some formatting errors)

natecraddock commented 1 year ago

Hi! I just want to make sure I understand. The goal behind this is if you ever manually open nvim in a workspace dir, it should trigger the open hooks? If so, I think this makes sense to add.

apmyplol commented 1 year ago

Yes, exactly. Trigger the hooks and set the workspace variable because in my config there are functions that check whether the current workspace equals something or not.

natecraddock commented 1 year ago

Sorry for the delay in replying! Thank you for this contribution @apmyplol! I'll merge it and then add some documentation.

natecraddock commented 1 year ago

Also, I will change the default of this option to false in a follow up commit