LuaLS / LuaLS/lua-language-server
Adding a new workspace folder breaks things
まだ誰も着手していません。
- 主要言語
- Lua
- スター
- 4.4k
- フォーク
- 442
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
How are you using the lua-language-server?
NeoVim
Which OS are you using?
Windows
What is the issue affecting?
Completion, Diagnostics/Syntax Checking, Hover, Libraries
Expected Behaviour
Addding new workspace folders should not break anything.
Actual Behaviour
Right now, adding a new workspace folder breaks two things, diagnostics and require statements:
-
You can fix the diagnostic errors by hooking to the
workspace/diagnostic/refreshhandler to manually refresh it, but even then this is very unreliable and prone to not working:
https://github.com/neovim/nvim-lspconfig/issues/2366 -
requirestatements that refers to modules in the new workspace folder also does not resolve correctly (hovering over the module string will display the byte length, instead of the resolved path). This means that completions from the required module will also be missing. So far I can't find any way to fix this without restarting neovim entirely.
Other LSP servers doesn't have this problem. Adding a new workspace folder should just work without any additional steps.
Reproduction steps
- Initialize the LSP server with a root directory
- Add a new workspace folder using
workspace/didChangeWorkspaceFolders - Opening a file from that workspace folder results in diagnostic errors and modules not being resolved correctly
Additional Notes
No response
Log File
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、報告された手順を再現します。ルートディレクトリで初期化し、workspace/didChangeWorkspaceFolders を送信して、追加したフォルダー内のファイルを開きます。その後、workspace/diagnostic/refresh と require モジュールの解決がどのように動作するかを調査します。新しいワークスペースで、Neovim を再起動したり手動で更新したりせずに、診断、ホバーパス、補完が機能すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua, neovim
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100