yegappan / lsp

Language Server Protocol (LSP) plugin for Vim9
MIT License
461 stars 54 forks source link

Join list with ', ' for Inlay hint lead wrong format in Rust Analyzer #416

Closed CoelacanthusHex closed 9 months ago

CoelacanthusHex commented 9 months ago

Like https://github.com/prabirshrestha/vim-lsp/issues/1430, yegappan/lsp join the list with ', '. https://github.com/yegappan/lsp/blob/38970403dc4d602056ea4028664206ffce74e82a/autoload/lsp/inlayhints.vim#L47-L47 This leads the wrong format, like this: 图片

CoelacanthusHex commented 9 months ago

If change ', ' to '', it looks good. 图片

Shane-XB-Qian commented 9 months ago

could you open a PR? this looks nice, but not sure if you could find others langs to verify it as well, specially if its/the type of hint label is a 'list'.

CoelacanthusHex commented 9 months ago

could you open a PR? this looks nice, but not sure if you could find others langs to verify it as well, specially if its/the type of hint label is a 'list'.

Submitted. I think it's no problem for normal ls implementations. prabirshrestha/vim-lsp and YCM have used it for a long time, and no one reported there is an issue. For further improvement, it may need LSP spec standardize how to render the list label.