summaryrefslogtreecommitdiff
path: root/.dir-locals.el
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-06-05 20:36:03 +0200
committerGitHub <noreply@github.com>2021-06-05 20:36:03 +0200
commit5f76238d5cd6f9c850d5237fe639ba2900fd3e6c (patch)
tree493c7747d2a2156b99f25541425f7de545ca7599 /.dir-locals.el
parentfb6dd416e5d3609037d04e58d34fc375c450c4d5 (diff)
parent6b9633098d6ac3bc2038d11748ebf9f67c591cf2 (diff)
Merge pull request #105 from return42/yaml
[enh] add test.yamllint - lint yaml files
Diffstat (limited to '.dir-locals.el')
-rw-r--r--.dir-locals.el40
1 files changed, 22 insertions, 18 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
index 6daf66591..23609b4d2 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -50,37 +50,41 @@
((nil
. ((fill-column . 80)
(indent-tabs-mode . nil)
- ))
- (makefile-gmake-mode
- . ((indent-tabs-mode . t)
- ))
- (python-mode
- . ((indent-tabs-mode . nil)
-
;; project root folder is where the `.dir-locals.el' is located
(eval . (setq-local
prj-root (locate-dominating-file default-directory ".dir-locals.el")))
-
(eval . (setq-local
python-environment-directory (expand-file-name "./local" prj-root)))
-
;; use 'py3' enviroment as default
(eval . (setq-local
python-environment-default-root-name "py3"))
-
(eval . (setq-local
python-shell-virtualenv-root
- (concat python-environment-directory
- "/"
- python-environment-default-root-name)))
-
- ;; python-shell-virtualenv-path is obsolete, use python-shell-virtualenv-root!
- ;; (eval . (setq-local
- ;; python-shell-virtualenv-path python-shell-virtualenv-root))
-
+ (expand-file-name python-environment-default-root-name python-environment-directory)
+ ))
(eval . (setq-local
python-shell-interpreter
(expand-file-name "bin/python" python-shell-virtualenv-root)))
+ ))
+
+ (makefile-gmake-mode
+ . ((indent-tabs-mode . t)
+ ))
+
+ (yaml-mode
+ . (
+ ;; flycheck should use the local py3 environment
+ (eval . (setq-local
+ flycheck-yaml-yamllint-executable
+ (expand-file-name "bin/yamllint" python-shell-virtualenv-root)))
+ (eval . (setq-local
+ flycheck-yamllintrc
+ (expand-file-name ".yamllint.yml" prj-root)))
+ (flycheck-checker . yaml-yamllint)
+ ))
+
+ (python-mode
+ . ((indent-tabs-mode . nil)
(eval . (setq-local
python-environment-virtualenv