lsp icon indicating copy to clipboard operation
lsp copied to clipboard

Improve inlay hint's visual representation

Open laszbalo opened this issue 2 years ago • 0 comments

This is how coc.nvim displays the types and parameters for a golang source file:

coc-inlay-hints-paramters-and-types

They link both the parameter and type inlay hints to the Conceal highlight group. Also, there is one space character before the type inlay hint, and one after the parameter inlay hint. While the space character after the parameter inlay hint is not necessary, it is nice to have before the type inlay hint, at least for golang code.

In contrast, this is how it currenlty looks in lsp:

lsp-inlay-hints-paramters-and-types

As you can see, the Human type inlay hint looks like normal golang code, not a hint. Also, there is no space between the variable name and the type inlay hint.

To make the type inlay hint to look like an inlay hint, one could just link the LspInlayHintsType highlight group to Conceal instead of Label, but I think this should be the default.

laszbalo avatar Nov 11 '23 11:11 laszbalo