Add in-place question shuffle feature (no more buffer clutter!) #188

Open
MandalTuhin wants to merge 11 commits from MandalTuhin/master into master
MandalTuhin commented 2025-06-23 11:02:12 -05:00 (Migrated from github.com)

This PR adds a “shuffle” feature to LeetCode.nvim, allowing users to load a new random question in the same buffer, with the question info panel updating as well. Previously, using the random feature would open a new buffer each time, requiring manual cleanup. Now, users can quickly browse random questions—just like the shuffle button on the LeetCode website!

Key changes:

  • Adds a shuffle() method to the Question object
  • Updates the code and info buffers in-place
  • Keymap example: ls to shuffle in the current question buffer

Benefits:

  • Much faster random question browsing
  • No buffer clutter

I’d love feedback and am happy to make changes as needed!

This PR adds a “shuffle” feature to LeetCode.nvim, allowing users to load a new random question in the same buffer, with the question info panel updating as well. Previously, using the random feature would open a new buffer each time, requiring manual cleanup. Now, users can quickly browse random questions—just like the shuffle button on the LeetCode website! Key changes: - Adds a shuffle() method to the Question object - Updates the code and info buffers in-place - Keymap example: <leader>ls to shuffle in the current question buffer Benefits: - Much faster random question browsing - No buffer clutter I’d love feedback and am happy to make changes as needed!
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin MandalTuhin/master:MandalTuhin/master
git switch MandalTuhin/master

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff MandalTuhin/master
git switch MandalTuhin/master
git rebase master
git switch master
git merge --ff-only MandalTuhin/master
git switch MandalTuhin/master
git rebase master
git switch master
git merge --no-ff MandalTuhin/master
git switch master
git merge --squash MandalTuhin/master
git switch master
git merge --ff-only MandalTuhin/master
git switch master
git merge MandalTuhin/master
git push origin master
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
arduinohatesme/leetcode.nvim!188
No description provided.