From 36583968d3f475c539ddd214c1dbc3633ddea8cc Mon Sep 17 00:00:00 2001 From: Hamir Mahal Date: Mon, 6 May 2024 08:19:45 -0700 Subject: [PATCH] fix: deprecated document getting usage (#302) --- bundled/tool/lsp_server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bundled/tool/lsp_server.py b/bundled/tool/lsp_server.py index 158ca37..16de1df 100644 --- a/bundled/tool/lsp_server.py +++ b/bundled/tool/lsp_server.py @@ -162,21 +162,21 @@ def _run_unidentified_tool( @LSP_SERVER.feature(lsp.TEXT_DOCUMENT_DID_OPEN) def did_open(params: lsp.DidOpenTextDocumentParams) -> None: """LSP handler for textDocument/didOpen request.""" - document = LSP_SERVER.workspace.get_document(params.text_document.uri) + document = LSP_SERVER.workspace.get_text_document(params.text_document.uri) _linting_helper(document) @LSP_SERVER.feature(lsp.TEXT_DOCUMENT_DID_SAVE) def did_save(params: lsp.DidSaveTextDocumentParams) -> None: """LSP handler for textDocument/didSave request.""" - document = LSP_SERVER.workspace.get_document(params.text_document.uri) + document = LSP_SERVER.workspace.get_text_document(params.text_document.uri) _linting_helper(document) @LSP_SERVER.feature(lsp.TEXT_DOCUMENT_DID_CLOSE) def did_close(params: lsp.DidCloseTextDocumentParams) -> None: """LSP handler for textDocument/didClose request.""" - document = LSP_SERVER.workspace.get_document(params.text_document.uri) + document = LSP_SERVER.workspace.get_text_document(params.text_document.uri) settings = _get_settings_by_document(document) if settings["reportingScope"] == "file": # Publishing empty diagnostics to clear the entries for this file.