hardhat-vscode icon indicating copy to clipboard operation
hardhat-vscode copied to clipboard

Hovering variables/functions doesn't show anything

Open kanej opened this issue 3 years ago • 2 comments
trafficstars

In the language server spec this feature is referred to as hover:

https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_hover

You can see it in action in typescript:

image

We may want to split out different syntactic elements and implement them based on ease/speed to feature:

  • variables
  • functions
  • contracts

kanej avatar Feb 08 '22 11:02 kanej

I am still not getting anything on hover for anything imported. Turning on verbose logging setting it says "no results returned".

For example (I’ll grab a screencap if it helps) but basically:

  1. Using Counters for Counters.<Co…> this does not recognize the Counter struct (it offers Counters or Context)
  2. Counters.Counter private _ids;

_ids isn’t recognized as a Counter nor are any of its Counters methods displayed when used in functions.

I posted about this on discord but haven't heard how to get it working. Any advice?

the-vampiire avatar Apr 30 '22 03:04 the-vampiire

Interestingly it does recognize Counters (in the using statement). If I hover over it I get the Counters contract info and with cmd click can navigate to it. But after that point nothing else is hoverable or recognized for intellisense

the-vampiire avatar Apr 30 '22 03:04 the-vampiire