Indentation of a block nested in a function call chain
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
調査の方向性
issue #251を確認し、現在のインデント動作を調べるためにphp-modeでPHPの例を再現します。ネストした呼び出しチェーン内の無名関数ブロックが、呼び出しの深さごとにインデントを増やさなくなり、示されているケースが一貫して動作すれば、変更は完了です。
索引モデルが issue の本文から書いたものです。
説明
This is maybe not so much an issue or a bug report as a request for help. Currently when we nest function calls and then put a block inside, for example an anonymous function it indents it "that many times" as there are function calls.
I also present some other modes and how they handle it so it might be worth to behave similarly.
<?php
function() {
foo(bar(function () {
return 1;
}));
foo(bar(fux(function () {
return 2;
})));
}
What I would like to have is something like
<?php
function() {
foo(bar(function () {
return 1;
}));
foo(bar(fux(function () {
return 2;
})));
}
This is also "compatible" with how js2-mode works
function foo() {
foo(bar(function () {
return 1;
}));
foo(bar(fux(function () {
return 2;
})));
}
java-mode works similarly but always indents "one step" further
class Test
{
string foo() {
foo(bar(new Interface () {
return 1;
}));
foo(bar(fux(new Interface () {
return 2;
})));
}
}
I think being consistent and not depending on the depth is a more natural way to handle the indentation even by default.
Edit: seems to be related to #251
- 主要言語
- Emacs Lisp
- スター
- 606
- フォーク
- 117
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
emacs-php/php-mode のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
emacs-php/php-mode の issue をすべて見る
似ている issue
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
melodic-software/claude-code-plugins#9619 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
fix(xiaomi): curated picker list still offers six ids that return 400 (plan-limited vs retired)オープンcause/upstream comp/cli P2 provider/other tool/file type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NousResearch/hermes-agent#143900 ·
メンテナーはふだん 1 日以内に返信
-
venn: a name that starts with set-, union-, text- or style- followed by a letter is a parse errorオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
obsidianmd/pele#65 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
keyxmakerx/Chronicle#1700 ·
メンテナーはふだん 1 日以内に返信