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

Keep track of current project

Open Gazareth opened this issue 2 years ago • 3 comments

As requested in #27

This brings in some changes which make switcher more responsible and keep track of the projects its opened. Some functionality is moved away from session into switcher.

I know you want to keep projections.nvim very tiny which I appreciate, however I hope you will consider that this paves the way for potential future functionalities like:

  • Being able to store multiple sessions per project and select between them (via .e.g. telescope) when opening a project

The implementation in this PR already allows some cool functionality, e.g. I am showing in my statusline that I'm inside a project:

image

Or not

image

And now a session is not overwritten when browsing a file within a workspace project that you didn't use projections.switcher to open!

Let me know if you want anything tidying up, I was treating this as a proof of concept for the majority of the time so some things might be loosely named etc.

Gazareth avatar Feb 05 '23 00:02 Gazareth

Sounds promising. Thank you for the PR. I will take a look at integrating this in a few days (am busy for a few days) 😄

One thing I noticed is - doc/projections.txt. This file doesn't need to be updated, since it is generated from README automatically.

GnikDroy avatar Feb 05 '23 13:02 GnikDroy

Sounds promising. Thank you for the PR. I will take a look at integrating this in a few days (am busy for a few days) 😄

One thing I noticed is - doc/projections.txt. This file doesn't need to be updated, since it is generated from README automatically.

Cheers for looking. I converted it to draft because I was having some trouble with some autocmds, turns out it was due to directory paths being inconsistent (darn Windows and its "\" separator).

Also added a check within the switcher to make sure the project is a valid one by reusing the workspace logic found in Session.

Gazareth avatar Feb 05 '23 21:02 Gazareth

Apologies for being a bit late. But I will take a look at this today. 😄

GnikDroy avatar Feb 21 '23 05:02 GnikDroy