[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69647: [PATCH 1/2] Delete trailing whitespace when formatting LSP do
From: |
João Távora |
Subject: |
bug#69647: [PATCH 1/2] Delete trailing whitespace when formatting LSP documentation |
Date: |
Fri, 8 Mar 2024 21:02:26 +0000 |
On Fri, Mar 8, 2024 at 8:54 PM Jim Porter <jporterbugs@gmail.com> wrote:
>
> On 3/8/2024 7:48 AM, Philip Kaludercic wrote:
> > Tags: patch
> >
> > LSP servers like clangd generate trailing whitespace, that when rendered
> > as markdown causes parts of the buffer to be underlined. Unless there
> > is a reason for this, I'd suggest helping out by deleting trailing
> > whitespace before continuing to process the documentation.
>
> In Markdown, two trailing spaces at the end of a line means "insert a
> line break here". I'm not sure we should remove that; instead,
That's precisely what I was fearing in the other thread.
> markdown-mode should handle this as appropriate in its view modes when
> 'markdown-hide-markup-in-view-modes' is non-nil (the default).
And that's probably the ideal solution too. But as far as I remember,
markdown-view-mode (or whatever it's called) is not used for viewing the
documentation. it is used somewhere in the pipeline to render the text in a
buffer which is then yanked using `buffer-substring` (with properties).
So I don't know how that'd work. Maybe Philip's patch can be tweaked to leave
those specific bits of trailing whitespace alone? And do we really want to
preserve the LSP server's notion of a line break anyway? It has no
concept of how wide
the Emacs window is. I'd say paragraphs yes, line breaks no. But
I'm probably
mistaken there too,
- bug#69647: [PATCH 1/2] Delete trailing whitespace when formatting LSP documentation, Philip Kaludercic, 2024/03/08
- bug#69647: [PATCH 1/2] Delete trailing whitespace when formatting LSP documentation, João Távora, 2024/03/08
- bug#69647: [PATCH 1/2] Delete trailing whitespace when formatting LSP documentation, Jim Porter, 2024/03/08
- bug#69647: [PATCH 1/2] Delete trailing whitespace when formatting LSP documentation,
João Távora <=
- bug#69647: [PATCH 1/2] Delete trailing whitespace when formatting LSP documentation, Jim Porter, 2024/03/08
- bug#69647: [PATCH 1/2] Delete trailing whitespace when formatting LSP documentation, Jim Porter, 2024/03/08
- bug#69647: [PATCH 1/2] Delete trailing whitespace when formatting LSP documentation, Philip Kaludercic, 2024/03/09
- bug#69647: [PATCH 1/2] Delete trailing whitespace when formatting LSP documentation, Jim Porter, 2024/03/09
- bug#69647: [PATCH 1/2] Delete trailing whitespace when formatting LSP documentation, Philip Kaludercic, 2024/03/09
- bug#69647: [PATCH 1/2] Delete trailing whitespace when formatting LSP documentation, Jim Porter, 2024/03/10
- bug#69647: [PATCH 1/2] Delete trailing whitespace when formatting LSP documentation, Philip Kaludercic, 2024/03/22