Skip to content

Visual selection #734

Closed
Closed
@chewcw

Description

@chewcw

I have a keymap in visual mode to open the chat, and I need to put the visual selection to the context of the chat.

  vim.keymap.set('v', '<leader>ccd', function()
    local input = 'Explain the keyword',
    require('CopilotChat').ask(input, { selection = require('CopilotChat.select').visual })
  end)

For example I have this line of text Lorem Ipsum is simply dummy text of the printing and typesetting industry. and I highlight the dummy word and open the chat using the keymap I created earlier.

Problem:
The context is the entire line.

Expectation:
I would expect the context of the chat should be dummy.

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