File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ def __init__(
3232 self .server = LanguageServer (server_name , version )
3333 self .context_class = context_class
3434 self .context : t .Optional [Context ] = None
35- self .file_map : t .Dict [str , t .Union [Model , ModelAudit ]] = {}
3635
3736 # Register LSP features (e.g., formatting, hover, etc.)
3837 self ._register_features ()
@@ -83,18 +82,6 @@ def ensure_context_for_document(self, document: TextDocument) -> TextDocument:
8382 # If the context is already loaded, check if this document belongs to it.
8483 if self .context is not None :
8584 self .context .load () # Reload or refresh context
86- if document .uri in self .file_map :
87- return document
88-
89- # Try to match the document path with existing models/audits
90- for model in itertools .chain (
91- self .context ._models .values (), self .context ._audits .values ()
92- ):
93- if model ._path is None :
94- continue
95- if model ._path .resolve () == Path (document .path ):
96- self .file_map [document .uri ] = model
97- return document
9885 return document
9986
10087 # No context yet: try to find config and load it
You can’t perform that action at this time.
0 commit comments