Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

sgarg26/leetcode.nvim

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

94 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🚨 leetcode.nvim is currently in the alpha stage of development 🚨


leetcode.nvim

πŸ”₯ Solve LeetCode problems within Neovim πŸ”₯

demo.mp4

✨ Features

  • πŸ“Œ an intuitive dashboard for effortless navigation within leetcode.nvim

  • 😍 question description formatting for a better readability

  • πŸ“ˆ LeetCode profile statistics within Neovim (Soon)

  • πŸ”€ support for daily and random questions

  • πŸ’Ύ caching for optimized performance

πŸ“¬ Requirements

πŸ“¦ Installation

{
    "kawre/leetcode.nvim",
    build = ":TSUpdate html",
    dependencies = {
        "nvim-treesitter/nvim-treesitter",
        "nvim-telescope/telescope.nvim",
        "nvim-lua/plenary.nvim", -- required by telescope
        "MunifTanjim/nui.nvim",

        -- optional
        "nvim-tree/nvim-web-devicons",

        -- recommended
        -- "rcarriga/nvim-notify",
    },
    opts = {
        -- configuration goes here
    },
}

πŸ› οΈ Configuration

To see full configuration types see template.lua

βš™οΈ default configuration

Click to see
{
    ---@type lc.domain
    domain = "com", -- For now "com" is the only one supported

    ---@type string
    arg = "leetcode.nvim",

    ---@type lc.lang
    lang = "cpp",

    ---@type lc.sql_lang
    sql = "mysql",

    ---@type string
    directory = vim.fn.stdpath("data") .. "/leetcode/",

    ---@type boolean
    logging = true,

    console = {
        size = {
            width = "75%", ---@type string | integer
            height = "75%", ---@type string | integer
        },
        dir = "row", ---@type "col" | "row"
    },

    description = {
        width = "40%", ---@type string | integer
    },
}

arg

Argument for Neovim

---@type string
arg = "leetcode.nvim"

See usage for more info

lang

Language to start your session with

---@type lc.lang
lang = "cpp"

---@type lc.sql_lang
sql = "mysql"

domain

LeetCode domain.

---@type lc.domain
domain = "com" -- For now "com" is the only one supported

directory

Where to store leetcode.nvim data

---@type string
directory = vim.fn.stdpath("data") .. "/leetcode/"

logging

Whether to log leetcode.nvim status notifications

---@type boolean
logging = true

console

Console appearance

console = {
    size = {
        width = "75%", ---@type string | integer
        height = "75%", ---@type string | integer
    },
    dir = "row", ---@type "col" | "row"
}

description

Question description appearance

description = {
    width = "40%", ---@type string | integer
}

πŸ“‹ Commands

command description
LcMenu opens menu dashboard
LcConsole opens console for currently opened question
LcQuestionTabs opens a picker with all currently opened question tabs
LcLanguage opens a picker to select a language for the current session
LcDescriptionToggle toggle question description
LcRun run currently opened question
LcSubmit submit currently opened question

πŸš€ Usage

This plugin is meant to be used within a fresh Neovim instance. Meaning that to lauch leetcode.nvim you have to pass arg as the first and only Neovim argument

nvim leetcode.nvim

Sign In

It is required to be signed-in to use leetcode.nvim

signin.mp4

Working with multiple questions

When you open a new question, leetcode.nvim creates a new tabpage containing all of the contents related to it. To switch between these tabs, use LcQuestionTabs command

questiontabs.mp4

βœ… Todo

  • CN version
  • SQL support
  • Statistics menu page
  • Docs
  • Hints pop-up

πŸ™Œ Credits

About

A Neovim plugin enabling you to solve LeetCode problems within Neovim.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%