LuaLS / LuaLS/lua-language-server

Code formatting doesn't work when plugin is used.

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

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

主要言語
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

Code formatting should work when plugin is used.

### Actual Behaviour

Code formatting doesn't work when plugin is used.

### Reproduction steps

1. Create plugin and set the appropriate settings as described here https://github.com/LuaLS/lua-language-server/wiki/Plugins
2. Use it (create some file and use custom syntax)
3. Make some ugly indentation.
4. Alt+shift+f (Format document)
5. The code has not been formatted.
![2023-06-15_12h14_03](https://github.com/LuaLS/lua-language-server/assets/36280384/446e1e24-cebf-4f1d-a762-88c64ef61d43)

### Additional Notes

As you can see the error occurs in VSC but I use LSP mainly as a server for my own client in React and the error also occurs there.

### Log File

[myLog.txt](https://github.com/LuaLS/lua-language-server/files/11756298/myLog.txt)

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

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

はじめの一歩

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

調査の方向性

まず、記載されている Visual Studio Code の手順とカスタム構文を持つプラグインを使って、失敗を再現します。React LSP client のレポートを含め、提供されている myLog.txt と動作を比較します。プラグインで定義された構文を使用するファイルに、フォーマットによって期待されるインデントが適用されれば完了です。

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

評価

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

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

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