emacs-lsp / lsp-ui

UI integrations for lsp-mode
https://emacs-lsp.github.io/lsp-ui
GNU General Public License v3.0
1.04k stars 140 forks source link

[lsp-ui-doc] Prevent overriding face in lines below inline doc #621

Closed gexplorer closed 3 years ago

gexplorer commented 3 years ago

When displaying the doc inline, the lines below the documentation loose their format.

This is the code before displaying the inline doc:

without-doc

After displaying the inline doc, the face of the lines below it reset to default:

inline-doc

This PR fixes this problem:

inline-doc-after-PR

The problem is the way the the overlay is trying to prevent inheriting the face of the text below. After merging the buffer-string and the doc-string the default face was being applyed to the whole text.

Instead of this the problem can be solved by applying the default face to the overlay.