Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rootUri is incorrect in VS Code extension #2159

Closed
Hddnsquid opened this issue Jun 10, 2023 · 6 comments
Closed

rootUri is incorrect in VS Code extension #2159

Hddnsquid opened this issue Jun 10, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@Hddnsquid
Copy link

I am not sure if I have done something wrong, but I have this error in VSCode:

Your workspace is set to \. Lua language server refused to load this directory. Please check your configuration.learn more here

@carsakiller
Copy link
Collaborator

Hello, can you share the server log, so we can review the rootURI and software versions.

@Hddnsquid
Copy link
Author

Hey, yes sure, I tried to find it before with the path : %homepath%.vscode\extensions\sumneko.lua-X.X.X\server\log\ . However, it cannot be found?

@Hddnsquid
Copy link
Author

apologies, installed .vscode to the wrong place, still having the issue but found the server log
service.log

@carsakiller
Copy link
Collaborator

carsakiller commented Jun 12, 2023

This is likely due to one of your workspaces being a ComputerCraft computer:

workspaceFolders = {
  {
    name = "ComputerCraft",
    uri = "file:///c%3A/Users/harry/OneDrive/Desktop/ComputerCraft",
  },
  {
    name = "Computer 0",
    uri = "craftos-pc://0/",
  },
}

The path for the computer is technically / (root). If you open a directory on the computer, that should at least fix this temporarily.

The proper solution would probably be to not throw this error when the scheme is not file://. when there aren't that many files.

@carsakiller carsakiller added the bug Something isn't working label Jun 12, 2023
@Hddnsquid
Copy link
Author

I seem to have fixed it last night. I created a new workspace since I wanted to do more than just the ComputerCraft as I am just getting back into coding. However, that new workspace has now fixed it I think? I will post the new Service.log

service.log

@Hddnsquid
Copy link
Author

As well as in the service.log ComputerCraft is no longer there but is still able to be used, I think this now works but unsure if it is a temporary fix

@sumneko sumneko added enhancement New feature or request and removed bug Something isn't working labels Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants