feat: company question list picker (leetcode.cn) #221

Open
fenixc9 wants to merge 2 commits from fenixc9/feat/company-question-list into master
fenixc9 commented 2026-04-23 12:00:13 -05:00 (Migrated from github.com)

Summary

  • Add the ability to browse and solve company interview question lists from leetcode.cn
  • Users select a company from a searchable picker (e.g. 字节跳动, 腾讯, 阿里巴巴) and view that company's curated problem set
  • Adds a "Company" button on the Problems page and a Leet company command
  • Supports all four picker providers: fzf-lua, telescope, mini.pick, and snacks.picker
  • This feature is cn-only (like the existing Hot 100 study plan picker)

API Used

Endpoint Operation Purpose
/graphql/noj-go InterviewHotCompanyCards Fetch company list (slug, name, question count)
/graphql/ favoriteQuestionList Fetch questions for a specific company's favorite list

How it works

  1. User opens the menu → Problems page → clicks "Company" (or runs :Leet company)
  2. A picker displays all companies (sourced from leetcode.cn's interview company cards API)
  3. User selects a company
  4. The plugin fetches that company's question list via favoriteQuestionList(favoriteSlug: "{company-slug}-thirty-days")
  5. Questions are filtered against the local problem cache and displayed in the standard question picker

Files Changed

File Change
lua/leetcode-plugins/cn/queries.lua +2 GraphQL queries
lua/leetcode/api/problems.lua +2 API functions (company_list, company_questions)
lua/leetcode/picker/init.lua +P.company() entry point
lua/leetcode/command/init.lua +cmd.company() command
lua/leetcode-ui/group/page/problems.lua +Company button
lua/leetcode/picker/company/* +5 new files (company picker module)
## Summary - Add the ability to browse and solve **company interview question lists** from leetcode.cn - Users select a company from a searchable picker (e.g. 字节跳动, 腾讯, 阿里巴巴) and view that company's curated problem set - Adds a "Company" button on the Problems page and a `Leet company` command - Supports all four picker providers: **fzf-lua**, **telescope**, **mini.pick**, and **snacks.picker** - This feature is **cn-only** (like the existing Hot 100 study plan picker) ## API Used | Endpoint | Operation | Purpose | |---|---|---| | `/graphql/noj-go` | `InterviewHotCompanyCards` | Fetch company list (slug, name, question count) | | `/graphql/` | `favoriteQuestionList` | Fetch questions for a specific company's favorite list | ## How it works 1. User opens the menu → Problems page → clicks "Company" (or runs `:Leet company`) 2. A picker displays all companies (sourced from leetcode.cn's interview company cards API) 3. User selects a company 4. The plugin fetches that company's question list via `favoriteQuestionList(favoriteSlug: "{company-slug}-thirty-days")` 5. Questions are filtered against the local problem cache and displayed in the standard question picker ## Files Changed | File | Change | |---|---| | `lua/leetcode-plugins/cn/queries.lua` | +2 GraphQL queries | | `lua/leetcode/api/problems.lua` | +2 API functions (`company_list`, `company_questions`) | | `lua/leetcode/picker/init.lua` | +`P.company()` entry point | | `lua/leetcode/command/init.lua` | +`cmd.company()` command | | `lua/leetcode-ui/group/page/problems.lua` | +Company button | | `lua/leetcode/picker/company/*` | +5 new files (company picker module) |
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 fenixc9/feat/company-question-list:fenixc9/feat/company-question-list
git switch fenixc9/feat/company-question-list

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 fenixc9/feat/company-question-list
git switch fenixc9/feat/company-question-list
git rebase master
git switch master
git merge --ff-only fenixc9/feat/company-question-list
git switch fenixc9/feat/company-question-list
git rebase master
git switch master
git merge --no-ff fenixc9/feat/company-question-list
git switch master
git merge --squash fenixc9/feat/company-question-list
git switch master
git merge --ff-only fenixc9/feat/company-question-list
git switch master
git merge fenixc9/feat/company-question-list
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!221
No description provided.