Skip to content

feat: added inlay hints#487

Merged
dy-tea merged 3 commits intovlang:masterfrom
cadamsdev:feat/inlay-hints
Mar 12, 2026
Merged

feat: added inlay hints#487
dy-tea merged 3 commits intovlang:masterfrom
cadamsdev:feat/inlay-hints

Conversation

@cadamsdev
Copy link
Copy Markdown
Contributor

@cadamsdev cadamsdev commented Mar 11, 2026

Adds support for inlay hints
https://code.visualstudio.com/docs/typescript/typescript-editing#_inlay-hints

Preview

Screenshot 2026-03-11 at 7 40 22 PM

Support

RHS / Declaration Example Inferred Type Shows Hint?
Integer literal x := 42 int
Negative integer x := -7 int
Hex literal x := 0xff int
Octal literal x := 0o77 int
Binary literal x := 0b1010 int
Float literal x := 3.14 f64
Single-quote string x := 'hello' string
Double-quote string x := "hello" string
Boolean x := true bool
mut variable mut x := 42 int
Single-line const const pi = 3.14 f64
const block const (\n max = 100\n) int
Same-file fn call msg := get_greeting() string
Local project fn call msg := helper_fn() string
Stdlib fn call dir := os.temp_dir() string
Result fn call data := read() or { return } string ✅ (strips !)
Cast expression x := u16(12) ❌ needs compiler
Struct init x := MyStruct{} ❌ needs compiler
Array init x := []int{} ❌ needs compiler
Method call x := obj.method() ❌ needs type inference
Multi-assignment a, b := split() ❌ not supported

@JalonSolov
Copy link
Copy Markdown
Contributor

A conflict, now that #486 was merged.

@cadamsdev
Copy link
Copy Markdown
Contributor Author

A conflict, now that #486 was merged.

Fixed 🙂

@dy-tea dy-tea merged commit 4b3c7ed into vlang:master Mar 12, 2026
3 checks passed
@dy-tea
Copy link
Copy Markdown
Member

dy-tea commented Mar 12, 2026

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants