LuaLS / LuaLS/lua-language-server

`Lua.runtime.nonstandardSymbol` value not being properly copied from addon `config.json` to workspace `.vscode/settings.json`.

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

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

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

説明

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

Visual Studio Code Extension (sumneko.lua)

### Which OS are you using?

Windows

### What is the issue affecting?

Libraries

### Expected Behaviour

`Lua.runtime.nonstandardSymbol` from addon's `config.json` should be correctly copied to `.vscode/settings.json`.

### Actual Behaviour

Only the LAST element of the addon's `Lua.runtime.nonstandardSymbol` array is being copied to `.vscode/settings.json` `Lua.runtime.nonstandardSymbol` array.

**Example**:

Input `addon/library/config.json`:

```
{
"name": "BWLua",
"words": ["--bwlua"],
"settings": {
"Lua.runtime.version": "Lua 5.1",
"Lua.runtime.special": {},
"Lua.runtime.builtin": {
"os": "disable",
"package": "disable",
"io": "disable",
"utf8": "disable",
"jit": "disable",
"debug": "disable",
"coroutine": "disable"
},
"Lua.runtime.nonstandardSymbol": ["`", "+=", "-=", "*=", "/=", "^=", "continue"]
}
}
```

Output `.vscode/settings.json`

```
{
"Lua.runtime.nonstandardSymbol": [
"continue"
],
"Lua.runtime.builtin": {
"io": "disable",
"utf8": "disable",
"debug": "disable",
"coroutine": "disable",
"package": "disable",
"os": "disable",
"jit": "disable"
},
"Lua.runtime.version": "Lua 5.1",
"Lua.workspace.library": [
".../LuaAddons/bwlua-language-addon/library"
]
}
````

Expected `"Lua.runtime.nonstandardSymbol"` value is: ```["`", "+=", "-=", "*=", "/=", "^=", "continue"]```

### Reproduction steps

1. Create an addon config at `addon/library/config.json` where `"Lua.runtime.nonstandardSymbol"` has an array with `>1` entries.
2. Enable addon in new workspace.
3. Observe `.vscode/settings.json`.

### Additional Notes

_No response_

### Log File

_No response_

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

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

はじめの一歩

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

調査の方向性

まず addon/library/config.json の入力を再現し、生成された .vscode/settings.json と比較します。Lua.runtime.nonstandardSymbol のアドオン設定の転送を追跡し、その後、すべての配列要素がワークスペース設定の出力に保持されていることを確認します。

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

評価

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

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

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