1

I'm new to DOOM emacs and try to get used to projectile.

I found how to set the project name by using .dir-locals.el, which can be done by

((nil . ((projectile-project-name . "PROJECT-NAME")))).

However, the problem is that when I want to switch project to other projects, the project list shows the path of the project instead of its name.

I couldn't find any solutions about this.

Are there ways to list the project by its name (I couldn't understand why projectile use the path of the project instead of its name although the name is more intuitive)?

1

Projectile only uses the project name to display in the modeline of files that are part of the project. Usually the project name is taken from the final path element of the path to the project root.

Moreover, the .dir-locals.el file is not loaded in advance; it is only loaded after you open a file in that directory or subdirectory. It only tells Projectile the name of the current project, not the names of any other projects you might happen to have.

Finally, you can organize projects on your system in any way you would like. Projectile doesn’t know where they will be located, or how you are going to group them.

Therefore it asks you for a path to the project when you want to open one. Alternatively, you can simply open any file directly; Projectile will check to see if the file is located within any type of project that it recognizes. See the documentation for how it recognizes a project when you open a file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.