From 0c3396bd4761d833e5cec05070544e03f91d1f2e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 19 Mar 2018 20:42:17 -0400 Subject: wip vue --- .dir-locals.el | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .dir-locals.el (limited to '.dir-locals.el') 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)))) -- cgit v1.2.3