positron icon indicating copy to clipboard operation
positron copied to clipboard

R: Autocompletion appends parentheses when there are already parentheses

Open FinYang opened this issue 1 year ago • 2 comments

Currently in Positron, when typing function in front of parentheses, accepting autocompletion will add another extra parentheses.

Kapture 2024-08-22 at 23 12 35

This isn't consistent with RStudio, where no additional parentheses are added.

Kapture 2024-08-22 at 23 14 43

This is an issue for me because I am used to sometimes type the parentheses first then the function name, for example when I want to change the function, or add another layer outside without using pipe.

Version details

Positron Version: 2024.08.0 (Universal) build 31 Code - OSS Version: 1.91.0 Commit: 7ee0596b81d578059e63c9af7c535c6b6040b947 Date: 2024-08-10T14:49:10.180Z Electron: 29.4.0 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.6.0

FinYang avatar Aug 22 '24 13:08 FinYang

I was sure we already had an issue for this, but I can't find it! Let's track this here then (it's been on our minds too).

lionel- avatar Aug 22 '24 13:08 lionel-

Related to #2338 in that it is about adding parentheses when we don't want any.

juliasilge avatar Aug 26 '24 22:08 juliasilge

Can be verified once .ps.ark.version() in R Console reports that ark is at 0.1.193 or above.

jennybc avatar Jun 24 '25 21:06 jennybc

Verified Fixed

Positron Version(s) : 2025.07.0-187 OS Version(s) : MacOS

Test scenario(s)

Confirmed that autocompletion does not append parenthesis if they already exist. Closing as resolved.

Link(s) to test cases run or created:

n/a

midleman avatar Jun 25 '25 15:06 midleman