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

Hooks on try and submit

Open marco-zan opened this issue 1 year ago • 2 comments

This is a request for a feature and a proposal to write it myself.

Every time a code is run or submitted to LetCode, I felt it would be helpful to call a hook. Except for the fact that I cannot locate the line where, for instance, leetcode-solution-mode-hook is called, I am unable to locate any evidence in the code that led me to believe that those hooks already exist.

I would need that to integrate the wakatime-mode melpa package, to keep track on the time spent with every problem.

This feature request is unrelated to the second integration with wakatime, and I would actually work on it later

marco-zan avatar Jun 20 '23 16:06 marco-zan

I think leetcode-solution-mode-hook is created by define-minor-mode and will be called when leetcode-solution-mode is enabled.

imakira avatar Jan 06 '24 16:01 imakira

I implemented a leetcode-before-submit-hook along with some other hooks for user customizations on my branch (overview of changes here https://github.com/nverno/leetcode.el/commit/6a878fdb3b49c75494e83323c63a35e3d7f452d9). However, I made so many changes I haven't decided which to submit as pull requests quite yet.

nverno avatar Jul 19 '24 01:07 nverno