clojure-mode icon indicating copy to clipboard operation
clojure-mode copied to clipboard

Type hints affect protocol methods' indentation

Open vemv opened this issue 6 years ago • 1 comments

The presence or absence of a type hint appears to affect the indentation that clojure-mode will emit:

;; autoindented with clojure-mode
(defprotocol Foo
  (^Long omg [this]
   "")) ;; there should be one extra space here
;; autoindented with clojure-mode
(defprotocol Foo
  (omg [this]
    "")) ;; correct indentation, achieved by removing the type hint

Checked using a quite recent version of clojure-mode, but for unrelated reasons I can't upgrade currently (or start from scratch etc). Probably this is easy enough to reproduce.

Thanks - V

vemv avatar Apr 10 '19 13:04 vemv

Just confirming that I can reproduce this. Looks like a legit bug.

Malabarba avatar Apr 13 '19 23:04 Malabarba