Skip to content
This repository was archived by the owner on Feb 4, 2021. It is now read-only.

Strategy 'instantly when reindenting region #50

@arximboldi

Description

@arximboldi

Hi!

First of all: thanks for developing this amazing mode: editing Lisp is so much fun now!

I am however having trouble trying to always get the strategy 'instantly to work... I would like everything to be instant, I don't care about CPU usage but I find it very confusing when the indentation does not get updated inmmediatelly. In particular, I would like to get parens immediatelly rebalanced when I reindent whole regions. Here is my config:

(use-package parinfer
  :ensure t
  :config
  (parinfer-strategy-add 'instantly
    '(parinfer-smart-tab:dwim-right
      parinfer-smart-tab:dwim-left))
  :bind
  (:map parinfer-mode-map
        ("<tab>" . parinfer-smart-tab:dwim-right)
        ("S-<tab>" . parinfer-smart-tab:dwim-left)
        ("<backtab>" . parinfer-smart-tab:dwim-left)
        ("C-," . parinfer-toggle-mode)
        :map parinfer-region-mode-map
        ("<tab>" . parinfer-smart-tab:dwim-right)
        ("S-<tab>" . parinfer-smart-tab:dwim-left)
        ("<backtab>" . parinfer-smart-tab:dwim-left))
  :init
  (progn
    (setq parinfer-extensions
          '(defaults
             pretty-parens
             smart-tab
             smart-yank))))

However, when I do <tab>, <backtab> with a region selected, the parenthesis do not update inmediatelly. I also have tried things like:

  (parinfer-strategy-add 'instantly "" "*" ".*"))

But I did not get the desired effect. Do you have any suggestions on what can I do? Is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions