diff options
| author | man.lu <man.lu@sophgo.com> | 2023-01-05 12:55:23 +0000 |
|---|---|---|
| committer | jixiuf <jixiuf@qq.com> | 2023-01-30 10:45:31 +0800 |
| commit | ac10a67daf23b99c07d38198bcfb268aa432dfa1 (patch) | |
| tree | b7578f2c10d375ee522b86380c604bb477165512 | |
| parent | 36f6963044d09d65b585895b64e1d06507b109ed (diff) | |
config vterm-environment in dir_locals
The environment of each project may be different, and "dir_locals.el" provides
an excellent way to configure each project separately. This patch enables config
project environment by using "vterm-environment."
| -rw-r--r-- | vterm.el | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -670,6 +670,11 @@ Exceptions are defined by `vterm-keymap-exceptions'." (let ((font-height (expt text-scale-mode-step text-scale-mode-amount))) (setq vterm--linenum-remapping (face-remap-add-relative 'line-number :height font-height)))) + (hack-dir-local-variables) + (let ((vterm-env (assq 'vterm-environment dir-local-variables-alist))) + (when vterm-env + (make-local-variable 'vterm-environment) + (setq vterm-environment (cdr vterm-env)))) (let ((process-environment (append vterm-environment `(,(concat "TERM=" vterm-term-environment-variable) |
