REditorSupport / REditorSupport/vscode-R

Existing brackets are ignored when function is autocompleted

Open
#1,440 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.2k
Forks
139
Avg merge
2h 46m
Merged PRs (30d)
5

Description

Apologies this may likely be an issue for the language-server but I wasn't sure where to post it as its vscode specific.

As an aside would be keen to hear if others experience this issue or if its just me as I was surprised that I couldn't find any existing issue for it.

Describe the bug
If you auto complete a function that has existing brackets then they are ignored and new ones are inserted e.g.

2023-10-18 11 21 11

To Reproduce
See above Gif

Can you fix this issue by yourself? (We appreciate the help)
No

(If yes,) can we assist you with anything?

(If applicable) Please attach setting.json

    "r.alwaysUseActiveTerminal": true,
    "r.liveShare.defaults.shareWorkspace": false,
    "r.lsp.promptToInstall": false,
    "r.session.objectTimeout": 10,
    "r.session.useWebServer": true,
    "r.sessionWatcher": true,

Expected behavior
No new brackets should be inserted

Environment (please complete the following information):

  • OS: macOS (13.3.1)
  • VSCode Version: 1.83.1
  • R Version: 4.3.1
  • vscode-R version: 2.8.2

Additional context
Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the autocomplete behavior in VS Code with the reported R and vscode-R versions, using a function call that already has brackets. Start by tracing the extension's completion handling; done means existing brackets are respected and no duplicate brackets are inserted.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript, vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.