The workspace is a list of directories which are part of your project.
The workspace affects features like global search, the file selector etc. These will show/search files in all workspace directories.
Every time you open the editor it will create a workspace. By default this will be the current working directory. If a session is opened then the session defines the workspace instead.
To add directories to your workspace you can either edit the session file or use the virtual file system explorer (see below).
When you add a directory to your workspace then it will be mounted in the VFS under a prefix like ws0:// (each directory has a distinct number).
If you edit a session file while you have that session open then your changes will be overridden when you close Nev
Here is an example from a session file. You can add directories to "additionalPaths":
{
// ...
"workspaceFolder": {
"name": "My workspace", // Name, can be anything
"settings": {
"path": "/some/path", // Primary workspace folder
"additionalPaths": [ // Additional folders which are available for e.g. choose-file command
"/some/other/path"
]
}
}
}To add a directory to your workspace:
- Open the vfs explorer using either the command
explore-filesor by pressingSPACE gv - Navigate to the directory you want to add to your workspace and select it using
C-pandC-n - Press
C-ato add the selected directory to your workspace
To remove a directory from your workspace:
- Open the VFS explorer
- Select the workspace you want to delete (workspace folders look like
ws0,ws1etc) - Press
C-x