-
Notifications
You must be signed in to change notification settings - Fork 0
/
.dir-locals.el
153 lines (131 loc) · 4.9 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
(
(nil
.
((make-local-variable 'completion-ignored-extensions)
(eval . (add-to-list 'completion-ignored-extensions "elisp-autofmt-cache/"))
(eval . (add-to-list 'completion-ignored-extensions "eln-cache/"))
(eval . (add-to-list 'completion-ignored-extensions "tree-sitter/"))
(eval . (add-to-list 'completion-ignored-extensions "eglot-java-eclipse-jdt-cache/"))
(eval . (add-to-list 'completion-ignored-extensions "share/"))
(eval . (add-to-list 'completion-ignored-extensions "auto-save-list/"))
(eval . (add-to-list 'completion-ignored-extensions "\\.tags/"))
(eval . (add-to-list 'completion-ignored-extensions "\\.cache/"))
(eval .
(setq-local counsel-find-file-ignore-regexp
(regexp-opt
'
("\\(?:\\`[#.]\\)"
"\\(?:\\`.+?[#~]\\'\\)"
"__pycache__"
".elc"
".o"
".out"
"TAGS"
"GPATH"
"GRTAGS"
"GTAGS"
"tramp"
".vscode"
".metadata"
".clangd"
".cache"
"auto-save-list"
"eclipse.jdt.ls"
"session*"
"request"
"workspace"
"eglot-java-eclipse-jdt-cache"
"elpa"
"share"
"tree-sitter"
"eln-cache"
"elisp-autofmt-cache"))))
(eval .
(add-hook
'lsp-managed-mode-hook
(lambda ()
(when (derived-mode-p 'markdown-mode)
(setq sb/flycheck-local-checkers
'((lsp . ((next-checkers . (markdown-markdownlint-cli)))))))
(when (derived-mode-p 'yaml-mode)
(setq sb/flycheck-local-checkers '((lsp . ((next-checkers . (yaml-yamllint)))))))
(when (derived-mode-p 'json-mode)
(setq sb/flycheck-local-checkers '((lsp . ((next-checkers . (json-jsonlint)))))))
(when (derived-mode-p 'python-mode)
(setq sb/flycheck-local-checkers '((lsp . ((next-checkers . (python-pylint)))))))
(when (derived-mode-p 'c++-mode)
(setq sb/flycheck-local-checkers '((lsp . ((next-checkers . (c/c++-cppcheck)))))))
(when (derived-mode-p 'latex-mode)
(setq sb/flycheck-local-checkers
'((lsp . ((next-checkers . (tex-textidote . (tex-chktex))))))))
(when (derived-mode-p 'html-mode)
(setq sb/flycheck-local-checkers '((lsp . ((next-checkers . (html-tidy)))))))
(when (derived-mode-p 'xml-mode)
(setq sb/flycheck-local-checkers '((lsp . ((next-checkers . (xml-xmllint))))))))))
(eglot-workspace-configuration
.
((ltex . (:disabledRules (:en-US ["MORFOLOGIK_RULE_EN_US"])))))))
(dired-mode
.
(
(dired-omit-files
.
"\\`[.]?#\\|\\`[.][.]?\\'\\|\\.git\\'|\\.cache\\'|eln-cache|eglot-java-eclipse-jdt-cache|elisp-autofmt-cache|tree-sitter|share|elpa|\\.directory\\'")))
(emacs-lisp-mode
.
((no-byte-compile . t)
(elisp-autofmt-on-save-p . always)
(elisp-autofmt-load-packages-local . ("use-package"))
(sb/delete-trailing-whitespace-p . t)
;; The special `subdirs' element is not a variable, but a special keyword which
;; indicates that the mode settings are only to be applied in the current
;; directory, not in any subdirectories.
(subdirs . nil)))
(lisp-data-mode
.
((elisp-autofmt-on-save-p . always)
(elisp-autofmt-load-packages-local . ("use-package")) (sb/delete-trailing-whitespace-p . t)
;; The special `subdirs' element is not a variable, but a special keyword which
;; indicates that the mode settings are only to be applied in the current
;; directory, not in any subdirectories.
(subdirs . nil)))
(sh-mode . ((sb/delete-trailing-whitespace-p . t) (subdirs . nil)))
(bash-ts-mode . ((sb/delete-trailing-whitespace-p . t) (subdirs . nil)))
(yaml-mode
.
(
(eval .
(add-hook
'lsp-managed-mode-hook
(lambda () (add-hook 'before-save-hook #'lsp-format-buffer nil t))))))
(yaml-ts-mode
.
(
(eval .
(add-hook
'lsp-managed-mode-hook
(lambda () (add-hook 'before-save-hook #'lsp-format-buffer nil t))))))
(json-mode
.
(
(eval .
(add-hook
'lsp-managed-mode-hook
(lambda () (add-hook 'before-save-hook #'lsp-format-buffer nil t))))))
(json-ts-mode
.
(
(eval .
(add-hook
'lsp-managed-mode-hook
(lambda () (add-hook 'before-save-hook #'lsp-format-buffer nil t))))))
(jsonc-mode
.
(
(eval .
(add-hook
'lsp-managed-mode-hook
(lambda () (add-hook 'before-save-hook #'lsp-format-buffer nil t)))))))
;; Local Variables:
;; eval: (flycheck-mode -1)
;; End: