azdavis / millet

A language server for Standard ML.
https://azdavis.net/posts/millet
Apache License 2.0
196 stars 12 forks source link

Add inlay hints #28

Closed azdavis closed 1 year ago

azdavis commented 1 year ago

Problem

You can hover over things to get their type, but there's no way for Millet to "always" show this information without hovering.

Solution

Add support for inlay hints, which could show this information. It's in the LSP standard.

azdavis commented 1 year ago

Already somewhat implemented

https://github.com/azdavis/millet/blob/4e0bed39cdb0e858cbbf84248537bdd3a01dabcc/crates/analysis/src/lib.rs/#L280-L308

azdavis commented 1 year ago

Done in v0.12.0

bzy-debug commented 9 months ago

Is there an option to turn off the inlay hint?

Inlay hint sometimes makes the function less readable:

Screenshot 2023-09-11 at 23 27 15

It breaks the indentation of function implementation

azdavis commented 9 months ago

you can turn them off via editor.inlayHints.enabled in vscode

azdavis commented 9 months ago

https://github.com/azdavis/millet/blob/main/docs/manual.md#inlay-hints