This bounty is no longer available
Web3 DAO | hyperledger-labs Logo

Improve tooltip and clickable links




in over 262 years



400 USD


Raison D’être

The Solang compiler has a VSCode extension that allows developers to visualize errors and warnings directly on the editor. This extension works, but needs many improvements to become more useful for everyone.

What needs to be done?

Some things are missing from the current VSCode extension. The tooltip does not support function definitions and inline assembly. In addition, we would like to see some improvements to the existing implementation. The tooltip should contain a clickable link to go to references for every supported type and the description of the tip should be rewritten.

Given this solidity:

contract c {
	struct S {
	   int[2] f1;
	   X f2;

	struct X {
	   bool g1;

     function f(S s) public returns (bool) {
         return s.f2.g1;
     function g() public {
         bool b = f(S({f1: [1,2]: f2: X(true)}));

Then a tooltip/hover over the function argument s (both occurrences) should give you:

struct C::S {
   int[2] f1;
   X f2;
Go to C::S

The C::S should be a link which sends the cursor to the definition. Hovering over X within this tooltip should produce another tooltip for C::X with a similar content. When hovering over f2 or g1 in s.f2.g1 the definition of f2 or g1 should be given.

When hovering over f (both occurrences) there should be a tooltip like so:

function C::f(S s) public returns (bool)
Go to C::f

Within this tool tip, hovering over S should do the same.

Hovering over warnings, informationals, and errors should give a tooltip with their message. All other variables and types, such events, contracts, internal functions, external functions, storage variables, variables, constant variables and enums, should have a similar tooltip, listing their fields with a link to the type definition. Any doc comments for a type should also be given in a tooltip. For constants, their constant value should be displayed.

What should be a complete project?

  • Support function definition in the VSCode extension.
  • Support inline assembly in the VSCode extension.
  • Add clickable links to the tooltip and fields for all types and variables
  • Improve the description of the tooltip modal.

How will the PR be evaluated?

  1. We would like to see a single PR containing all the milestones.
  2. The PR must have vscode tests (by extending existing tests). We want to make sure the implementation works.
  3. Include in your PR screenshots of the new functionalities.