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

Strategy 'instantly when reindenting region #50

Open
arximboldi opened this issue Jun 28, 2017 · 1 comment
Open

Strategy 'instantly when reindenting region #50

arximboldi opened this issue Jun 28, 2017 · 1 comment

Comments

@arximboldi
Copy link

arximboldi commented Jun 28, 2017

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?

@arximboldi arximboldi changed the title Strategy 'instantly everywhere Strategy 'instantly when reindenting region Jun 28, 2017
@DogLooksGood
Copy link
Owner

Hi.

The strategy is used to make a command work properly, it's not the strategy that you can switch for different behaviours.

Currently, you cannot indent region and make it work instantly. I've try to implement that but failed:(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants