treat constant functions as functions
Let's use the following example code:
pub const Writer = struct {
write: fn (bytes: []const u8) usize,
pub fn write_all(self: *Writer, bytes: []const u8) void {
var i = 0;
while (i < bytes.len) {
i += self.write(bytes);
}
}
};
When using the language server, if you try to reference the write function, it will not be treated as a function as it is considered a value. However, by all intensive purposes, it is a function. For this reason, I motion that these be treated as functions by the language server.
I understand that it may be important to have a distinction between an actual function and a constant function, however, this will enhance the experience of actually using them and remove confusion.
related issue #423
imo it should not because the color it gets helps you differentiate whether its a field or a decl. they operate in different namespaces and are allowed to shadow/conflict so long as the reference is unambiguous