Coder Social home page Coder Social logo

speedtyper.nvim's Introduction

⌨️ Speedtyper

Practise typing while bored.

📺 Showcase

⌛ Countdown game mode

speedtyper_countdown_showcase.webm

🌧️ Rain game mode

Screencast.from.09-22-2023.01.30.02.PM.webm

⚡️ Features

  • Different game modes:

    • Countdown :
      • Objective: Type as much words as possible before the time runs out.
      • Customize Game Duration
      • Feedback: Receive instant updates on your words per minute (WPM) and accuracy.
    • Stopwatch :
      • Objective: Type an entire page of text as fast and as accurate as possible.
      • Feedback: Receive instant updates on your words per minute (WPM) and accuracy.
    • Rain :
      • Objective: Words fall from the top of the screen, type them before they hit the bottom.
      • Choose the number of lives
      • Customize rain speed

    Coming soon: code snippets: Enhance your coding speed and accuracy by typing various code snippets.

  • Languages: Currently only supports English and Serbian. There is also an option to provide a file with your prefered text.

  • Play Offline: No need to connect to the internet.

  • Distraction-Free Typing: Temporarily disable cmp to focus on the game.

✨ Recommended

📋 Installation

lazy:

{
    "NStefan002/speedtyper.nvim",
    cmd = "Speedtyper",
    opts = {
    -- your config
    }
}

packer:

use({
    "NStefan002/speedtyper.nvim",
    config = function()
        require("speedtyper").setup({
            -- your config
        })
    end,
})

⚙ Default configuration

Full list of options with their default values
{
    window = {
        height = 5, -- integer >= 5 | float in range (0, 1)
        width = 0.55, -- integer | float in range (0, 1)
        border = "rounded", -- "none" | "single" | "double" | "rounded" | "shadow" | "solid"
        -- lhs used to close game window.
        -- can be a string (applies to normal mode),
        -- or a table where the key represents the mode and the value is the mapping.
        -- e.g. close_with = "q" or close_with = { n = "q", i = "<M-q>" }.
        -- mode can be any of "n" | "i" | "x"
        -- nil means no map
        close_with = nil,
    },
    language = "en", -- "en" | "sr" currently only only supports English and Serbian
    sentence_mode = false, -- if true, whole sentences will be used
    custom_text_file = nil, -- provide a path to file that contains your custom text (if this is not nil, language option will be ignored)
    randomize = false, -- randomize words from custom_text_file
    game_modes = { -- prefered settings for different game modes
        -- type until time expires
        countdown = {
            time = 30,
        },
        -- type until you complete one page
        stopwatch = {
            hide_time = true, -- hide time while typing
        },
        -- NOTE: the window height will become the same as the window width
        rain = {
            initial_speed = 1.5, -- words fall down by one line every x seconds
            throttle = 7, -- increase speed every x seconds (set to -1 for constant speed)
            lives = 3,
        },
    },
    -- specify highlight group for each component
    highlights = {
        untyped_text = "Comment",
        typo = "ErrorMsg",
        clock = "ErrorMsg",
        falling_word_typed = "DiagnosticOk",
        falling_word = "Normal",
        falling_word_warning1 = "WarningMsg",
        falling_word_warning2 = "ErrorMsg",
    },
    -- this values will be restored to your prefered settings after the game ends
    vim_opt = {
        -- only applies to insert mode, while playing the game
        guicursor = nil, -- "ver25" | "hor20" | "block" | nil means do not change
    },
}

🧰 Commands

Command Description
:Speedtyper Select the game mode and enjoy playing!

🤝 Contributing

PRs and issues are always welcome.

✅☑️ TODO

See this.

🎭 Inspiration

👀 Checkout similar projects

speedtyper.nvim's People

Contributors

nstefan002 avatar github-actions[bot] avatar gerazov avatar eslam-allam avatar ivaknez avatar bgerazov avatar

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.