dir-locals troubles

Created: Feb 27, 2021Published: Nov 01, 2022Last modified: Apr 05, 2023
No tags
Word count: 122

Setting things in dir-locals should be easier than it is.

Not everyone wants to share the dir-locals, so you .gitignore it - then you can's search for it b/c projectile ignores the .gitignores.

You need to remember this bizarre syntax (it's not evaluable elisp!)

Then you need to re-evaluate the dir-locals after changing it.

Then you get prompted about new-dir-locals whenever you enter a new file.

It's a solution but feels out-dated/ready to be made-amazing. Maybe there's an opportunity for an emacs lib here?

Solutions

Write a macro/function set-project-q that handles projects? Or some kind of projectile hook? projectile after switch project?

dir_locals is a list of lists or something

I suppose I don't know emacs data structures too well.