Skip to content

[FEATURE] Forward current line of cursor as context when no visual selection is active #243

@agloo

Description

@agloo

Feature Description

When Claude is connected to an nvim session using /ide and a user sends a prompt to Claude with no visual selection active, forward the current cursor position.

Use Case

In every other editor I've bound to Claude with via /ide I've gotten used to telling the model "This line is such-and-such" with the implicit assumption that it knows where my cursor is. This plugin automatically sends the selection over, so I've found I can get the same behavior by just hitting v before I talk to Claude, but it breaks the standard I'm used to.

Proposed Solution

The plugin already forwards your '<,'> visual selection on every prompt submission, so this should just have to add a case when no selection exists. It looks like we're sending filename + line number + text when we send a selection and I'd expect we want to package it the same way.

Alternatives Considered

Hitting V in nvim before prompting already does the same thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions