Skip to content

Commit 09040bf

Browse files
committed
temp
1 parent 5f25f0a commit 09040bf

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

sqlmesh/lsp/main.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)