LuaLS / LuaLS/lua-language-server

use with craftos-pc indexes PC root dir

未关闭
#2,317 16 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
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?

Other

Expected Behaviour

not index every file on PC by recursively going through root dir

Actual Behaviour

accepts / as valid workspace directory, causing every file on my PC to be indexed

the fix done for #2159 seems to be incorrect - it should not index every file on my PC if I have a CraftOS workspace open. if it can't support the virtual filesystem, it should just ignore it. instead the extension is completely unusable in this configuration when trying to use craftos remote, even with attempting to override the force-accept-workspace parameter to false on user-level in vscode preferences. (maybe this is ignored for some reason? it's defaulted to true so would make sense)
not sure if this is an issue to be made on the vscode-lua extension or the LSP itself!

Reproduction steps
  1. Use CraftOS-PC in a project, and connect to a remote computer in Minecraft
  2. With the vscode-lua extension enabled, watch as every Lua file on PC is indexed because the root dir for the VFS is technically /
Additional Notes

No response

Log File

No response

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

按照列出的步骤,在启用 sumneko.lua Visual Studio Code 扩展的情况下复现 CraftOS-PC 远程工作区案例。首先跟踪虚拟文件系统根目录 /force-accept-workspace 设置的处理方式,然后验证打开此工作区时不再递归索引主机 PC。

由索引模型根据 Issue 内容生成。

评估

技术栈
lua, vscode
领域
developer-experience, tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。