[red-knot] Support files outside of any workspace (#13041)

## Summary

This PR adds basic support for files outside of any workspace in the red
knot server.

This also limits the red knot server to only work in a single workspace.
The server will not start if there are multiple workspaces.

## Test Plan

https://github.com/user-attachments/assets/de601387-0ad5-433c-9d2c-7b6ae5137654
This commit is contained in:
Dhruv Manilawala 2024-08-23 12:21:48 +05:30 committed by GitHub
parent 4f6accb5c6
commit c73a7bb929
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 56 additions and 39 deletions

View file

@ -99,6 +99,11 @@ impl Server {
anyhow::anyhow!("Failed to get the current working directory while creating a default workspace.")
})?;
if workspaces.len() > 1 {
// TODO(dhruvmanila): Support multi-root workspaces
anyhow::bail!("Multi-root workspaces are not supported yet");
}
Ok(Self {
connection,
worker_threads,