We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d87813 commit 1891ef7Copy full SHA for 1891ef7
1 file changed
sqlmesh/lsp/main.py
@@ -95,13 +95,17 @@ def ensure_context_for_document(self, document: TextDocument) -> TextDocument:
95
for ext in ("py", "yml", "yaml"):
96
config_path = path / f"config.{ext}"
97
if config_path.exists():
98
- with suppress(Exception):
+ try:
99
# Use user-provided instantiator to build the context
100
self.context = self.context_class(paths=[path])
101
self.server.show_message(f"Context loaded for: {path}")
102
loaded = True
103
# Re-check context for document now that it's loaded
104
return self.ensure_context_for_document(document)
105
+ except Exception as e:
106
+ self.server.show_message(
107
+ f"Error loading context: {e}", types.MessageType.Error
108
+ )
109
path = path.parent
110
111
return document
0 commit comments