You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my opinion, the user experience of loading project files can be significantly improved. Currently, if you want to load a project outside the global project dir (perhaps you keep the project in VCS), you need to exec focus from the CLI in a dir containing a .focus-config. This is cumbersome, and it would be nice to be able to load these files directly from focus without needing the terminal. It would also be nice to keep a list of recently loaded project files that may be located across the system for quick access. This change would remove the need for a global project directory since projects can be referenced "globally" via the filesystem, or quickly via the "recents" menu.
With these changes, it would also be very handy to reference files/directories inside a project relative to the project file, instead of needing to specify an absolute path. This would apply to [[workspace]], [ignore], [allow], and [[build commands]].
Modified commands:
"Switch To Project": Instead of searching the global projects folder, prompt user to find a file with a .focus-config extension. If the file is a valid project file, load it, and push the name, and path to a recent-projects.txt. If that project was already in the recents list, move it to the top of the list.
New commands:
"Switch to recent project": Displays a list of recent project names (and perhaps their path) specified in recent-projects.txt. Loading a project will always move it to the first position in the list, displaying it first in subsequent calls to the "switch to recent project" command.
"Clear recent projects": Clears list of recent projects.
New options for global config:
open_recent_project_on_launch - Boolean that would determine if focus should load the most recent project in the recent list on program init.
Changes to project config:
Add a %PROJECT_CWD% variable, which would resolve to the directory of the project file. This would allow for configuration relative to the project file for build commands, and ignore/allow dirs.
Obviously any commands that utilize the 'recent file' will attempt to access/modify a file on disk, so an error message would need to display if the file is inaccessible.
The text was updated successfully, but these errors were encountered:
Yes! The only thing I would add to this is the ability to load a project from a directory containing a .focus-config via the editor itself, and not the CLI.
Somebody in the discord suggested the following: Add a dialog that allows you to open a directory. If that directory contains a .focus-config, load that project. If the selected directory is NOT a project, set that directory to the current workspace as if you launched focus via the cli with that directory as an argument.
Otherwise these changes have been really nice and I'm glad that they were added. Thank you.
(Similar issue to #360)
In my opinion, the user experience of loading project files can be significantly improved. Currently, if you want to load a project outside the global project dir (perhaps you keep the project in VCS), you need to exec focus from the CLI in a dir containing a
.focus-config
. This is cumbersome, and it would be nice to be able to load these files directly from focus without needing the terminal. It would also be nice to keep a list of recently loaded project files that may be located across the system for quick access. This change would remove the need for a global project directory since projects can be referenced "globally" via the filesystem, or quickly via the "recents" menu.With these changes, it would also be very handy to reference files/directories inside a project relative to the project file, instead of needing to specify an absolute path. This would apply to
[[workspace]]
,[ignore]
,[allow]
, and[[build commands]]
.Modified commands:
.focus-config
extension. If the file is a valid project file, load it, and push the name, and path to arecent-projects.txt
. If that project was already in the recents list, move it to the top of the list.New commands:
recent-projects.txt
. Loading a project will always move it to the first position in the list, displaying it first in subsequent calls to the "switch to recent project" command.New options for global config:
open_recent_project_on_launch
- Boolean that would determine if focus should load the most recent project in the recent list on program init.Changes to project config:
%PROJECT_CWD%
variable, which would resolve to the directory of the project file. This would allow for configuration relative to the project file for build commands, and ignore/allow dirs.Obviously any commands that utilize the 'recent file' will attempt to access/modify a file on disk, so an error message would need to display if the file is inaccessible.
The text was updated successfully, but these errors were encountered: