summaryrefslogtreecommitdiff
path: root/.dir-locals.el
diff options
context:
space:
mode:
Diffstat (limited to '.dir-locals.el')
-rw-r--r--.dir-locals.el32
1 files changed, 32 insertions, 0 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000..89ba72e
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,32 @@
+((web-mode . ((eval . (auto-fill-mode -1))
+ ;; editorconfig-mode sets web-mode-attr-indent-offset,
+ ;; which disables attribute alignment (different than
+ ;; editorconfig-mode's behavior with sgml-mode); unset
+ ;; it.
+ (web-mode-attr-indent-offset . nil)
+ ;; for consistency with vue-mode, and for compatibility
+ ;; with eslint's "indent" rule (since
+ ;; eslint-plugin-vue's "vue/script-indent" rule is
+ ;; crap).
+ (web-mode-script-padding . 0)
+ ;; turn off case-extra-offset, for consistency with js-mode
+ (web-mode-indentation-params . (("lineup-args" . t)
+ ("lineup-calls" . t)
+ ("lineup-concats" . t)
+ ("lineup-quotes" . t)
+ ("lineup-ternary" . t)
+ ("case-extra-offset" . nil)))))
+ (vue-mode . ((eval . (auto-fill-mode -1))
+ ;; editorconfig-mode doesn't correctly set
+ ;; js-indent-level, so we need to set it to match
+ ;; tab-width.
+ ;;
+ ;; Unfortunately, there's no good way to say "set one
+ ;; variable to match another variable". We'd like to
+ ;; set the js/css/sgml variables to all match whatever
+ ;; tab-width is set to, but we can't do that. So, we
+ ;; set them all to the sane value of "8".
+ (tab-width . 8)
+ (js-indent-level . 8)
+ (css-indent-offset . 8)
+ (sgml-basic-offset . 8))))