[Feature Request] extra hooks: onSubmitSuccess, onSubmitFailure, onTestSuccess, onTestFailiure #201

Open
opened 2025-09-06 07:00:08 -05:00 by jingyi-zhao-01 · 3 comments
jingyi-zhao-01 commented 2025-09-06 07:00:08 -05:00 (Migrated from github.com)

i see the hooks in lua script can be potentially extended to integrate more functionalities

hooks = {
    ---@type fun(question: lc.ui.Question, buffer, testcases_passed, testcased_broken)[]
    ["on_submit_success"] = {
      ## hook up external code that process situation when a submission success
    },

    ---@type fun(question: lc.ui.Question, buffer, testcases_passed, testcased_broken)[]
    ["on_submit_failure"] = {
      ## hook up external code that does analysis when a submission failes,
    },


    ---similar 


},
i see the hooks in lua script can be potentially extended to integrate more functionalities ```lua hooks = { ---@type fun(question: lc.ui.Question, buffer, testcases_passed, testcased_broken)[] ["on_submit_success"] = { ## hook up external code that process situation when a submission success }, ---@type fun(question: lc.ui.Question, buffer, testcases_passed, testcased_broken)[] ["on_submit_failure"] = { ## hook up external code that does analysis when a submission failes, }, ---similar }, ```
jingyi-zhao-01 commented 2025-09-06 07:01:24 -05:00 (Migrated from github.com)

do you want me to create a PR for this ?

do you want me to create a PR for this ?
kawre commented 2025-09-06 07:31:45 -05:00 (Migrated from github.com)

Sure, but it would be better to have one submit hook with result status as a parameter

Sure, but it would be better to have one submit hook with result status as a parameter
jingyi-zhao-01 commented 2025-09-17 02:35:44 -05:00 (Migrated from github.com)
https://github.com/kawre/leetcode.nvim/pull/203
Sign in to join this conversation.
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#201
No description provided.