We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e396c8c commit 5fbe19bCopy full SHA for 5fbe19b
1 file changed
sqlmesh/lsp/main.py
@@ -199,6 +199,17 @@ def did_change(ls: LanguageServer, params: types.DidChangeTextDocumentParams) ->
199
@self.server.feature(types.TEXT_DOCUMENT_DID_SAVE)
200
def did_save(ls: LanguageServer, params: types.DidSaveTextDocumentParams) -> None:
201
uri = URI(params.text_document.uri)
202
+
203
+ # Reload the entire context and create a new LSPContext
204
+ if self.lsp_context is not None:
205
+ try:
206
+ new_context = Context(paths=list(self.lsp_context.context.configs.keys()))
207
+ new_full_cntext = LSPContext(new_context)
208
+ self.lsp_context = new_full_cntext
209
+ return
210
+ except Exception as e:
211
+ pass
212
213
context = self._context_get_or_load(uri)
214
models = context.map[uri.to_path()]
215
if models is None or not isinstance(models, ModelTarget):
0 commit comments