I'm completely new to spacemacs and emacs in general. I switched to spacemacs from vim in hopes to have better project support for non-"sibling" directories.
I am currently working with folders inside an installation of a Source Dedicated Server so there are thousands of files and folders that are out of my control and which I do not care about. Read as: Do not, will not ever want nor need to see, search or edit. I can safely pretend these files do not exist.
For context, the installation directory of my SRCDS instance is /mnt/c/dayz/
The only folders I want to see in Projectile (and neotree) are as follows:
/mnt/c/dayz/garrysmod/gamemodes/dayz
/mnt/c/dayz/garrysmod/addons/dz_chernarus
/mnt/c/dayz/garrysmod/addons/fas2-sweps
/mnt/c/dayz/garrysmod/addons/gdbc
/mnt/c/dayz/garrysmod/addons/willbox
/mnt/c/dayz/garrysmod/addons/xmod
Note that each of these directories contain a git repository in their roots.
I have tried to create a folder inside ~/projects/dayz
with an empty .projectile
file with symlinks to those folders I want (view ls output below). However, it seems symlinks are being followed to their origin and projectile/neotree automatically go "into" those projects (Editing /mnt/c/dayz/garrysmod/gamemodes/dayz/dayz.txt
will move me to the /mnt/c/dayz/garrysmod/gamemodes/dayz
project rather than keeping me within ~/projects/dayz
~/projects/dayz/ > ls
.projectile
dayz -> /mnt/c/dayz/garrysmod/gamemodes/dayz
dz_chernarus -> /mnt/c/dayz/garrysmod/addons/dz_chernarus
fas2-sweps -> /mnt/c/dayz/garrysmod/addons/fas2-sweps
gdbc -> /mnt/c/dayz/garrysmod/addons/gdbc
willbox -> /mnt/c/dayz/garrysmod/addons/willbox
xmod -> /mnt/c/dayz/garrysmod/addons/xmod
I have also considered inverting my symlinks so that the sources reside in my ~/projects
directory, which I would actually love to do, but then I ultimately end up back to my first attempted solution where it will automatically switch projects due to symlink expansion as well as break the search functionality.
Furthermore, opening the ~/projects/dayz/
project, I am unable to search the symlinked subdirectories using SPC p f
I have created the following .projectile
file in /mnt/c/dayz/
containing
+garrysmod/gamemodes/dayz
+garrysmod/addons/xmod
+garrysmod/addons/gdbc
+garrysmod/addons/willbox
+garrysmod/addons/fas2-sweps
+garrysmod/addons/dz_chernarus
+garrysmod/data/dayz-data
-*.vvd
-*.vtx
-*.phy
-*.mdl
-*.vtf
-*.vmt
-*.png
-*.gma
-*.jpg
-*.exe
-*.dll
This works to an extent. However, the +'d directories seem to take precedence over the -*'d extensions, so I still end up seeing binary files when doing SPC p f
and with the huge drawback that it has to search thousands of file and match them against the rules (which is very slow) I have another project which uses symlinks to some of the addon directories above as well, so this solution isn't much of an option.
Ideally, I would like to make my first attempted solution work (or with the inverted symlinks as mentioned) without Projectile automatically switching to them, but I have no idea where to begin.