Skip to content

use with craftos-pc indexes PC root dir #2317

@checkraisefold

Description

@checkraisefold

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions