vscode-R: VSCode autocompletion doesn't "complete", duplicates existing text
Apologies if this is easily fixed, but I wasn’t able to find it in the docs.
On my Mac, when I type any VSCode autocompletion, the autocompletion appends to what I have already written, producing invalid code. Say I’m writing is.infinite, and I have written is., I navigate over to infinite and press tab or Enter and the editor produces is.is.infinite().
Is there a setting to change this behavior? Is this intended to be the default behavior? Or am I missing something?
Thank you.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 4
- Comments: 18 (10 by maintainers)
Yes, I could reproduce it in rmd. Thanks for reporting!
Thanks!
A further detail: it seems to only occur with completions in the
is.and theas.family (perhaps others???). When I typegeoand fillgeom_point, it correctly appends the remaining text. I thought it had to do with dot operators, but typingdata.correctly completes todata.frame. Strangely, typinginfiniteand then selectingis.infiniteautocompletes the correct code.It is an editor issue, let me transfer it to vscode-R.
From the logging of the languageserver, the beginning tokens seem correct:
Sure. The above issues were on vscode-R (2.3.1), vscode release (1.61.0) on macOS (11.5.2) with languageserver (0.3.11). Updating to vscode (1.61.1) did not resolve the issue. I doubt the OS version would make a difference?
Ah! I just noticed that this issue only occurs inside .Rmd code chunks and not in .R files. Can you reproduce there?