Skip to content

R: Snippets should stand down when completing ?some_function #3108

Closed
@jennybc

Description

@jennybc

It's hard to request help via ? for a function that is a snippet. You can't benefit from the completion without getting more than you bargained for.

At first I thought this was just an add-on to #2338, but then I realized that my chosen example (lapply()) isn't just getting unwanted parentheses (basically harmless, I suppose), but also getting a full function signature, which truly does break the ? call.

What's special about lapply()? It's one of our built-in snippets.

https://github.com/posit-dev/amalthea/blob/486dc8bfa516ea45eb4eaddb19b2128bf51f679d/crates/ark/resources/snippets/r.code-snippets#L113-L117

I wish I could type ?lap then mash enter to get ?lapply then mash enter again to see help.

Screen.Recording.2024-05-10.at.3.02.53.PM.mov

Metadata

Metadata

Assignees

Labels

area: completionsIssues related to Completionsarea: helpIssues related to Help category.bugSomething isn't workinglang: r

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions