emacs

Consider also joining #cider, #lsp and #inf-clojure, where most of the tool-specific discussions are happening.
practicalli-john 2021-06-02T10:25:54.026200Z

@caumond Using LSP the variable lsp-enable-on-type-formatting t will format while typing as ag mentioned, use a clojure-mode hook to add aggressive-indent-mode (add-hook 'clojure-mode-hook #'aggressive-indent-mode) Do not use both of these together unless you want to see Emacs will go crazy :)

agilecreativity 2021-06-06T22:28:23.030400Z

e.g I have the following rules in project.clj and I want aggressive-indent to use it I format the code via indent-region

:cljfmt
  {:remove-surrounding-whitespace? true
   :remove-trailing-whitespace? true
   :remove-consecutive-blank-lines? true
   :insert-missing-whitespace? true
   :align-associative? false
   :split-keypairs-over-multiple-lines? true
   :remove-multiple-non-indenting-spaces? true
   :indents {async [[:inner 0]]}}

practicalli-john 2021-06-07T00:11:13.030600Z

I haven't found a way to make aggressive-indent work with LSP format as you type. It seems to be one or the other. When cljfmt supports aligning of argument forms, then aggressive-indent shouldn't be needed.

practicalli-john 2021-06-07T00:13:12.030800Z

There is an issue around this on cljfmt and @lee is kindly looking at ways to add this feature

πŸ‘ 2
lread 2021-06-07T11:48:14.033800Z

@agilecreativity the here’s https://github.com/weavejester/cljfmt/issues/36 and there has been some discussion in #cljfmt too. Input and ideas are welcome.

πŸ‘ 1
blak3mill3r 2021-06-08T00:39:55.034300Z

If aggressive-indent-mode could be configurable to the degree that it would match cljfmt or the nrepl-middleware that cider et al use to format code, it would help allow people (me) to continue using it in the context of a larger project with other people who aren't using aggressive-indent-mode

πŸ‘ 1
blak3mill3r 2021-06-08T00:41:06.034500Z

I personally love aggressive-indent-mode but if not everybody on the team is using it, and the various formatting tools disagree about how to format the code, the result is so expensive that I feel like I have to accept that I cannot have my preference

πŸ‘ 1
agilecreativity 2021-06-09T16:15:00.043100Z

I want the same thing and I really like aggressive-indent-mode and wish I can customize it to make it produce the same output as cljfmt so the same rules can be used with other team member.

caumond 2021-06-02T11:26:19.027100Z

That's it, aggressive indent mode

caumond 2021-06-02T11:27:55.027900Z

thank you very much !