Implementing Cursor AI editor-style inline suggestions with hover controls in VS Code extensions #2649
Unanswered
saileshkalakoti
asked this question in
Extension Development QnA
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to create a VS Code extension that shows inline code suggestions similar to Cursor AI's (or Github Copilot) implementation. Specifically, I need to show the original code with a red background and the suggested alternative below it with a green background, without adding extra lines to the document. When hovering over these lines, accept/reject controls (✓ ?) should appear.
Also, the suggestion should be in a virtual line, and line count of the file should not increase, while we are seeing the suggestion.
Tried few things like createTextEditorDecorationType or codelens. But wasn't able to achieve the same.
Is it even possible for a vs code extension to do that?
Beta Was this translation helpful? Give feedback.
All reactions