HaxeFoundation / HaxeFoundation/haxe

[display] range of field access hovers

Open
#7,975 3 comments 0 reactions 1 assignee Claimed by @Simn View on GitHub
enhancement feature-ide
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

When hovering over `Std`, only that token is part of the hover range. However, when hovering over `int`, the entire `Std.int` is highlighted.

This has an unfortunate consequence: When you move left-to-right, the hover switches from `Std` to `int` as expected:

![](https://i.imgur.com/HvqHSIp.gif)

However, moving in the other direction, nothing happens, as `Std` is already part of the current hover's range - if you want the docs on `Std`, you need to awkwardly "cancel" the current hover first:

![](https://i.imgur.com/6U2xZx1.gif)

I think it would be best if the range only included the actual field name, not the previous path part(s) as well. That seems to be what other languages like TS do.

____

```haxe
class Main {
static function main() {
var i = Std.int(0);
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.