Skip to content
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

Feat: sessions added to startify page #268

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zhengrc19
Copy link

@zhengrc19 zhengrc19 commented Feb 26, 2024

TLDR: Looks if neovim-session-manager is installed and if there are saved sessions. If both suffice, a new list of sessions is added on top of MRU CWD and MRU in the startify theme. This is supposed to solve #51 and #72.

Checks for installation of neovim-session-manager in lua/alpha/themes/startify.lua:162.

Creates buttons (with optional icons) according to the session filenames lua/alpha/themes/startify.lua:164-202.

Changes the numerical shortcuts according to number of sessions found in lines lua/alpha/themes/startify.lua:229,243.

Adds sessions to section in lua/alpha/themes/startify.lua:212, and adds this section.sessions to config.layout in lua/alpha/themes/startify.lua:267.

The icons are turned off by default, configured in lua/alpha/themes/startify.lua:61.

P.S. This is my first PR ever so if there are any bad practices please point them out to me. Thanks!

@zhengrc19 zhengrc19 changed the title Feat: sessions added to startify page (#51, #72) Feat: sessions added to startify page Feb 27, 2024
@itamark-targa
Copy link

itamark-targa commented Apr 2, 2024

@zhengrc19 Thanks! very helpful, that's the 1 feature I was really missing moving from vim to nvim.
I have a question - is there a way to have sessions saved based on named-session, and not based on a directory? my sessions are just group of files related to a single task/project, so saving based on directory is less convenient.

== EDIT === - never mind, I found out that the original "startify" plugin for Vim works also for Neovim, so that solves all of my problems :)

@zhengrc19
Copy link
Author

@zhengrc19 Thanks! very helpful, that's the 1 feature I was really missing moving from vim to nvim. I have a question - is there a way to have sessions saved based on named-session, and not based on a directory? my sessions are just group of files related to a single task/project, so saving based on directory is less convenient.

== EDIT === - never mind, I found out that the original "startify" plugin for Vim works also for Neovim, so that solves all of my problems :)

Hey @itamark-targa thanks for reaching out! Yes in fact I was using vim-startify on Neovim for quite a while and it definitely has all these features implemented. I see if I can implement the session naming feature into alpha-nvim in the future. Do you know how vim-startify does this, does it even utilize neovim-session-manager?

@goolord
Copy link
Owner

goolord commented Apr 4, 2024

vim-startify basically implements its own session management plugin, which is something i intentionally didn't include in alpha

@goolord
Copy link
Owner

goolord commented Apr 4, 2024

i think i like this solution, i'll have to test it / see how it impacts statup times and such

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants