posit-dev / positron

Positron, a next-generation data science IDE
https://positron.posit.co
Other
2.83k stars 91 forks source link

R: Navigating to assigned objects #5274

Closed lionel- closed 6 days ago

lionel- commented 2 weeks ago

The new OO system S7 (https://github.com/RConsortium/S7) is currently not well supported by Positron's navigation features. See here for an example usage: https://github.com/tidyverse/elmer/blob/a7b55f39890a544d0d2897ca3a357b6dbfa4e70b/R/provider.R#L15-L39

The main reason for this lack of support is that we currently only index functions as workspace symbols. Since S7 generics and classes are not functions, they are currently not indexed.

What's missing:

Since generics and classes are simple objects, a general way to fix this would be to index all assigned objects, including e.g. data frames and vectors. This would improve the experience in user scripts as users will be able to navigate to these objects using "Go to" commands.

jonvanausdeln commented 6 days ago

Verified Fixed

Positron Version(s) : 2024.12.0-44 OS Version(s) : Windows 11

Test scenario(s)

Verified symbols/references can be found in

Link(s) to TestRail test cases run or created:

None