Refactor LSP: Centralize Workspace-Level Resources
Currently, sway-lsp creates separate sessions with duplicated state (like Engines and TokenMap) for each member within a workspace, leading to inefficiency. This issue tracks the effort to refactor the language server to properly handle Sway workspaces by leveraging the existing workspace support within forc-pkg.
Resources like token_map, engines, diagnostics, runnables, and build_plan_cache should be moved from existing within uniqe Session instances per workspace member, into the main ServerState so they can be shared amongst all workspace members. This refactoring will significantly improve performance and reduce memory usage for workspace users and will be implemented incrementally across several pull requests.