unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#74807: 30.0.90; Eglot: Non-Markdown strings rendered as Markdown
@ 2024-12-12  0:46 Troy Brown
  2024-12-12  8:30 ` João Távora
  0 siblings, 1 reply; 9+ messages in thread
From: Troy Brown @ 2024-12-12  0:46 UTC (permalink / raw)
  To: 74807; +Cc: Felician Nemeth, João Távora

I've run across a situation where Eglot receives a documentation
string as part of a "completionItem/resolve".  The documentation is
being provided as a regular "string", not MarkupContent, yet it is
being rendered as markup.  Since the string contains characters which
are being interpreted as markdown (e.g., ":"), it causes the
documentation to be rendered incorrectly.

[jsonrpc] e[19:22:22.458]     <-- completionItem/resolve[21]
{"jsonrpc":"2.0","id":21,"result":{"label":"End_Of_Line","documentation":"End
of line sequence: lf | crlf","data":["Format","End_Of_Line"]}}

I believe this is because `eglot-completion-at-point` calls
`eglot--format-markup` for the documentation string provided in the
CompletionItem without first checking to see if it really should be
formatted (i.e., if it is a string it shouldn't be formatted).  While
`eglot--format-markup` will handle strings, it should only be passed
strings which are intended to be markup formated (specified as
MarkedString in the specification).

I believe this issue might affect more than just the documentation
string for CompletionItem, it's possible this also affects other
places which specify fields as "string | MarkupContent" (such as the
SignatureInformation documentation field).





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#74807: 30.0.90; Eglot: Non-Markdown strings rendered as Markdown
  2024-12-12  0:46 bug#74807: 30.0.90; Eglot: Non-Markdown strings rendered as Markdown Troy Brown
@ 2024-12-12  8:30 ` João Távora
  2024-12-12 13:32   ` Troy Brown
  0 siblings, 1 reply; 9+ messages in thread
From: João Távora @ 2024-12-12  8:30 UTC (permalink / raw)
  To: Troy Brown; +Cc: 74807, felician.nemeth

[-- Attachment #1: Type: text/plain, Size: 1467 bytes --]

Please provide more of the eglot events log.

Thanks,
João

On Thu, Dec 12, 2024, 00:46 Troy Brown <brownts@troybrown.dev> wrote:

> I've run across a situation where Eglot receives a documentation
> string as part of a "completionItem/resolve".  The documentation is
> being provided as a regular "string", not MarkupContent, yet it is
> being rendered as markup.  Since the string contains characters which
> are being interpreted as markdown (e.g., ":"), it causes the
> documentation to be rendered incorrectly.
>
> [jsonrpc] e[19:22:22.458]     <-- completionItem/resolve[21]
>
> {"jsonrpc":"2.0","id":21,"result":{"label":"End_Of_Line","documentation":"End
> of line sequence: lf | crlf","data":["Format","End_Of_Line"]}}
>
> I believe this is because `eglot-completion-at-point` calls
> `eglot--format-markup` for the documentation string provided in the
> CompletionItem without first checking to see if it really should be
> formatted (i.e., if it is a string it shouldn't be formatted).  While
> `eglot--format-markup` will handle strings, it should only be passed
> strings which are intended to be markup formated (specified as
> MarkedString in the specification).
>
> I believe this issue might affect more than just the documentation
> string for CompletionItem, it's possible this also affects other
> places which specify fields as "string | MarkupContent" (such as the
> SignatureInformation documentation field).
>

[-- Attachment #2: Type: text/html, Size: 2027 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#74807: 30.0.90; Eglot: Non-Markdown strings rendered as Markdown
  2024-12-12  8:30 ` João Távora
@ 2024-12-12 13:32   ` Troy Brown
  2024-12-28 11:02     ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Troy Brown @ 2024-12-12 13:32 UTC (permalink / raw)
  To: João Távora; +Cc: 74807, felician.nemeth

On Thu, Dec 12, 2024 at 3:30 AM João Távora <joaotavora@gmail.com> wrote:
>
> Please provide more of the eglot events log.
>

I wasn't sure how much more of the log you wanted, so I re-ran the
scenario and provided the entire log.

[jsonrpc] D[08:22:58.272] Running language server: ada_language_server
--language-gpr
[jsonrpc] e[08:22:58.272] --> initialize[1]
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"processId":2262352,"clientInfo":{"name":"Eglot","version":"1.17.30"},"rootPath":"/home/troy/","rootUri":"file:///home/troy","initializationOptions":{},"capabilities":{"workspace":{"applyEdit":true,"executeCommand":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":false},"configuration":true,"workspaceFolders":true},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":true,"deprecatedSupport":true,"resolveSupport":{"properties":["documentation","details","additionalTextEdits"]},"tagSupport":{"valueSet":[1]}},"contextSupport":true},"hover":{"dynamicRegistration":false,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true},"documentationFormat":["markdown","plaintext"],"activeParameterSupport":true}},"references":{"dynamicRegistration":false},"definition":{"dynamicRegistration":false,"linkSupport":true},"declaration":{"dynamicRegistration":false,"linkSupport":true},"implementation":{"dynamicRegistration":false,"linkSupport":true},"typeDefinition":{"dynamicRegistration":false,"linkSupport":true},"documentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"documentHighlight":{"dynamicRegistration":false},"codeAction":{"dynamicRegistration":false,"resolveSupport":{"properties":["edit","command"]},"dataSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPreferredSupport":true},"formatting":{"dynamicRegistration":false},"rangeFormatting":{"dynamicRegistration":false},"rename":{"dynamicRegistration":false},"inlayHint":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":false,"codeDescriptionSupport":false,"tagSupport":{"valueSet":[1,2]}}},"window":{"showDocument":{"support":true},"workDoneProgress":true},"general":{"positionEncodings":["utf-32","utf-8","utf-16"]},"experimental":{}},"workspaceFolders":[{"uri":"file:///home/troy","name":"~/"}]}}
[jsonrpc] e[08:22:58.336] <-- initialize[1]
{"jsonrpc":"2.0","id":1,"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":1},"completionProvider":{"triggerCharacters":["
",".","'"],"resolveProvider":true},"hoverProvider":true,"declarationProvider":true,"definitionProvider":true,"documentSymbolProvider":{}}}}
[jsonrpc] e[08:22:58.336] --> initialized
{"jsonrpc":"2.0","method":"initialized","params":{}}
[jsonrpc] e[08:22:58.338] --> textDocument/didOpen
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":0,"languageId":"gpr","text":"project
Hello_World is\n\n   package Format is\n   end Format;\n\nend
Hello_World;\n"}}}
[jsonrpc] e[08:22:58.338] --> workspace/didChangeConfiguration
{"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{}}}
[jsonrpc] e[08:22:58.845] --> textDocument/hover[2]
{"jsonrpc":"2.0","id":2,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":3,"character":0}}}
[jsonrpc] e[08:22:59.336] <-- textDocument/publishDiagnostics
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[]}}
[jsonrpc] e[08:23:00.291] <-- textDocument/hover[2]
{"jsonrpc":"2.0","id":2,"result":null}
[jsonrpc] e[08:23:00.839] --> textDocument/didChange
{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":1},"contentChanges":[{"text":"project
Hello_World is\n\n   package Format is\n\n   end Format;\n\nend
Hello_World;\n"}]}}
[jsonrpc] e[08:23:00.839] --> textDocument/hover[3]
{"jsonrpc":"2.0","id":3,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":3}}}
[jsonrpc] e[08:23:01.822] <-- textDocument/publishDiagnostics
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[]}}
[jsonrpc] e[08:23:01.823] <-- textDocument/hover[3]
{"jsonrpc":"2.0","id":3,"result":null}
[jsonrpc] e[08:23:01.839] --> textDocument/didChange
{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":2},"contentChanges":[{"text":"project
Hello_World is\n\n   package Format is\n\n\n   end Format;\n\nend
Hello_World;\n"}]}}
[jsonrpc] e[08:23:01.839] --> textDocument/hover[4]
{"jsonrpc":"2.0","id":4,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":0}}}
[jsonrpc] e[08:23:02.830] <-- textDocument/publishDiagnostics
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[]}}
[jsonrpc] e[08:23:02.861] <-- textDocument/hover[4]
{"jsonrpc":"2.0","id":4,"result":null}
[jsonrpc] e[08:23:03.358] --> textDocument/didChange
{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":3},"contentChanges":[{"text":"project
Hello_World is\n\n   package Format is\n\n      \n      \n   end
Format;\n\nend Hello_World;\n"}]}}
[jsonrpc] e[08:23:03.358] --> textDocument/hover[5]
{"jsonrpc":"2.0","id":5,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":6}}}
[jsonrpc] e[08:23:04.098] --> textDocument/didChange
{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":4},"contentChanges":[{"text":"project
Hello_World is\n\n   package Format is\n\n      for \n      \n   end
Format;\n\nend Hello_World;\n"}]}}
[jsonrpc] e[08:23:04.098] --> textDocument/completion[6]
{"jsonrpc":"2.0","id":6,"method":"textDocument/completion","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":10},"context":{"triggerKind":2,"triggerCharacter":"
"}}}
[jsonrpc] e[08:23:04.303]   <-- textDocument/publishDiagnostics
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[]}}
[jsonrpc] e[08:23:04.305]   <-- textDocument/hover[5]
{"jsonrpc":"2.0","id":5,"result":null}
[jsonrpc] i[08:23:04.305] anxious continuation to 5 can't run, held up by (6)
[jsonrpc] e[08:23:04.401]   --> textDocument/hover[7]
{"jsonrpc":"2.0","id":7,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":10}}}
[jsonrpc] e[08:23:04.568]   <-- textDocument/publishDiagnostics
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[{"range":{"start":{"line":6,"character":3},"end":{"line":6,"character":3}},"severity":1,"source":"project","message":"Expected
Identifier, got 'end'"}]}}
[jsonrpc] e[08:23:04.573]   <-- textDocument/completion[6]
{"jsonrpc":"2.0","id":6,"result":{"isIncomplete":false,"items":[{"label":"Width","documentation":"Max
line width","data":["Format","Width"]},{"label":"Indentation","documentation":"Indentation
size","data":["Format","Indentation"]},{"label":"Indentation_Kind","documentation":"Indentation
kind: spaces | tabs","data":["Format","Indentation_Kind"]},{"label":"Indentation_Continuation","documentation":"Continuation
Line Indentation
size","data":["Format","Indentation_Continuation"]},{"label":"End_Of_Line","documentation":"End
of line sequence: lf |
crlf","data":["Format","End_Of_Line"]},{"label":"Charset","documentation":"Charset
to use for source decoding","data":["Format","Charset"]}]}}
[jsonrpc] i[08:23:04.573] anxious continuation to 5 running now
[jsonrpc] e[08:23:04.573] <-- textDocument/hover[7]
{"jsonrpc":"2.0","id":7,"result":null}
[jsonrpc] e[08:23:04.585] --> completionItem/resolve[8]
{"jsonrpc":"2.0","id":8,"method":"completionItem/resolve","params":{"label":"Charset","documentation":"Charset
to use for source decoding","data":["Format","Charset"]}}
[jsonrpc] e[08:23:04.590]   <-- completionItem/resolve[8]
{"jsonrpc":"2.0","id":8,"result":{"label":"Charset","documentation":"Charset
to use for source decoding","data":["Format","Charset"]}}
[jsonrpc] e[08:23:06.553] --> textDocument/didChange
{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":5},"contentChanges":[{"text":"project
Hello_World is\n\n   package Format is\n\n      for en\n      \n   end
Format;\n\nend Hello_World;\n"}]}}
[jsonrpc] e[08:23:06.553] --> completionItem/resolve[9]
{"jsonrpc":"2.0","id":9,"method":"completionItem/resolve","params":{"label":"End_Of_Line","documentation":"End
of line sequence: lf | crlf","data":["Format","End_Of_Line"]}}
[jsonrpc] e[08:23:06.743] --> textDocument/didChange
{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":6},"contentChanges":[{"text":"project
Hello_World is\n\n   package Format is\n\n      for end\n      \n
end Format;\n\nend Hello_World;\n"}]}}
[jsonrpc] e[08:23:06.743] --> completionItem/resolve[10]
{"jsonrpc":"2.0","id":10,"method":"completionItem/resolve","params":{"label":"End_Of_Line","documentation":"End
of line sequence: lf | crlf","data":["Format","End_Of_Line"]}}
[jsonrpc] e[08:23:06.823]   <-- textDocument/publishDiagnostics
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[{"range":{"start":{"line":6,"character":3},"end":{"line":6,"character":3}},"severity":1,"source":"project","message":"Expected
'use', got 'end'"}]}}
[jsonrpc] e[08:23:06.830]   <-- [9]
{"jsonrpc":"2.0","id":9,"result":{"label":"End_Of_Line","documentation":"End
of line sequence: lf | crlf","data":["Format","End_Of_Line"]}}
[jsonrpc] i[08:23:06.830] [9] Response to request 9 which has been canceled
[jsonrpc] e[08:23:07.076]   <-- textDocument/publishDiagnostics
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[{"range":{"start":{"line":4,"character":10},"end":{"line":4,"character":10}},"severity":1,"source":"project","message":"Expected
Identifier, got 'end'"}]}}
[jsonrpc] e[08:23:07.105]   <-- completionItem/resolve[10]
{"jsonrpc":"2.0","id":10,"result":{"label":"End_Of_Line","documentation":"End
of line sequence: lf | crlf","data":["Format","End_Of_Line"]}}
[jsonrpc] e[08:23:07.245] --> textDocument/hover[11]
{"jsonrpc":"2.0","id":11,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":13}}}
[jsonrpc] e[08:23:07.257] <-- textDocument/hover[11]
{"jsonrpc":"2.0","id":11,"result":null}
[jsonrpc] e[08:23:08.466] --> textDocument/didChange
{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":7},"contentChanges":[{"text":"project
Hello_World is\n\n   package Format is\n\n      for end_of\n      \n
end Format;\n\nend Hello_World;\n"}]}}
[jsonrpc] e[08:23:08.466] --> textDocument/hover[12]
{"jsonrpc":"2.0","id":12,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":16}}}
[jsonrpc] e[08:23:08.725] <-- textDocument/publishDiagnostics
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[{"range":{"start":{"line":6,"character":3},"end":{"line":6,"character":3}},"severity":1,"source":"project","message":"Expected
'use', got 'end'"}]}}
[jsonrpc] e[08:23:08.727] <-- textDocument/hover[12]
{"jsonrpc":"2.0","id":12,"result":null}
[jsonrpc] e[08:23:09.013] --> textDocument/didChange
{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":8},"contentChanges":[{"text":"project
Hello_World is\n\n   package Format is\n\n      for End_Of_Line\n
\n   end Format;\n\nend Hello_World;\n"}]}}
[jsonrpc] e[08:23:09.281] <-- textDocument/publishDiagnostics
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[{"range":{"start":{"line":6,"character":3},"end":{"line":6,"character":3}},"severity":1,"source":"project","message":"Expected
'use', got 'end'"}]}}
[jsonrpc] e[08:23:09.518] --> textDocument/hover[13]
{"jsonrpc":"2.0","id":13,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":21}}}
[jsonrpc] e[08:23:09.531] <-- textDocument/hover[13]
{"jsonrpc":"2.0","id":13,"result":null}





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#74807: 30.0.90; Eglot: Non-Markdown strings rendered as Markdown
  2024-12-12 13:32   ` Troy Brown
@ 2024-12-28 11:02     ` Eli Zaretskii
  2025-01-06 11:56       ` João Távora
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2024-12-28 11:02 UTC (permalink / raw)
  To: joaotavora, Troy Brown; +Cc: 74807, felician.nemeth

Ping!  Can we make some progress here, please?

> Cc: 74807@debbugs.gnu.org, felician.nemeth@gmail.com
> From: Troy Brown <brownts@troybrown.dev>
> Date: Thu, 12 Dec 2024 08:32:37 -0500
> 
> On Thu, Dec 12, 2024 at 3:30 AM João Távora <joaotavora@gmail.com> wrote:
> >
> > Please provide more of the eglot events log.
> >
> 
> I wasn't sure how much more of the log you wanted, so I re-ran the
> scenario and provided the entire log.
> 
> [jsonrpc] D[08:22:58.272] Running language server: ada_language_server
> --language-gpr
> [jsonrpc] e[08:22:58.272] --> initialize[1]
> {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"processId":2262352,"clientInfo":{"name":"Eglot","version":"1.17.30"},"rootPath":"/home/troy/","rootUri":"file:///home/troy","initializationOptions":{},"capabilities":{"workspace":{"applyEdit":true,"executeCommand":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":false},"configuration":true,"workspaceFolders":true},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":true,"deprecatedSupport":true,"resolveSupport":{"properties":["documentation","details","additionalTextEdits"]},"tagSupport":{"valueSet":[1]}},"contextSupport":true},"hover":{"dynamicRegistration":false,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true},"documentationFormat":["markdown","plaintext"],"activeParameterSupport":true}},"references":{"dynamicRegistration":false},"definition":{"dynamicRegistration":false,"linkSupport":true},"declaration":{"dynamicRegistration":false,"linkSupport":true},"implementation":{"dynamicRegistration":false,"linkSupport":true},"typeDefinition":{"dynamicRegistration":false,"linkSupport":true},"documentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"documentHighlight":{"dynamicRegistration":false},"codeAction":{"dynamicRegistration":false,"resolveSupport":{"properties":["edit","command"]},"dataSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPreferredSupport":true},"formatting":{"dynamicRegistration":false},"rangeFormatting":{"dynamicRegistration":false},"rename":{"dynamicRegistration":false},"inlayHint":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":false,"codeDescriptionSupport":false,"tagSupport":{"valueSet":[1,2]}}},"window":{"showDocument":{"support":true},"workDoneProgress":true},"general":{"positionEncodings":["utf-32","utf-8","utf-16"]},"experimental":{}},"workspaceFolders":[{"uri":"file:///home/troy","name":"~/"}]}}
> [jsonrpc] e[08:22:58.336] <-- initialize[1]
> {"jsonrpc":"2.0","id":1,"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":1},"completionProvider":{"triggerCharacters":["
> ",".","'"],"resolveProvider":true},"hoverProvider":true,"declarationProvider":true,"definitionProvider":true,"documentSymbolProvider":{}}}}
> [jsonrpc] e[08:22:58.336] --> initialized
> {"jsonrpc":"2.0","method":"initialized","params":{}}
> [jsonrpc] e[08:22:58.338] --> textDocument/didOpen
> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":0,"languageId":"gpr","text":"project
> Hello_World is\n\n   package Format is\n   end Format;\n\nend
> Hello_World;\n"}}}
> [jsonrpc] e[08:22:58.338] --> workspace/didChangeConfiguration
> {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{}}}
> [jsonrpc] e[08:22:58.845] --> textDocument/hover[2]
> {"jsonrpc":"2.0","id":2,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":3,"character":0}}}
> [jsonrpc] e[08:22:59.336] <-- textDocument/publishDiagnostics
> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[]}}
> [jsonrpc] e[08:23:00.291] <-- textDocument/hover[2]
> {"jsonrpc":"2.0","id":2,"result":null}
> [jsonrpc] e[08:23:00.839] --> textDocument/didChange
> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":1},"contentChanges":[{"text":"project
> Hello_World is\n\n   package Format is\n\n   end Format;\n\nend
> Hello_World;\n"}]}}
> [jsonrpc] e[08:23:00.839] --> textDocument/hover[3]
> {"jsonrpc":"2.0","id":3,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":3}}}
> [jsonrpc] e[08:23:01.822] <-- textDocument/publishDiagnostics
> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[]}}
> [jsonrpc] e[08:23:01.823] <-- textDocument/hover[3]
> {"jsonrpc":"2.0","id":3,"result":null}
> [jsonrpc] e[08:23:01.839] --> textDocument/didChange
> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":2},"contentChanges":[{"text":"project
> Hello_World is\n\n   package Format is\n\n\n   end Format;\n\nend
> Hello_World;\n"}]}}
> [jsonrpc] e[08:23:01.839] --> textDocument/hover[4]
> {"jsonrpc":"2.0","id":4,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":0}}}
> [jsonrpc] e[08:23:02.830] <-- textDocument/publishDiagnostics
> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[]}}
> [jsonrpc] e[08:23:02.861] <-- textDocument/hover[4]
> {"jsonrpc":"2.0","id":4,"result":null}
> [jsonrpc] e[08:23:03.358] --> textDocument/didChange
> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":3},"contentChanges":[{"text":"project
> Hello_World is\n\n   package Format is\n\n      \n      \n   end
> Format;\n\nend Hello_World;\n"}]}}
> [jsonrpc] e[08:23:03.358] --> textDocument/hover[5]
> {"jsonrpc":"2.0","id":5,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":6}}}
> [jsonrpc] e[08:23:04.098] --> textDocument/didChange
> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":4},"contentChanges":[{"text":"project
> Hello_World is\n\n   package Format is\n\n      for \n      \n   end
> Format;\n\nend Hello_World;\n"}]}}
> [jsonrpc] e[08:23:04.098] --> textDocument/completion[6]
> {"jsonrpc":"2.0","id":6,"method":"textDocument/completion","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":10},"context":{"triggerKind":2,"triggerCharacter":"
> "}}}
> [jsonrpc] e[08:23:04.303]   <-- textDocument/publishDiagnostics
> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[]}}
> [jsonrpc] e[08:23:04.305]   <-- textDocument/hover[5]
> {"jsonrpc":"2.0","id":5,"result":null}
> [jsonrpc] i[08:23:04.305] anxious continuation to 5 can't run, held up by (6)
> [jsonrpc] e[08:23:04.401]   --> textDocument/hover[7]
> {"jsonrpc":"2.0","id":7,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":10}}}
> [jsonrpc] e[08:23:04.568]   <-- textDocument/publishDiagnostics
> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[{"range":{"start":{"line":6,"character":3},"end":{"line":6,"character":3}},"severity":1,"source":"project","message":"Expected
> Identifier, got 'end'"}]}}
> [jsonrpc] e[08:23:04.573]   <-- textDocument/completion[6]
> {"jsonrpc":"2.0","id":6,"result":{"isIncomplete":false,"items":[{"label":"Width","documentation":"Max
> line width","data":["Format","Width"]},{"label":"Indentation","documentation":"Indentation
> size","data":["Format","Indentation"]},{"label":"Indentation_Kind","documentation":"Indentation
> kind: spaces | tabs","data":["Format","Indentation_Kind"]},{"label":"Indentation_Continuation","documentation":"Continuation
> Line Indentation
> size","data":["Format","Indentation_Continuation"]},{"label":"End_Of_Line","documentation":"End
> of line sequence: lf |
> crlf","data":["Format","End_Of_Line"]},{"label":"Charset","documentation":"Charset
> to use for source decoding","data":["Format","Charset"]}]}}
> [jsonrpc] i[08:23:04.573] anxious continuation to 5 running now
> [jsonrpc] e[08:23:04.573] <-- textDocument/hover[7]
> {"jsonrpc":"2.0","id":7,"result":null}
> [jsonrpc] e[08:23:04.585] --> completionItem/resolve[8]
> {"jsonrpc":"2.0","id":8,"method":"completionItem/resolve","params":{"label":"Charset","documentation":"Charset
> to use for source decoding","data":["Format","Charset"]}}
> [jsonrpc] e[08:23:04.590]   <-- completionItem/resolve[8]
> {"jsonrpc":"2.0","id":8,"result":{"label":"Charset","documentation":"Charset
> to use for source decoding","data":["Format","Charset"]}}
> [jsonrpc] e[08:23:06.553] --> textDocument/didChange
> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":5},"contentChanges":[{"text":"project
> Hello_World is\n\n   package Format is\n\n      for en\n      \n   end
> Format;\n\nend Hello_World;\n"}]}}
> [jsonrpc] e[08:23:06.553] --> completionItem/resolve[9]
> {"jsonrpc":"2.0","id":9,"method":"completionItem/resolve","params":{"label":"End_Of_Line","documentation":"End
> of line sequence: lf | crlf","data":["Format","End_Of_Line"]}}
> [jsonrpc] e[08:23:06.743] --> textDocument/didChange
> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":6},"contentChanges":[{"text":"project
> Hello_World is\n\n   package Format is\n\n      for end\n      \n
> end Format;\n\nend Hello_World;\n"}]}}
> [jsonrpc] e[08:23:06.743] --> completionItem/resolve[10]
> {"jsonrpc":"2.0","id":10,"method":"completionItem/resolve","params":{"label":"End_Of_Line","documentation":"End
> of line sequence: lf | crlf","data":["Format","End_Of_Line"]}}
> [jsonrpc] e[08:23:06.823]   <-- textDocument/publishDiagnostics
> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[{"range":{"start":{"line":6,"character":3},"end":{"line":6,"character":3}},"severity":1,"source":"project","message":"Expected
> 'use', got 'end'"}]}}
> [jsonrpc] e[08:23:06.830]   <-- [9]
> {"jsonrpc":"2.0","id":9,"result":{"label":"End_Of_Line","documentation":"End
> of line sequence: lf | crlf","data":["Format","End_Of_Line"]}}
> [jsonrpc] i[08:23:06.830] [9] Response to request 9 which has been canceled
> [jsonrpc] e[08:23:07.076]   <-- textDocument/publishDiagnostics
> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[{"range":{"start":{"line":4,"character":10},"end":{"line":4,"character":10}},"severity":1,"source":"project","message":"Expected
> Identifier, got 'end'"}]}}
> [jsonrpc] e[08:23:07.105]   <-- completionItem/resolve[10]
> {"jsonrpc":"2.0","id":10,"result":{"label":"End_Of_Line","documentation":"End
> of line sequence: lf | crlf","data":["Format","End_Of_Line"]}}
> [jsonrpc] e[08:23:07.245] --> textDocument/hover[11]
> {"jsonrpc":"2.0","id":11,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":13}}}
> [jsonrpc] e[08:23:07.257] <-- textDocument/hover[11]
> {"jsonrpc":"2.0","id":11,"result":null}
> [jsonrpc] e[08:23:08.466] --> textDocument/didChange
> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":7},"contentChanges":[{"text":"project
> Hello_World is\n\n   package Format is\n\n      for end_of\n      \n
> end Format;\n\nend Hello_World;\n"}]}}
> [jsonrpc] e[08:23:08.466] --> textDocument/hover[12]
> {"jsonrpc":"2.0","id":12,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":16}}}
> [jsonrpc] e[08:23:08.725] <-- textDocument/publishDiagnostics
> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[{"range":{"start":{"line":6,"character":3},"end":{"line":6,"character":3}},"severity":1,"source":"project","message":"Expected
> 'use', got 'end'"}]}}
> [jsonrpc] e[08:23:08.727] <-- textDocument/hover[12]
> {"jsonrpc":"2.0","id":12,"result":null}
> [jsonrpc] e[08:23:09.013] --> textDocument/didChange
> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr","version":8},"contentChanges":[{"text":"project
> Hello_World is\n\n   package Format is\n\n      for End_Of_Line\n
> \n   end Format;\n\nend Hello_World;\n"}]}}
> [jsonrpc] e[08:23:09.281] <-- textDocument/publishDiagnostics
> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/troy/junk/hello_world.gpr","diagnostics":[{"range":{"start":{"line":6,"character":3},"end":{"line":6,"character":3}},"severity":1,"source":"project","message":"Expected
> 'use', got 'end'"}]}}
> [jsonrpc] e[08:23:09.518] --> textDocument/hover[13]
> {"jsonrpc":"2.0","id":13,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":21}}}
> [jsonrpc] e[08:23:09.531] <-- textDocument/hover[13]
> {"jsonrpc":"2.0","id":13,"result":null}
> 
> 
> 
> 





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#74807: 30.0.90; Eglot: Non-Markdown strings rendered as Markdown
  2024-12-28 11:02     ` Eli Zaretskii
@ 2025-01-06 11:56       ` João Távora
  2025-01-06 23:56         ` Troy Brown
  0 siblings, 1 reply; 9+ messages in thread
From: João Távora @ 2025-01-06 11:56 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: felician.nemeth, Troy Brown, 74807

Eli Zaretskii <eliz@gnu.org> writes:

> Ping!  Can we make some progress here, please?

>> [jsonrpc] e[08:23:09.518] --> textDocument/hover[13]
>> {"jsonrpc":"2.0","id":13,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/troy/junk/hello_world.gpr"},"position":{"line":4,"character":21}}}
>> [jsonrpc] e[08:23:09.531] <-- textDocument/hover[13]
>> {"jsonrpc":"2.0","id":13,"result":null}

Hello Troy,  I've finally had time to look at your bug report.

> I've run across a situation where Eglot receives a documentation
> string as part of a "completionItem/resolve".  The documentation is
> being provided as a regular "string", not MarkupContent, yet it is
> being rendered as markup.  Since the string contains characters which
> are being interpreted as markdown (e.g., ":"), it causes the
> documentation to be rendered incorrectly.

After perusing the spec, I'm not sure the simple strings cannot be
rendered as Markdown by the client.  The spec doesn't seem to
disambiguate this.  All it says about the documentation field of a
Completion structure, besides its polymorphic type, is that it is a

    /**
     * A human-readable string that represents a doc-comment.
     */
     documentation?: string | MarkupContent;


Anyway I think if the server wants to ensure something is _not_ rendered
as Markdown it should use the more advanced MarkupContent structure and
explicitly specify 'plaintext' in its MarkupKind field.

I understand this sounds counter-intuitive, but I have to be very
careful to do these kinds of changes.  As you know, Eglot works with a
large body of servers, and I wouldn't be at all surprised that some of
those servers (or, more importantly, regulat users of those servers) do
actually expect plain strings to be rendered as Markdown when such a
renderer is available.

Lastly, and adding to my reluctance to address this in code, I don't
understand what ':' is tripping the renderer here.  Last I checked, ':'
doesn't have any special meaning in Markdown, especially in the middle
of the sequence.  Emacs's `markdown-view-mode` from the markdown.el
package does give the left and right parts of:

   Indentation kind: spaces | tabs

a different face (I don't know why, the online renderers I've tried do
not do that).  But I wouldn't say it is being rendered "incorrectly".

Anyway, I lean strongly towards not touching this.
João






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#74807: 30.0.90; Eglot: Non-Markdown strings rendered as Markdown
  2025-01-06 11:56       ` João Távora
@ 2025-01-06 23:56         ` Troy Brown
  2025-01-07  0:28           ` João Távora
  0 siblings, 1 reply; 9+ messages in thread
From: Troy Brown @ 2025-01-06 23:56 UTC (permalink / raw)
  To: João Távora; +Cc: Eli Zaretskii, 74807, felician.nemeth

On Mon, Jan 6, 2025 at 6:56 AM João Távora <joaotavora@gmail.com> wrote:
>
> Hello Troy,  I've finally had time to look at your bug report.

Thanks, I appreciate it.

>
> > I've run across a situation where Eglot receives a documentation
> > string as part of a "completionItem/resolve".  The documentation is
> > being provided as a regular "string", not MarkupContent, yet it is
> > being rendered as markup.  Since the string contains characters which
> > are being interpreted as markdown (e.g., ":"), it causes the
> > documentation to be rendered incorrectly.
>
> After perusing the spec, I'm not sure the simple strings cannot be
> rendered as Markdown by the client.  The spec doesn't seem to
> disambiguate this.  All it says about the documentation field of a
> Completion structure, besides its polymorphic type, is that it is a
>
>     /**
>      * A human-readable string that represents a doc-comment.
>      */
>      documentation?: string | MarkupContent;
>
>
> Anyway I think if the server wants to ensure something is _not_ rendered
> as Markdown it should use the more advanced MarkupContent structure and
> explicitly specify 'plaintext' in its MarkupKind field.
>
> I understand this sounds counter-intuitive, but I have to be very
> careful to do these kinds of changes.  As you know, Eglot works with a
> large body of servers, and I wouldn't be at all surprised that some of
> those servers (or, more importantly, regulat users of those servers) do
> actually expect plain strings to be rendered as Markdown when such a
> renderer is available.
>

I'm fairly confident that plain text is heavily implied by the type
being "string".  If the spec wanted to indicate that the string could
be markup, it would have been specified as "MarkedString" instead of
"string", like this:

   documentation?: MarkedString | MarkupContent;

The fact that it is specified as "string" strongly suggests that this
was intentional in order to indicate that it does not contain markup.
I understand, and appreciate your careful consideration of these kinds
of changes, however even the VSCode implementation does not treat this
as markdown, as can be seen at the following link where when the
CompletionItem.documentation is a "string", the markdown renderer is
not applied to the documentation:

   https://github.com/microsoft/vscode/blob/aaa576acca01852119f6a6b0260cf5aa74a30c58/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.ts#L168-L185

Furthermore, I would think that if, as you suggest, there were servers
which expected plain strings to be rendered as Markdown here, the
VSCode implementation would not avoid rendering plain strings as
markdown.

> Lastly, and adding to my reluctance to address this in code, I don't
> understand what ':' is tripping the renderer here.  Last I checked, ':'
> doesn't have any special meaning in Markdown, especially in the middle
> of the sequence.  Emacs's `markdown-view-mode` from the markdown.el
> package does give the left and right parts of:
>
>    Indentation kind: spaces | tabs
>
> a different face (I don't know why, the online renderers I've tried do
> not do that).  But I wouldn't say it is being rendered "incorrectly".
>

While you might argue that the example I've shown is a fringe example,
I'm sure you could envision other documentation content which uses
characters which are interpreted as markup, and shouldn't be.  I stand
by my wording of "rendered incorrectly" when based on the content of
the documentation, you might see it displayed differently, possibly
more severely based on the documentation content.

> Anyway, I lean strongly towards not touching this.

I hope you reconsider, given the additional information I've provided.


Thanks,

Troy.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#74807: 30.0.90; Eglot: Non-Markdown strings rendered as Markdown
  2025-01-06 23:56         ` Troy Brown
@ 2025-01-07  0:28           ` João Távora
  2025-01-08  3:56             ` Troy Brown
  0 siblings, 1 reply; 9+ messages in thread
From: João Távora @ 2025-01-07  0:28 UTC (permalink / raw)
  To: Troy Brown; +Cc: Eli Zaretskii, 74807, felician.nemeth

On Mon, Jan 6, 2025 at 11:56 PM Troy Brown <brownts@troybrown.dev> wrote:

> > careful to do these kinds of changes.  As you know, Eglot works with a
> > large body of servers, and I wouldn't be at all surprised that some of
> > those servers (or, more importantly, regular users of those servers) do
...
> Furthermore, I would think that if, as you suggest, there were servers
> which expected plain strings to be rendered as Markdown here, the
> VSCode implementation would not avoid rendering plain strings as
> markdown.

This VSCode argument is not meaningful to me.  Not only does it not
command any special authority over disambiguation of an ambiguous spec,
but the "regular users of those servers" I'm concerned with are longtime
Eglot users, not VSCoders.

Those are the users I don't want to disturb.  Who's to say that Eglot users
of your ada-language-server aren't quite happy to see "Indentation kind"
fontified with a certain face  and "spaces | tabs" in another face?

> While you might argue that the example I've shown is a fringe example,
> I'm sure you could envision other documentation content which uses
> characters which are interpreted as markup, and shouldn't be.  I stand
> by my wording of "rendered incorrectly" when based on the content of
> the documentation, you might see it displayed differently, possibly
> more severely based on the documentation content.

Yes, it _could_ happen. But ostensibly it didn't happen in your case.  And
if it did happen to the point of "incorrectness", as you posit, then we would
see non-contrived bug reports on the matter.  And even then, a much better
fix would be for the server to be precise about its want for plain text.

João





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#74807: 30.0.90; Eglot: Non-Markdown strings rendered as Markdown
  2025-01-07  0:28           ` João Távora
@ 2025-01-08  3:56             ` Troy Brown
  2025-01-08  9:18               ` João Távora
  0 siblings, 1 reply; 9+ messages in thread
From: Troy Brown @ 2025-01-08  3:56 UTC (permalink / raw)
  To: João Távora; +Cc: Eli Zaretskii, 74807, felician.nemeth

On Mon, Jan 6, 2025 at 7:28 PM João Távora <joaotavora@gmail.com> wrote:
>
> This VSCode argument is not meaningful to me.  Not only does it not
> command any special authority over disambiguation of an ambiguous spec,
> but the "regular users of those servers" I'm concerned with are longtime
> Eglot users, not VSCoders.

I think it's a good indication that if users of a language server
thought VSCode was behaving incorrectly, it would quickly be pointed
out and corrected.  Since the VSCode implementation stands as-is in
this area, it is an indication that users of language servers believe
that this is the correct behavior.  The fact is, VSCode gets a lot
more exposure than other LSP clients and should at least be used as a
data point.  I think it's unwise to completely disregard that
information.

> Those are the users I don't want to disturb.  Who's to say that Eglot users
> of your ada-language-server aren't quite happy to see "Indentation kind"
> fontified with a certain face  and "spaces | tabs" in another face?

I'm not quite sure what your point is.  I am both a user of Eglot and
a user of the language server and I'm not happy with this behavior,
nor do I think Eglot's behavior is correct.  How is my experience any
less important than any other user?  I am trying to point out where
the "Emacs experience" is subpar in an effort to correct those
undesirable behaviors and improve my Emacs user experience.

Moving on, I've done some digging and found historical information
that I believe is relevant.  Initially, the specification only
included "string" for the documentation field. (i.e., "documentation?:
 string;").  Then there was a Github issue logged proposing to support
markdown in the CompletionItem.documentation (see
https://github.com/microsoft/language-server-protocol/issues/111).
This is evidence that the original specification did not allow
markdown for strings in the "documentation" field.  The following is
the commit where the specification was updated to add MarkupContent as
an additional option, thus remaining backwards compatible for servers
who continue to specify non-markdown documentation as strings in
addition to allowing servers to provide markdown using (the new then)
MarkupContent:
   https://github.com/microsoft/language-server-protocol/commit/692c225dcb737e287e393f148d193877b0a2dd54





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#74807: 30.0.90; Eglot: Non-Markdown strings rendered as Markdown
  2025-01-08  3:56             ` Troy Brown
@ 2025-01-08  9:18               ` João Távora
  0 siblings, 0 replies; 9+ messages in thread
From: João Távora @ 2025-01-08  9:18 UTC (permalink / raw)
  To: Troy Brown; +Cc: Eli Zaretskii, 74807, felician.nemeth

Troy Brown <brownts@troybrown.dev> writes:

> On Mon, Jan 6, 2025 at 7:28 PM João Távora <joaotavora@gmail.com> wrote:

> data point.  I think it's unwise to completely disregard that
> information.

I'm sure to treasure your remarks about my wisdom going forward.

>> Those are the users I don't want to disturb.  Who's to say that Eglot users
>> of your ada-language-server aren't quite happy to see "Indentation kind"
>> fontified with a certain face  and "spaces | tabs" in another face?
>
> I'm not quite sure what your point is.

Other users may very well be content with the current Emacs behaviour,
which gives them coloured documentation for ada-language-server.  If I
change it in the direction you argue, I destroy this value and create no
new value.  Is it still difficult to comprehend?

> I am both a user of Eglot and a user of the language server and I'm
> not happy with this behavior, nor do I think Eglot's behavior is
> correct.  How is my experience any less important than any other user?

Never said it is.  It's also no more important than other users.

> I am trying to point out where the "Emacs experience" is subpar

And you did that.  Then I spent my time thinking about this and came to
a different conclusion.

> Moving on, I've done some digging and found historical information
> that I believe is relevant.

It's irrelevant, of course.  Markdown is specifically designed to render
non marked-up aka "plain" text reasonably.  It would be much more
relevant if you could actually find plaintext that Markdown mistakes for
a link or something to get it to be actually harmful.

Even then, because of what I've already stated, I'm not sure I'd change
it.

If it's such a hill to die on, I'd spend my time arguing with the
ada-language-server author to specifically provide those snippets inside
a MarkupContent struct.

João





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-01-08  9:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-12  0:46 bug#74807: 30.0.90; Eglot: Non-Markdown strings rendered as Markdown Troy Brown
2024-12-12  8:30 ` João Távora
2024-12-12 13:32   ` Troy Brown
2024-12-28 11:02     ` Eli Zaretskii
2025-01-06 11:56       ` João Távora
2025-01-06 23:56         ` Troy Brown
2025-01-07  0:28           ` João Távora
2025-01-08  3:56             ` Troy Brown
2025-01-08  9:18               ` João Távora

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).