Provide filter-buffer-substring-function in gfm-view-mode #493
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
gfm-view-mode
is used by eglot to show symbol information in markdown format. E.g. the LSP server send something like this as the documentation:eglot-help-at-point
will show this text nicely fontified bygfm-view-mode
.The first line (which usually is the signature info) of that text is also used as the eldoc message to show in the echo area. The problem is that the first line is actually invisible codeblock marker.
This PR provides the function that return buffer substring without codeblock markers and can be used as value of the
filter-buffer-substring-function
variable. This way fontified signature info can be shown in the echo area.Similar behavior is used by the
diff-mode
and thebacktrace-mode
.Thanks!
Type of Change
Checklist
make test
).