Oh, it’s really disappointing to realize that CursorIDE doesn’t support multiple projects in one workspace only after subscribing to the license.
My workflow involves a library and multiple projects, and I usually work with a combination of project + library. This setup works perfectly in Visual Studio under workspaces, but here, it’s a real limitation.
If I can’t find a workaround for this, I’ll have to consider canceling my subscription.
Hi @jakob, this suggestion does not work (for me), or at least not the way I’ve implemented it. What I’ve done:
create a workspace at $HOME (~)
Create soft links mapping to the original repo eg (ln -s ~/REPO REPO_SYM_LINK_NAME)
But then it seems it says it has indexed the ~/workspace folder but it doesn’t let me @Codebase, which is confusing. When I had my first folder as my repo there were no issues despite it being a symlink (in my work setting we have to keep our code in a distributed file system called DFS, so I have a bunch of things there that I usually sym link from different the server’s local file system).
Is it my setup that is wrong? Or do I need to restart cursor? Or just this symlink trick doesn’t work.
How exactly did you implement your work around @Jakob of having a folder with all the repos one wants there? Did you literally copy paste them?
I’ve run into this issue as well and wanted to share my setup that allows me to have a workspace with multiple folders that is fully indexed and with @ references working. The only requirement is that the projects you want to open in your workspace use Git.
So, these are the steps:
Create a root directory and initialize the directory as a Git repository (in my case, I cloned a Git repository from my GitLab instance but you could also use something like git init for a local workspace. the point is that the root directory should be a Git managed directory)
Change directories to your workspace folder (you should be in the same directory as the .git directory)
Add the projects you want in your workspace as Git submodules, using git submodule add {SUBMODULE_URL}
Then, fire up Cursor IDE and start by creating a workspace from the root Git repository (if you’ve set everything up correctly, all the projects you want in your workspace are subdirectories of the root Git repository)
Add all the subdirectories in the root repository now to your workspace
This should work, since the first directory in the workspace is the root Git repository that contains all the other projects as submodules, and thus Cursor should index all the files. Crucially, the submodules are actual files and not symbolic/hard/junction links, because I’ve tried, and those do not work (I tried setting up links/junctions to the folders of the subprojects, but when I looked at the actual indexing Cursor does, it does not seem to follow any kind of link to non-physical files). So by structuring everything this way, you avoid that issue since everything is a physical file.
For example, my project structure is like this:
Workspace
Project1
Project2
etc
Then, I have all of those directories in my workspace, with the root directory being the first directory in the workspace file (which is very important, it should be the actual first entry in the workspace JSON, otherwise indexing won’t work correctly), and the subdirectories after it. Then, in the actual project/explorer view I just collapse the “Workspace” project (which should be the first in the list) and then I can use everything as normal.
I guess this approach is the same as the one mentioning to add your “Projects” directory as the root workspace directory, but a bit more explicit
The only alternative if you do not use Git to manage the projects in your workspace is to either structure it in such a way as that Cursor can index it (root folder, all projects in subdirectories), or to set up a script or something like that to copy physical files to a root folder because Cursor does not seem to index linked files (at least when I tried, feel encouraged to prove me wrong).
My problem with this is that at least in my scenario with each project folder having its own build.gradle, it’s not building correctly. The only way I could get it to work is by adding each folder to the workspace…but then Cursor doesn’t index them.