zls
zls copied to clipboard
Add bunch of properties to primitive types for casting
@'s are annoying af to type
I propose the following to help:
var myf:f32 = 0.0
var myint:i32 = myf.int // <- completion: 'intFromFloat', if user validates, it becomes:
var myint:i32 = @intFromFloat(myf)|;
^
|_cursor
another one:
var myint = @intFromFloat(myf).as; // <- completion: 'as', if user validates, it becomes:
var myint = @as(|, @intFromFloat(myf));
^
|_cursor