0

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
             smartparens-strict-mode)
  :config
  (progn
    (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?

3

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, privacy policy and cookie policy

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