positron icon indicating copy to clipboard operation
positron copied to clipboard

Ark: `$` and `@` could be even smarter, especially with lists and environments containing functions (which includes R6)

Open DavisVaughan opened this issue 1 year ago • 1 comments

In RStudio, completions after x$ and x@ use x for 2 things:

  • Determines the possible names of the things on the RHS with .DollarNames() and .AtNames()
  • Determines the possible types of the things on the RHS as well

We only do the 1st of these, which means when there is a function on the RHS and we accept it, we don't add parentheses automatically for the user. RStudio can do this, and it is particularly nice with R6 (and lists too).

https://github.com/posit-dev/positron/assets/19150088/cc2ee637-4751-4b69-a0cb-b37be3a838c0

Screenshot 2024-04-30 at 9 47 37 AM

DavisVaughan avatar Apr 30 '24 13:04 DavisVaughan

IntelliSense in VSCode have the following icons to differentiate methods/functions, variables or fields, and more. However, as mentioned in #3793, for packages built with R6, it shows everything as "Variables"

image

Fred-Wu avatar Jul 03 '24 10:07 Fred-Wu