LuaLS / LuaLS/lua-language-server
[Feature Request] Multiple-project/Monorepo support
還沒有人認領這個 Issue。
- 主要語言
- Lua
- 星號
- 4.4k
- 分支
- 442
- PR 合併指標
- 30 天內沒有已合併 PR
描述
I work with a large monorepo that contains multiple Lua project roots. You can actually see the list of Lua projects here, as an example: https://github.com/SmartThingsCommunity/SmartThingsEdgeDrivers/tree/main/drivers/SmartThings
Loading this entire repo at once doesn't work well because of how the `require` paths are established via `runtime.path`. The primary issue is that it leads to ambiguous require resolution if two of the roots have files with the same name.
Obviously, one workaround is to use a multi-root workspace and only add the folders for the projects I currently care about, but that's tedious since I'd be adding and removing folders from the workspace constantly.
One idea that I had was being able to specify an "entrypoint" glob. The plugin could traverse up the directory tree looking for a file that matches the glob, and then use that as the root for all local requires. But that might not be a good "general" solution even though it works well for my use case.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先檢查 runtime.path 如何建立本機 require 根目錄,以及當 repository 包含多個 Lua 專案根目錄時其行為如何。issue 提出了 entrypoint glob 作為一種可能的方向,但沒有指定偏好的設計或需要修改的檔案。完成應表示可以在沒有模糊 require 解析的情況下載入 monorepo。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- lua
- 領域
- developer-experience, tooling
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 32/100