From 9660f3fe1ea4d94958aa21e27dead12dd8ca5f19 Mon Sep 17 00:00:00 2001 From: Nok Date: Thu, 9 May 2024 13:09:10 +0000 Subject: [PATCH] refactor: update hover.py example to use language server argument --- examples/servers/hover.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/servers/hover.py b/examples/servers/hover.py index f7c94ee9..c6f0e322 100644 --- a/examples/servers/hover.py +++ b/examples/servers/hover.py @@ -31,10 +31,10 @@ @server.feature(types.TEXT_DOCUMENT_HOVER) -def hover(params: types.HoverParams): +def hover(ls: LanguageServer, params: types.HoverParams): pos = params.position document_uri = params.text_document.uri - document = server.workspace.get_text_document(document_uri) + document = ls.workspace.get_text_document(document_uri) try: line = document.lines[pos.line]