I am trying to configure smartparens to work with javascript, my config looks like this:

(use-package smartparens
  :ensure t
  :diminish smartparens-mode
  :commands (smartparens-mode
    (require 'smartparens-config)
    (smartparens-global-mode 1)))

If I am writing an if statement, I cannot add certain filters like <, > and others:

If I try and type these symbols, I get this error message:

We can not insert unbalanced closing delimiter in strict mode.

Is there a way round this?

1 Answer 1


Use quoted-insert (C-q) to get around this.

E.g. C-q < inserts <.

Or, create a key binding to toggle smartparens-strict-mode off and on. This is a waste of keys IMO, but up to you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.