You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a package developer, I would find it very useful to have a function that allows me to distinguish between IDEs like Positron and RStudio.
For instance, Positron does not support inline display of tables in Quarto notebooks, whereas RStudio does. So a table-drawing package needs to behave differently and only tables in the viewer when in Positron.
Currently, we can hack our way there by checking if some function is available (ie: generates an error), but those solutions feel hacky.
Unless there is 100% feature parity between editors, it will likely always be useful for developers to know where things are run.
There are RSTUDIO and POSITRON environment variables that you can consult that are each set within the context of the respective IDEs. They're briefly mentioned in an example here: https://positron.posit.co/extensions.html#compatibility
As a package developer, I would find it very useful to have a function that allows me to distinguish between IDEs like Positron and RStudio.
For instance, Positron does not support inline display of tables in Quarto notebooks, whereas RStudio does. So a table-drawing package needs to behave differently and only tables in the viewer when in Positron.
Currently, we can hack our way there by checking if some function is available (ie: generates an error), but those solutions feel hacky.
Unless there is 100% feature parity between editors, it will likely always be useful for developers to know where things are run.
Thanks for considering!
Related to: #302
The text was updated successfully, but these errors were encountered: