blob view code folding#47266
Conversation
Bundle size report 📦
Look at the Statoscope report for a full comparison between the commits 4b95951 and 7e7805d or learn more. Open explanation
|
|
Is it possible to fold with keyboard shortcuts based on the current selection? |
|
Another Q: how does moving the selection interact with folded ranges? IntelliJ folding has always felt a lot more intuitive and useful than VS Code folding because it moves the cursor over folded regions while VS Code expands the folded range when the cursor moves into it. A very common situation where I like using folding is to fold the current method/class and then move down to reach the next method/class. |
@olafurpg, added folding keybindings support in https://github.com/sourcegraph/sourcegraph/pull/47266/commits/712beee713976caf230b4745e5a3c87dde4afa11. The only issue with it is that the |
@olafurpg, the current behavior is VSCode-like: it expands the folding when cursor moves inside. |
Not a blocking issue for this PR, but could we get the IntelliJ behavior where it skips the folded range? As long as we know which ranges are folded then we could update the arrow keybindings to skip those ranges. |
Adds indent-based VSCode-like code folding.
Screen.Recording.2023-02-01.at.17.24.00.mov
Test plan
Tested manually (video attached).
App preview:
Check out the client app preview documentation to learn more.