LuaLS / LuaLS/lua-language-server
Syntax highlighting issue when using plugin.lua
オープン
まだ誰も着手していません。
bug
Info Needed
- 主要言語
- 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?
Formatting, Plugins
Expected Behaviour
Syntax colouring should be preserved when using plugin.lua transformations
Actual Behaviour
I'm having an issue with syntax colouring when using plugin.lua, note the colour of the inline any annotation.

Reproduction steps
plugin.lua:
function OnSetText(uri, text)
if uri == "file:///c%3A/dev/test/annotation_test/any.lua" then
return {{
start = 15,
finish = 18,
text = " --[[@type any]]"
}}
end
Source file (note the new line)
local anything:any
-- new line --
Additional Notes
No response
Log File
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Windows 上の Visual Studio Code 拡張機能を使用して、示されている plugin.lua の OnSetText 変換と、inline any アノテーションを含む Lua ソースで問題を再現します。変換前後の構文色付けを比較し、挿入されたテキストとその後の改行の後も inline アノテーションが期待される色付けを維持していれば、問題は完了したものとします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100