Skip to content

Commit b312e6b

Browse files
committed
refactor(lsp): share code for creation of lsp
1 parent 9e5bf54 commit b312e6b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

sqlmesh/lsp/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,9 @@ def _ensure_context_for_document(
694694
for a config.py or config.yml file in the parent directories.
695695
"""
696696
if self.lsp_context is not None:
697-
context = self.lsp_context
698-
context.context.load() # Reload or refresh context
699-
self.lsp_context = LSPContext(context.context)
697+
# If we already have a context, refresh it
698+
paths = list(self.lsp_context.context.configs)
699+
self._create_lsp_context(paths)
700700
return
701701

702702
# No context yet: try to find config and load it

0 commit comments

Comments
 (0)