clojure-emacs / clojure-emacs/clojure-mode

Type hints affect protocol methods' indentation

Aperta
#523 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
Emacs Lisp
Stelle
1k
Fork
249
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

```clojure
;; autoindented with clojure-mode
(defprotocol Foo
(^Long omg [this]
"")) ;; there should be one extra space here
```

```clojure
;; 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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by reproducing the two defprotocol examples in clojure-mode, comparing indentation with and without the ^Long type hint. Locate the indentation entry point for protocol methods and add a regression test for both forms; done when the type-hinted form indents the docstring correctly.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
clojure, emacs-lisp
Ambito
tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.