justinbarclay / parinfer-rust-mode

Simplifying how you write Lisp
https://shaunlebron.github.io/parinfer/
GNU General Public License v3.0
227 stars 16 forks source link

parinfer doesn't work for clojurescript-mode #67

Open markokocic opened 1 year ago

markokocic commented 1 year ago

When .cljs file is opened in clojurescript-mode, parinfer doesn't work. I can see in modeline that it's activated, but none of the parentheses gets automatically inserted.

When I manually switch buffer to clojure-mode, parinfer works properly.

My config:

(use-package parinfer-rust-mode :ensure t :defer t
  :hook (lisp-mode common-lisp-mode clojure-mode clojurescript-mode)
  :bind
  (("C-," . parinfer-rust-switch-mode)
   ("C-c ," . parinfer-rust-switch-mode))
  :init
  (setq parinfer-rust-auto-download t)
  :custom
  (parinfer-rust-dim-parrens t)
  (parinfer-rust-preferred-mode "smart")
  (parinfer-rust-check-before-enable 'immediate))

Example file subs.cljs

(ns iotodo.subs
  (:require
   [refx.alpha :as rf]))

(rf/reg-sub
 ::name
 (fn [db _]
   (:name db)))

Modeline in clojurescript mode: (ClojureScript parinfer:smart WK)

Modeline in clojure mode: (ClojureScript parinfer:smart WK)