tools/direnv: only run direnv once per buffer
Halves the time direnv integration takes to initialize.
This commit is contained in:
parent
2c663ea5d4
commit
d45155aec8
1 changed files with 7 additions and 0 deletions
|
@ -28,6 +28,13 @@
|
|||
(file-remote-p default-directory))
|
||||
(envrc-mode 1))))
|
||||
|
||||
;; Ensure these local variables survive major mode changes, so envrc-mode is
|
||||
;; only "activated" once per buffer.
|
||||
(put 'envrc-mode 'permanent-local t)
|
||||
(put 'process-environment 'permanent-local t)
|
||||
(put 'exec-path 'permanent-local t)
|
||||
(put 'eshell-path-env 'permanent-local t)
|
||||
|
||||
(define-derived-mode +direnv-rc-mode sh-mode "envrc"
|
||||
"Major mode for .envrc files."
|
||||
;; Fontify .envrc keywords; it's a good indication of whether or not we've
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue