LuaLS / LuaLS/lua-language-server

`space_around_table_append_operator` actual effect is inverse of expected in `.editorconfig` in IntelliJ on macOS

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

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

主要言語
Lua
スター
4.4k
フォーク
442
PR マージ指標
30日以内にマージされた PR はありません

説明

### How are you using the lua-language-server?

Other

### Which OS are you using?

MacOS

### What is the issue affecting?

Formatting

### Expected Behaviour

`space_around_table_append_operator` setting to boolean true in `.editorconfig` expect `t[#t + 1] = 1`, instead of `t[#t+1] = 1`.

### Actual Behaviour

Inverse occurs. If boolean true, no space is added. If boolean false, space is added.

### Reproduction steps

1. In `.editorconfig`
2. Set `space_around_table_append_operator = true` under `[*.lua]`
- This follows the schema of [EmmyLuaCodeStyle](https://github.com/CppCXY/EmmyLuaCodeStyle)
3. Format a .lua file with:
```lua
t[#t+1] = 1
t[#t + 1] = 1
```
Output is inverse of what is expected:
```lua
t[#t+1] = 1
t[#t+1] = 1
```
Expected:
```lua
t[#t + 1] = 1
t[#t + 1] = 1
```

### Additional Notes

_No response_

### Log File

`SumnekoLua (3.15.0.46-IDEA243)`
I don't know where to get the Sumneko log file on IntelliJ.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

.editorconfig の [*.lua] セクションから始め、報告されている Lua ファイルの入力と設定を使って、macOS 上の IntelliJ でフォーマットを再現します。space_around_table_append_operator がどのように解釈されるかを追跡し、その後、true と false が文書化されたスペースの動作を生成することを検証します。

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

評価

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

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

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