Skip to content

Commit fb6bafb

Browse files
authored
chore(vscode): remove use of deprecated function (#4361)
1 parent 3717cd5 commit fb6bafb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sqlmesh/lsp/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def formatting(
151151
"""Format the document using SQLMesh `format_model_expressions`."""
152152
try:
153153
self._ensure_context_for_document(params.text_document.uri)
154-
document = ls.workspace.get_document(params.text_document.uri)
154+
document = ls.workspace.get_text_document(params.text_document.uri)
155155
if self.lsp_context is None:
156156
raise RuntimeError(f"No context found for document: {document.path}")
157157

@@ -182,7 +182,7 @@ def hover(ls: LanguageServer, params: types.HoverParams) -> t.Optional[types.Hov
182182
"""Provide hover information for an object."""
183183
try:
184184
self._ensure_context_for_document(params.text_document.uri)
185-
document = ls.workspace.get_document(params.text_document.uri)
185+
document = ls.workspace.get_text_document(params.text_document.uri)
186186
if self.lsp_context is None:
187187
raise RuntimeError(f"No context found for document: {document.path}")
188188

@@ -212,7 +212,7 @@ def goto_definition(
212212
"""Jump to an object's definition."""
213213
try:
214214
self._ensure_context_for_document(params.text_document.uri)
215-
document = ls.workspace.get_document(params.text_document.uri)
215+
document = ls.workspace.get_text_document(params.text_document.uri)
216216
if self.lsp_context is None:
217217
raise RuntimeError(f"No context found for document: {document.path}")
218218

0 commit comments

Comments
 (0)