Closed MilesMcBain closed 4 years ago
After digging a bit deeper into the source of the API I see this might be a bit of a goof. I had assumed that hasFun checked with RStudio if the call was supported but that appears no to be so.
So what I might do then is make VSCode ignore the version requirement for hasFun, findFun etc. That way you could use your original version constraints with those. If you're ammenable to that let me know. And I can update the PR.
Turns out I was right the first time see replies and end of this: https://github.com/Ikuyadeu/vscode-R/issues/302#issuecomment-703023270
Hi Miles, thanks for the PR. I have been following the activity on the VSCode project closely and was delighted to see you efforts over there. In fact, I was considering to deprecate citr
in favor of the new RStudio Visual Editor, but if it is of some interest to VSCode users, I may reconsider.
Hi,
Very soon VSCode will have support for RStudio addins.
citr
is quite a popular addin so I thought I would test compatibility.Currently the way
citr
checks for specific RStudio versions is not compatible with VSCode{rstudioapi}
emulation, since VSCode will probably never lie and claim to be a specific RStudio version. However ifcitr
checks for API functions it is dependent on usingrstudioapi::hasFun
, it would be fully compatible with VSCode. I have made this change in this PR and tested it locally and it verifiedcitr
works with VSCode and RStudio using this verification method.Thanks for the great addin. I would love to be able to include it on the list of verified supported addins in VSCode.