clojure-emacs / clojure-emacs/clojure-mode
Type hints affect protocol methods' indentation
- Vorherrschende Sprache
- Emacs Lisp
- Sterne
- 999
- Forks
- 249
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
Beitragsleitfaden
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- clojure, emacs-lisp
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100