[feature-request] VSCode extension: show available variables within scope of cursor

You know when using Chrome debugger that you set a breakpoint and you see all the available data within that scope.

It would be helpful to have something similar in ReScript’s VSCode extension.
The user would click with the cursor on a line within a .res file and on the sidebar it would list all the identifiers available within the scope of the current function.

For an easy example

module Methods = {
   let x = 100
   
   let add = (a, b) => {
      a + b // set mouse cursor here
   }
}

By clicking on the line with a + b you would see in the outline x, a, b as available scope identifiers.

1 Like

Interesting idea. Is there something equivalent available in some other extension you know of?

1 Like

I haven’t seen any extension like that.
I thought of it because i normally have many shallow but long functions or react components and I constantly need to be scrolling up and down and digging in to find if there is a type within scope. The outline view from VSCode do help but it is hard to know what is in scope if you have many functions and identifiers in the same file.

2 Likes