-
Notifications
You must be signed in to change notification settings - Fork 0
/
.dir-locals.el
66 lines (57 loc) · 1.97 KB
/
.dir-locals.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
;;; .dir-locals.el
;;
;; Copy this file to your instance folder (CADDOK_BASE).
;;
;; Per-Directory Local Variables:
;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html
;;
;; prj-root --> <repo>/
;; Project's root folder is where the `.dir-locals.el' is located
;;
;; cdb-tools-root --> d:/darmarIT/cdb-tools
;; Where your cdb-tools are located
;;
;; cdb-tools-ide --> d:/darmarIT/cdb-tools/winShortcuts
;; If you have an alternative folder for the shortcuts
;;
((nil
. ((fill-column . 80)
(indent-tabs-mode . nil)
(eval . (progn
;; Where your cdb-tools are located
(setq-local cdb-tools-root
(file-name-as-directory "d:/darmarIT/cdb-tools"))
;; If you have an alternative folder for the shortcuts
(setq-local cdb-tools-ide
(file-name-as-directory "d:/darmarIT/cdb-tools/TEST"))
;; Project's root folder is where the `.dir-locals.el' is located
(setq-local prj-root
(locate-dominating-file default-directory ".dir-locals.el"))
))))
(python-mode
. ((indent-tabs-mode . nil)
(eval . (progn
(setq-local python-shell-interpreter
(concat cdb-tools-ide ".ide-powerscript.bat"))
(setq-local python-shell-interpreter-args
"--nologin")
(setq-local pylint-command
(concat cdb-tools-ide ".ide-pylint.bat"))
(setq-local pylint-rcfile
(concat cdb-tools-root ".pylintrc"))
(setq-local pylint-options
(list (format "--rcfile=%s" pylint-rcfile)
"--reports=y"
"--output-format=parseable"
(if (eq system-type 'windows-nt)
;; win needs quotation mark
"\"--msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}\""
"--msg-template='{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}'"
)
))
(setq-local flycheck-python-pylint-executable
python-shell-interpreter)
(setq-local flycheck-pylintrc
pylint-rcfile)
))))
)