Skip to content

Commit

Permalink
🚸 Add markdown syntax highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Dec 10, 2023
1 parent be5fca4 commit af6789d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/zathura_language_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,8 @@ def hover(params: TextDocumentPositionParams) -> Hover | None:
if result is None:
return None
return Hover(
contents=MarkupContent(
kind=MarkupKind.Markdown, value=result["description"]
),
range=uni.get_range(),
MarkupContent(MarkupKind.Markdown, result["description"]),
uni.get_range(),
)

@self.feature(TEXT_DOCUMENT_COMPLETION)
Expand All @@ -116,7 +114,9 @@ def completions(params: CompletionParams) -> CompletionList:
CompletionItem(
x,
kind=CompletionItemKind.Variable,
documentation=property["description"],
documentation=MarkupContent(
MarkupKind.Markdown, property["description"]
),
insert_text=x,
)
for x, property in get_schema()["properties"].items()
Expand All @@ -130,7 +130,9 @@ def completions(params: CompletionParams) -> CompletionList:
CompletionItem(
x,
kind=CompletionItemKind.Variable,
documentation=property["description"],
documentation=MarkupContent(
MarkupKind.Markdown, property["description"]
),
insert_text=x,
)
for x, property in get_schema()["properties"]["set"][
Expand Down

0 comments on commit af6789d

Please sign in to comment.