scalameta / nvim-metals

A Metals plugin for Neovim
https://scalameta.org/metals/
Apache License 2.0
466 stars 75 forks source link

fix: check for the existence of hoverMessage before using #627

Closed ckipp01 closed 10 months ago

ckipp01 commented 10 months ago

In theory the way we use decorations (not being an inline decoration provider) we shouldn't hit on this and never have. However https://github.com/scalameta/metals/issues/5843 caused me to realize that hoverMessage is optional and we shouldn't assume it will always be there. This change checks the existence of it before actually trying to store the message to display later.