You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(context): add inline visual selection insertion
Adds a new command and API to insert the current visual selection as a
formatted code block directly into the input buffer. This includes a new
`add_visual_selection_inline` function, a corresponding keymap, and a
helper to build the formatted text. Unit tests are provided to ensure
correct formatting and error handling for edge cases.
* feat(context): improve inline selection formatting
Update the inline visual selection text to use bolded file path formatting
(**`path/to/file`**) instead of the previous "Here is some code from"
prefix. Adjust unit tests to match the new output format. This change
makes the inserted context more visually distinct and concise.
* feat: add inline visual selection insertion action
Add new action `add_visual_selection_inline` with keymap `<leader>oY` to
insert visually selected code directly into the input buffer as a Markdown
code block, prefixed with the file path. Updates documentation with usage
details and example. Leaves cursor in normal mode for prompt editing.
**add_visual_selection_inline** inserts the visually selected code directly into the input buffer as a Markdown code block, prefixed with the file path:
662
+
663
+
```
664
+
**`path/to/file.lua`**
665
+
666
+
```lua
667
+
<selected text>
668
+
```
669
+
```
670
+
671
+
The cursor is left in normal mode in the input buffer so you can type your prompt around the inserted snippet.
672
+
659
673
### Run opts
660
674
661
675
You can pass additional options when running a prompt via command or API:
0 commit comments