Enhance DX
Opened this issue · 1 comments
ansidev commented
IMO, the current workflow needs enhancements. It would be better if
I'm not sure if my suggestions are better, however, please take a look at them (ideas come from VS Code)
Principal: Plugin should provide a default behavior, and the ability to be customized by users.
- Add configuration for automatically save new project using the current working directory or may be root git directory.
- If the user closes a project, save it automatically.
- Each project will have a default session, if the user does not create anyone.
- When run Neovim at a specific directory without file as argument, find and load the default session of the matched project depending on the working directory.
- Opening project B while working on project A should open project B in new tab. At this moment, I see that it only opens new empty buffer and change the working directory.
- If user opens the project A, and it is opening in the current Neovim session, just need to switch to the matched tab page instead of open.
- Relate to #1:
- Add mapping to display project context menu, user can press it and choose the action they want the plugin to do.
- Add action for loading sessions of the selected project.
aaditeynair commented
I was a bit busy in the last week and I couldn't block enough time to address this. I apologize for that. I can see some of these suggestions being helpful but I noticed some potential issues:
- I can see why having automatic project saving can make things easier but I have questions about its implementation. One way to do it is to just create a project for the current directory on exit. This can toggled in the plugin setup. However, what about some directories we open just for a quick edit? Neovim is used as an IDE and a lightweight text editor. Another option is to provide some sort of pattern recognition. Like all sub-directories in this folder are projects or all folders containing a
.git/
folder are projects. I feel like this might not be useful for enough people to bother creating. - Each project does have a default session called
default
. As for loading the project of the current directory, conduct provides a the commandConductLoadCwdProject
for that. - I'm assuming you're talking about vim tabs. Conduct saves the sessions for each project using vim's builtin
mksession
. This also saves the content for tabs. As far I understand, Vim tabs are meant to be used as a window multiplexer, not to separate projects or such. I think Tmux or a terminal multiplexer is more appropriate for such a thing. - I'm not sure I understand what you meant by 'context menu'. As for loading sessions, pressing
Enter
on the selected item onTelescope conduct projects
loads the project with its last opened sessions.