Skip to content

Setting options to customize cljfmt does not take effect #3209

Open
@laheadle

Description

@laheadle

Expected behavior

Setting the option to customize the behavior of cljfmt should take effect by customizing that behavior.

Actual behavior

Setting the option to customize the behavior of cljfmt has no effect.

Steps to reproduce the problem

I have set:

(setq cider-format-code-options
        '(("remove-consecutive-blank-lines?" t)
          ("remove-multiple-non-indenting-spaces?" t)))

And inside this file I have run cider-format-buffer:

(ns temporale.network.test-format)

(def my-map {:a :b :c      :d})

I would expect this file to be reformatted like this

(ns temporale.network.test-format)

(def my-map {:a :b :c :d})

But instead nothing has changed.

I reported this issue on slack a couple of weeks ago and yuhan replied:
This appears to be a bug, the cider--nrepl-format-code-request-map function returns an empty dict

Environment & Version information

CIDER version information

;; CIDER 1.4.0 (Kyiv), nREPL 0.9.0
;; Clojure 1.10.2, Java 1.8.0_332

Emacs version

27.1

Operating system

A pretty recent ubuntu

JDK distribution

openjdk 1.8.0_332

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions