Skip to content

Commit c747ca5

Browse files
authored
fix(lsp): notification would now show (#5024)
1 parent 51481b2 commit c747ca5

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
@@ -829,6 +829,7 @@ def _ensure_context_in_folder(self, folder_path: t.Optional[Path] = None) -> Non
829829
config_path = workspace_folder / f"config.{ext}"
830830
if config_path.exists():
831831
if self._create_lsp_context([workspace_folder]):
832+
loaded_sqlmesh_message(self.server)
832833
return
833834

834835
# Then , check the provided folder recursively
@@ -840,6 +841,7 @@ def _ensure_context_in_folder(self, folder_path: t.Optional[Path] = None) -> Non
840841
config_path = path / f"config.{ext}"
841842
if config_path.exists():
842843
if self._create_lsp_context([path]):
844+
loaded_sqlmesh_message(self.server)
843845
return
844846

845847
path = path.parent
@@ -865,15 +867,13 @@ def _create_lsp_context(self, paths: t.List[Path]) -> t.Optional[LSPContext]:
865867
try:
866868
if isinstance(self.context_state, NoContext):
867869
context = self.context_class(paths=paths)
868-
loaded_sqlmesh_message(self.server)
869870
elif isinstance(self.context_state, ContextFailed):
870871
if self.context_state.context:
871872
context = self.context_state.context
872873
context.load()
873874
else:
874875
# If there's no context (initial creation failed), try creating again
875876
context = self.context_class(paths=paths)
876-
loaded_sqlmesh_message(self.server)
877877
else:
878878
context = self.context_state.lsp_context.context
879879
context.load()

0 commit comments

Comments
 (0)