Fork me on GitHub
#emacs
<
2021-12-29
>
cl_j00:12:23

clojure-align in emacs blocks for a few seconds, anybody knows how to solve the problem?

hindol06:12:56

Have you tried running the emacs profiler to understand which function blocks?

cl_j07:12:43

- command-execute                                                  54  61%
 - call-interactively                                              54  61%
  - apply                                                          54  61%
   - call-interactively@ido-cr+-record-current-command                 54  61%
    - apply                                                        54  61%
     - #<subr call-interactively>                                  54  61%
      - funcall-interactively                                      53  60%
       + counsel-M-x                                               36  40%
       - clojure-align                                             17  19%
        - indent-region                                            13  14%
         - lsp-format-region                                       13  14%
          + lsp-request                                             9  10%
          + lsp--apply-text-edits                                   4   4%
        + clojure--find-sexp-to-align                               3   3%
          forward-sexp                                              1   1%
      - byte-code                                                   1   1%
       - clojure-backward-logical-sexp                              1   1%
        - backward-sexp                                             1   1%
           forward-sexp                                             1   1%
+ ...                                                              27  30%

cl_j07:12:04

Don't know why lsp-format-region is there

hindol07:12:51

Here's mine. My Emacs does not block like yours. Are you using clojure-lsp alongside CIDER by the way?

hindol07:12:59

I am using Emacs with native comp by the way.

cl_j07:12:41

yes, I have both lsp and cider running

hindol08:12:40

My indent-region function does not have a reference to lsp-format-region anywhere. Maybe activating LSP adds those extra calls.

vemv08:12:12

A couple relevant defcustoms:

(setq lsp-enable-on-type-formatting nil)
(setq lsp-enable-indentation nil)

👍 2
cl_j10:12:20

@U45T93RA6 Thanks very much!