This is all happening in a cloned git repo, it's detecting "emacs" as a project in "./foo/emacs/*" because there's a default.nix there, and it seems to be discovering the project as a nix project.
The most obvious problem is when trying to use projectile-find-file, it only looks in path/to/project/foo/emacs rather than path/to/project. If I add a .projectile file in path/to/project, that fixes it, but I'd rather not do that.
So I tried adding a projectile-update-project-type (this is the whole use-package section for completeness):
(use-package projectile
:ensure t
:init
(setq-default projectile-mode-line-prefix " Proj")
(setq-default projectile-generic-command "rg --files --hidden -0")
(setq projectile-project-search-path
'("~/code/"
"~/code/oss/"))
:config
(evil-define-key 'normal projectile-mode-map (kbd "SPC p") 'projectile-command-map)
; this uses "default.nix" files as the marker, which is wrong in larger/non-trivial nix projects,
; including my own nixfiles, so yeah. no thanks
(projectile-update-project-type 'nix :project-file nil :marker-files nil :precedence 'low)
:hook
(after-init-hook . projectile-mode))
However, it's still not working despite me doing a clear project cache. The project-types variable also seems to show that the nix project is empty.
Alternatively, is there a setting I'm missing that makes "git repo root" as the highest precedence/override for project root? I'd rather do that.
This is all happening in a cloned git repo, it's detecting "emacs" as a project in "./foo/emacs/*" because there's a
default.nixthere, and it seems to be discovering the project as a nix project.The most obvious problem is when trying to use projectile-find-file, it only looks in
path/to/project/foo/emacsrather thanpath/to/project. If I add a.projectilefile inpath/to/project, that fixes it, but I'd rather not do that.So I tried adding a projectile-update-project-type (this is the whole use-package section for completeness):
However, it's still not working despite me doing a clear project cache. The project-types variable also seems to show that the
nixproject is empty.Alternatively, is there a setting I'm missing that makes "git repo root" as the highest precedence/override for project root? I'd rather do that.