Skip to content

Commit

Permalink
refactor: update hover.py example to use language server argument
Browse files Browse the repository at this point in the history
  • Loading branch information
noklam committed May 9, 2024
1 parent d1a8dd7 commit c88a188
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/servers/hover.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit c88a188

Please sign in to comment.