DogLooksGood / parinfer-mode

Parinfer for Emacs :)
GNU General Public License v3.0
407 stars 33 forks source link

messed up setq forms in Emacs Lisp #72

Open corpix opened 4 years ago

corpix commented 4 years ago

Hello. I have tried parinfer configuration from readme and got my Emacs configuration broken 💢 . Here is an example:

-    :ensure t
-    :config
-    (add-hook 'lsp-mode-hook 'lsp-ui-mode)
-    (setq lsp-ui-doc-enable nil
-         lsp-ui-peek-enable nil
-         lsp-ui-sideline-enable nil
-         lsp-ui-imenu-enable nil
-         lsp-ui-flycheck-enable t))
+              :ensure t
+              :config
+              (add-hook 'lsp-mode-hook 'lsp-ui-mode)
+              (setq lsp-ui-doc-enable nil)
+              lsp-ui-peek-enable nil
+              lsp-ui-sideline-enable nil
+              lsp-ui-imenu-enable nil
+              lsp-ui-flycheck-enable t)
-    (setq org-caldav-calendars
-         '((:calendar-id "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx"
-                         :files ("~/org/calendar/personal.org")
-                         :inbox "~/org/calendar/personal-inbox.org")))
+              (setq org-caldav-calendars)
+              '((:calendar-id "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx"
+                              :files ("~/org/calendar/personal.org")
+                              :inbox "~/org/calendar/personal-inbox.org"))

To summarize: (setq foo bar baz qux ...) become (setq foo bar) baz qux ...

corpix commented 4 years ago

Also my racket code was hit by this bug, here is screenshot with a test-suite snippet of my project's test image

DogLooksGood commented 4 years ago

Do you use tab character in indentation?

corpix commented 4 years ago

Yes, for Emacs Lisp. I think this is default

DogLooksGood commented 4 years ago

That's a limitation for parinfer-mode, it can't process indentation with tabs.