.dir-locals.el

.dir-locals.el

August 24, 2023 | permanent

tags
Emacs

Summary #

Project Local Variables in Projectile with Dirlocals ref emacs ref

Here’s an example of a `.dir-locals.el’ file:

((nil . ((indent-tabs-mode . t)
         (fill-column . 80)))
 (c-mode . ((c-file-style . "BSD")
            (subdirs . nil)))
 ("src/imported"
  . ((nil . ((change-log-default-name
              . "ChangeLog.local"))))))


;; again
((nil . ((my-project-global-variable . "the value"))))
;; nil inicates all modes


;; for setting venv at project level
((python-mode . ((pyvenv-activate . "~/.envs/invoice-env"))))
;; pyvenv-virtual-env variable shows the path

add-dir-local-variable #

M-x add-dir-local-variable

To insert .dir-locals.el


No notes link to this note

Go to random page

Previous Next