Coder Social home page Coder Social logo

Comments (4)

csh0101 avatar csh0101 commented on September 1, 2024 2

I read the lua code. but i'm noob for lua .

local function display_questions(search_query)
	local graphql_endpoint = config.graphql_endpoint

	local variables = {
		limit = 20,
		filters = {
			difficulty = M.difficulty,
			searchKeywords = search_query,
			status = M.status,
		},
	}

	local query = [[
    query problemsetQuestionList($limit: Int, $filters: QuestionListFilterInput) {
  ]] .. (config.domain == "cn" and [[
      problemsetQuestionList(
  ]] or [[
      problemsetQuestionList: questionList(
  ]]) .. [[
        categorySlug: ""
        limit: $limit
        filters: $filters
    ) {
  ]] .. (config.domain == "cn" and [[
          total
          questions {
            paidOnly
            titleCn
            frontendQuestionId
  ]] or [[
          total: totalNum
          questions: data {
            paidOnly: isPaidOnly
            titleCn: title
            frontendQuestionId: questionFrontendId
  ]]) .. [[
            difficulty
            isFavor
            status
            titleSlug
        }
      }
    }
  ]]

limit 20 is a hard code for questions query.

in my situation, domain is "cn"..

so the graphql query is this.

query problemsetQuestionList($limit: Int, $filters: QuestionListFilterInput) {
  problemsetQuestionList(
    categorySlug: ""
    limit: $limit
    filters: $filters
  ) {
    total
    questions {
      paidOnly
      titleCn
      frontendQuestionId
      difficulty
      isFavor
      status
      titleSlug
    }
  }
}

at the moment, I find we can only find the 1-20 problem..

do you consider add page scroll for this? a configured page size for every page. maybe it's 20 '30 '50, and user can press shortcut to jump into next page or prev page? just a little suggessstion.

any way,the simple way for developer is let limit vars can be configured ..

from leetbuddy.nvim.

csh0101 avatar csh0101 commented on September 1, 2024

the same question

from leetbuddy.nvim.

csh0101 avatar csh0101 commented on September 1, 2024

fyi @arorashivoy @Dhanus3133

from leetbuddy.nvim.

Dhanus3133 avatar Dhanus3133 commented on September 1, 2024

You can check the README for the keymaps on the paginating problems in Telescope. Also, you can now increase the total number of problems displayed with limit in config, the default is 30 now.

from leetbuddy.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.