-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thoughts on new features #59
Comments
I think a good chunk of what I was hoping to do has already by done after looking at #55 in more detail. I'll focus instead on the smaller issues I've noticed. Thanks @jedrzejboczar and @awerebea for all your effort! |
A proposed extension to the load last CWD session feature; instead of just matching CWD to session filename, find the most recent session for the CWD based on the CWD inside the JSON, ignoring filename. This will allow for custom named sessions to also support the load last CWD session feature. |
Thanks for detailed suggestions! As for 4. I described some potential initial implementation in #17 but this would need more work. As for the minor ones not related to #55, they are valid issues that we may want to address, but it's probably better to focus on #55 first and then we can revisit those. |
Another suggestion! Session Autoload should not run if command line arguments were passed specifying a file/s or directory. |
I agree. There a number of changes to autoload currently being worked on as part of #63. I'll have a look at the current behaviour and make adjustments as needed. Thanks for the reminder on this. |
@Kruziikrel13 to be clear on your suggestion, if you pass a folder to Neovim on the command line, and a session exists for that directory, you would expect the session to NOT autoload? It definitely shouldn't if you pass just files, but what about a single directory? Could you explain why you think it should not autoload, or your use case? It would be helpful to know people's perspectives on this behaviour. |
Imo it should not autoload if you pass anything, regardless if it's file or directory. I often pass a directory to start neovim and open the directory listing in oil.nvim (some use netrw). Basically, I feel like it should work like startup screens (alpha.nvim, dashboard.nvim) that only open if you don't pass anything on the command line. |
Sounds good, let's go with that. It matches what @Kruziikrel13 suggested, and it's also the simplest implementation. Passing args to Neovim is not a use case of mine, so I have no real solid opinions either way. |
Completed in #63 |
I've been looking for a sesssion manager that does what I want but haven't yet found an ideal one. This project is appealing because of the use of JSON and so the possibility to save additional data, but it's lacking some features I would like. The purpose of this issue is to outline features I'd like to (try) and add, and see if they are a good fit or would be accepted, before I start too much work on them.
I actually think that this is the bare minimum to make this more useful to me. There are some further enhancements that might be nice:
The current auto save tmp is limited to a single session. It might be useful to have this per CWD. Edit: looks to be implemented by URL-encoded session names #55
Related to 2, I think I'd prefer the auto session save to not happen every CWD, but only in certain folders (notably those with a .git folder present). [Current workaround: manually save a session on start up, and then the auto cwd load from 1. above (when implemented) will always restore it]. Edit: This looks to be doable via the
fun(): boolean
option tocwd
autosave. Nice!Some integration with git branch names might be nice, but I'm not currently using Neovim enough in this context to have strong opinions on how exactly this should work.
Some other more minor issues I've noticed that I'd like to look at:
tmp session file will overwrite each other if 2 vim instances are running. I'm not actually sure what to do about this issue at present. A tmp file per CWD might be enough to avoid most issues here.
__last__
symlink will point to invalid file if session is removed via telescope. I think there is a better way to ascertain the last session than by using symlinks (idea stolen from nvim.possession), which removes some complexity. A similar method can probably used to help implement 1.when trying to save session, if no session is open, prompt for name instead of displaying error if no name is initially provided.
I can make separate issues for the minor issues as I work on them, if desired.
The text was updated successfully, but these errors were encountered: