leetcode.nvim icon indicating copy to clipboard operation
leetcode.nvim copied to clipboard

Feature request: Add a recent list

Open HakonHarnes opened this issue 11 months ago • 5 comments

Description

I often find myself revisiting leetcode problems to redo them. Having a list of recent leetcode problems that I have opened (i.e. a history of problems) would be convenient. The list should be sorted in most-recent order.

Proposed solution

This could be implemented by creating a file which keeps track of recently opened leetcode problems. The feature could be implemented as:

  1. Leet recent command with an entry in Menu -> Problems -> Recent
  2. Leet history command with an entry in Menu -> Problems -> History

Alternatively, a suitable Leetcode API endpoint could be used, if it exists.

HakonHarnes avatar Mar 05 '24 09:03 HakonHarnes

I felt like history functionality is a good idea. By the way, the current implementation overwrites former work regardless of whether you've submitted it or not. The Leet history thing should kind of restore previous work in some way.

yangrq1018 avatar Mar 07 '24 08:03 yangrq1018

Is what you are looking for? Also, what would be the condition to add a question to recent list? Right now, it only gets added if the question was run, since adding questions only if they were opened would flood the list with useless data rather quickly, I guess.

kawre avatar Mar 09 '24 12:03 kawre

Exactly what I'm looking for. Thanks!

Right now, it only gets added if the question was run, since adding questions only if they were opened would flood the list with useless data rather quickly, I guess.

Seems like the best approach!

HakonHarnes avatar Mar 09 '24 12:03 HakonHarnes

Realized the PR hasn't been merged yet. Re-opening the issue until then.

HakonHarnes avatar Mar 16 '24 10:03 HakonHarnes

Would like to see this merged as well.

mixtli avatar Aug 28 '24 22:08 mixtli