Merge pull request #1122 from arp242/prefer-text
Use plain text if the client tells zls it's preferred
This commit is contained in:
commit
fe4c9d5a8b
@ -399,6 +399,9 @@ fn initializeHandler(server: *Server, request: types.InitializeParams) Error!typ
|
|||||||
if (textDocument.hover) |hover| {
|
if (textDocument.hover) |hover| {
|
||||||
if (hover.contentFormat) |content_format| {
|
if (hover.contentFormat) |content_format| {
|
||||||
for (content_format) |format| {
|
for (content_format) |format| {
|
||||||
|
if (format == .plaintext) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (format == .markdown) {
|
if (format == .markdown) {
|
||||||
server.client_capabilities.hover_supports_md = true;
|
server.client_capabilities.hover_supports_md = true;
|
||||||
break;
|
break;
|
||||||
@ -412,6 +415,9 @@ fn initializeHandler(server: *Server, request: types.InitializeParams) Error!typ
|
|||||||
server.client_capabilities.supports_snippets = completionItem.snippetSupport orelse false;
|
server.client_capabilities.supports_snippets = completionItem.snippetSupport orelse false;
|
||||||
if (completionItem.documentationFormat) |documentation_format| {
|
if (completionItem.documentationFormat) |documentation_format| {
|
||||||
for (documentation_format) |format| {
|
for (documentation_format) |format| {
|
||||||
|
if (format == .plaintext) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (format == .markdown) {
|
if (format == .markdown) {
|
||||||
server.client_capabilities.completion_doc_supports_md = true;
|
server.client_capabilities.completion_doc_supports_md = true;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user