yegappan / lsp

Language Server Protocol (LSP) plugin for Vim9
MIT License
484 stars 56 forks source link

Improve inlay hint's visual representation #412

Open laszbalo opened 11 months ago

laszbalo commented 11 months ago

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.