Indenting deftype with metadata on method implementations is inconsistent

オープン
#603 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
clojure, emacs-lisp
領域
tooling

調査の方向性

まず、Emacs 27.2 の clojure-mode で提供された deftype の例を再現し、次にメソッド実装とメタデータのインデント処理を追跡します。do-thing と do-thing2 の下の本体フォームが一貫したインデントになり、通常の deftype のフォーマットが維持されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug indentation

Expected behavior

Indenting deftype forms should be consistent (and ideally aesthetically pleasing)

Actual behavior

Method implementations with attached metadata in deftype seem to be indented as if they were common lists, instead of method implementations

Steps to reproduce the problem

Try to indent:

(deftype MyType []
  MyProtocol
  (do-thing []
    :indented)
  (^:meta do-thing2 []
   :not-indented))

(And notice it stays as-is, with :indented and :not-indented being indented inconsistently)

Environment & Version information

clojure-mode version
clojure-mode (version 5.13.0)
Emacs version

GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)

Operating system

GNU Guix System

主要言語
Emacs Lisp
スター
1k
フォーク
249
平均マージ
1日 6時間
マージ済み PR(30日)
6

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

clojure-emacs/clojure-mode のほかの issue

clojure-emacs/clojure-mode の issue をすべて見る

似ている issue

DevTools の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。