Skip to content

Commit

Permalink
feat: add Markdown syntax in signature help
Browse files Browse the repository at this point in the history
Now the documentation of the procedure will
be interpreted as Markdown similar to hover
  • Loading branch information
gnikit committed Nov 6, 2022
1 parent 1f50319 commit 6f531f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fortls/langserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ def check_optional(arg, params: dict):
param_num = opt_num
signature = {"label": label, "parameters": params}
if doc_str is not None:
signature["documentation"] = doc_str
signature["documentation"] = {"kind": "markdown", "value": doc_str}
req_dict = {"signatures": [signature], "activeParameter": param_num}
return req_dict

Expand Down
2 changes: 1 addition & 1 deletion test/test_server_signature_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_subroutine_markdown():
},
},
],
"documentation": "Top level Doc",
"documentation": {"kind": "markdown", "value": "Top level Doc"},
}
],
"activeParameter": 0,
Expand Down

0 comments on commit 6f531f2

Please sign in to comment.