Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Projectile can't recognise custom project type #1872

Open
orest58008 opened this issue Jan 5, 2024 · 5 comments
Open

Projectile can't recognise custom project type #1872

orest58008 opened this issue Jan 5, 2024 · 5 comments

Comments

@orest58008
Copy link

Expected behavior

Projectile switching to projectile:dub in directories containing dub.sdl or dub.json

Actual behavior

Projectile doesn't switch to projectile:dub and instead is projectile:dotnet-sln (as in all projects with src/ and not under any project type)

Steps to reproduce the problem

  1. Configure the type:
  (projectile-register-project-type 'dub '("dub.json" "dub.sdl")
									:project-file '("dub.json" "dub.sdl")
									:src-dir '("src/" "source/")
									:compile "dub build"
									:run "dub run"
									:test "dub test")
  1. Go into a directory containing dub.sdl or dub.json
  2. Don't get dub project type

Environment & Version information

Projectile version information

Projectile 2.8.0

Emacs version

29.1

Operating system

Arch Linux

@orest58008
Copy link
Author

Entire init.el if something outside the project registration affects it:
https://pastebin.com/zxCZqPjF

@LaurenceWarne
Copy link
Contributor

Does:

(projectile-update-project-type 'dub :precedence 'high)

Make projectile pick up the expected project type?

@orest58008
Copy link
Author

Unfortunately, it does not

@pesterhazy
Copy link

pesterhazy commented Jun 6, 2024

In case someone may be helped by this in the future, this is what allowed to me hard-code a project type

In .dir-locals.el

((nil . ((projectile-project-type . go))))

@pesterhazy
Copy link

where go could be any of the values in this list

(projectile-register-project-type 'haskell-cabal #'projectile-cabal-project-p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants