onivim / oni2

Native, lightweight modal code editor
https://v2.onivim.io
MIT License
7.83k stars 281 forks source link

How to perform some code refactoring with onivim2? #3244

Open jerabaul29 opened 3 years ago

jerabaul29 commented 3 years ago

How should code refactoring be performed in Onivim2? Things like changing variable names across files, changing snippets, etc? Are some tools available / implemented in onivim2 for that?

bryphe commented 3 years ago

Good question - this is actually something I'm planning to look at for the next milestone's work. At least, integrating code refactorings that are provided by VSCode extensions.

From the UI perspective, I plan to:

From the technical side, we'll integrate with the codeAction and codeAction/resolve APIs - which are these extension host APIs: https://github.com/onivim/vscode-exthost/blob/0d6b39803352369daaa97a444ff76352d8452be2/src/vs/workbench/api/common/extHost.protocol.ts#L1495

We'll also need to implement these APIs:

Related to #3231 #3017

brainpicture commented 3 years ago

Literally waiting only for this feature. Looks like this is the last blocker I have.

jesstelford commented 3 years ago

$tryApplyEdits has been implemented in https://github.com/onivim/oni2/pull/3571