Skip to content

Commit a89e5e4

Browse files
committed
fix(lsp): notification would now show
- depending on the paths the context loaded which were exercised in addition of context the notification could not show - this fixes that
1 parent c02022e commit a89e5e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sqlmesh/lsp/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,7 @@ def _ensure_context_in_folder(self, folder_path: t.Optional[Path] = None) -> Non
824824
config_path = workspace_folder / f"config.{ext}"
825825
if config_path.exists():
826826
if self._create_lsp_context([workspace_folder]):
827+
loaded_sqlmesh_message(self.server)
827828
return
828829

829830
# Then , check the provided folder recursively
@@ -835,6 +836,7 @@ def _ensure_context_in_folder(self, folder_path: t.Optional[Path] = None) -> Non
835836
config_path = path / f"config.{ext}"
836837
if config_path.exists():
837838
if self._create_lsp_context([path]):
839+
loaded_sqlmesh_message(self.server)
838840
return
839841

840842
path = path.parent
@@ -860,15 +862,13 @@ def _create_lsp_context(self, paths: t.List[Path]) -> t.Optional[LSPContext]:
860862
try:
861863
if isinstance(self.context_state, NoContext):
862864
context = self.context_class(paths=paths)
863-
loaded_sqlmesh_message(self.server)
864865
elif isinstance(self.context_state, ContextFailed):
865866
if self.context_state.context:
866867
context = self.context_state.context
867868
context.load()
868869
else:
869870
# If there's no context (initial creation failed), try creating again
870871
context = self.context_class(paths=paths)
871-
loaded_sqlmesh_message(self.server)
872872
else:
873873
context = self.context_state.lsp_context.context
874874
context.load()

0 commit comments

Comments
 (0)