Gamify your nvim experience with achievements, stats and levels
๐ฎ Gamify.nvim ๐ฎ
Turn your Neovim into an RPG experience. Track your activity, earn XP, level up, and unlock achievements while you code.
Features โข Installation โข Mini-Games โข Challenges โข Achievements
๐ Features
- Unified Dashboard: Access everything from one place with
:Gamify. - Character Classes: Are you a Frontend Wizard, Systems Ninja, or Plugin Sorcerer? Your role evolves based on your most-used languages!
- XP & Leveling System: Earn XP for writing code, fixing bugs, and completing challenges. Watch your progress bar grow!
- Daily Quests: 3 fresh objectives every day with progress tracking and a completion bonus.
- Focus Combo: Code uninterrupted to build a focus streak that multiplies your XP (up to x3).
- Prestige System: Hit the level cap, then prestige for a permanent XP bonus.
- Activity Heatmap: A GitHub-style contribution graph of your coding, right inside Neovim (
:GamifyHeatmap). - Share Card: Generate a shareable ASCII character card and yank it to your clipboard (
:GamifyShare). - Avatar Companion: Design your own character (
:GamifyAvatar) and pin it to a screen corner with cute idle animations. - Mini-Games: Take a break with built-in games like Vim Snake, Saper (Minesweeper), Sudoku, and Gomoku (5-in-a-row, with local & LAN play).
- Gamify Katas: Solve 8 algorithmic challenges (Codewars-style) directly in your editor, with a bonus kata of the day.
- Clean Code Bonus: Get rewarded for saving files with zero errors (once per buffer, no grinding).
- Achievement System: 21 unique milestones with confetti effects and popups.
- Statusline Component: Show your level, XP bar, and streak in lualine/heirline.
- Fully Configurable: Tune every XP reward, quest, and feature via
setup(). - Fresh Repo Support: Works seamlessly even in brand-new git repositories.
๐ธ Screenshots
The Dashboard
Level, XP bar, role, prestige, focus combo, progress to your next achievement, daily quests, and the menu โ all from:Gamify.
Screenshots
Activity Heatmap
A GitHub-style contribution graph of your coding, via:GamifyHeatmap.
Share Card
A shareable ASCII character card you can yank to your clipboard, via:GamifyShare.
Gamify Katas
The kata picker (with the โญ kata of the day) and the in-editor Lua solution buffer.Gomoku (5-in-a-row)
The 20ร20 board in action โ local hot-seat or LAN multiplayer (:Gomoku).
Avatar Companion
Build your own character with:GamifyAvatar and let it sit in the corner with cute idle animations (blink, bounce, wave).
๐ฆ Installation & Usage
1. Install via your preferred plugin manager
lazy.nvim
{ 'grzegorzszczepanek/gamify.nvim', config = function() require('gamify').setup() end, }
Note:gamify.nvimno longer auto-initializes onrequire. You must call
require('gamify').setup() (optionally with a config table) for commands and
tracking to be registered.
2. Commands
:Gamifyโ Open the Unified Dashboard (Center of Command).:GamifySnakeโ Launch the Vim Snake mini-game.:GamifySaperโ Launch the Saper (Minesweeper) mini-game.:GamifySudokuโ Launch the Sudoku mini-game.:Gomokuโ Play Gomoku (5-in-a-row on 20ร20) locally;:Gomoku host [port]/:Gomoku join <ip> [port]for LAN.:GamifyChallengesโ Start solving Gamify Katas.:GamifyHeatmapโ View your activity heatmap.:GamifyAvatarโ Open the avatar generator;:GamifyAvatar show/hide/togglecontrol the corner companion,:GamifyAvatar anim on|offtoggles animations,:GamifyAvatar corner <pos>moves it.:GamifyShareโ Generate a shareable character card.:GamifyStatsโ Quick stats line viavim.notify.:GamifyPrestigeโ Prestige (resets XP for a permanent bonus).:GamifyResetโ Wipe all progress (asks for confirmation).:LangStatsโ Detailed breakdown of lines per language.:Achievementsโ View your trophy room.
๐ Mini-Games
Vim Snake
Feeling stuck? Type:GamifySnake and use h, j, k, l to control the snake. Each ๐ you eat gives you 10 XP!
Saper (Minesweeper)
Classic Minesweeper directly in your editor. Type:GamifySaper.
- Controls:
h, j, k, lto move,<Enter>to reveal,fto flag. - Reward: Win the game to earn 200 XP!
Sudoku
Classic Sudoku with difficulty levels. Type:GamifySudoku.
- Controls:
h, j, k, lto move,1-9to enter numbers,dto change difficulty,0/xto clear. - Reward: Solve the puzzle to earn up to 500 XP!
Gomoku (5-in-a-row)
Tic-tac-toe's big sibling: a 20ร20 board where you win by lining up five stones in a row โ horizontally, vertically, or diagonally. Play side-by-side on one machine, or against a friend over your local network.
Controls
| Key | Action | |-----|--------| |h j k l | Move the cursor around the board |
| <Enter> / <Space> | Place a stone on the current cell |
| r | Rematch / clear the board (local mode only) |
| q / <Esc> | Quit back to the dashboard |
X always moves first. Win a game to earn 150 XP.
Local mode (one machine, two players)
Just run::Gomoku
Two players share the keyboard and take turns placing X and O. Open it from the
dashboard too: press t in :Gamify.
LAN mode (two machines on the same network)
Play over TCP โ no servers, accounts, or extra dependencies. One player hosts, the other joins.- Host (this player is
Xand moves first):
:Gomoku host 5050
Neovim starts listening on port 5050 and waits for an opponent.
- Find the host's LAN IP address (e.g.
192.168.1.42):
ip addr or ifconfig (look for a 192.168.x.x / 10.x.x.x address).
- macOS: System Settings โ Network, or ipconfig getifaddr en0.
- Join from the second machine (this player is
O):
:Gomoku join 192.168.1.42 5050
Once connected, both boards open and moves sync automatically โ you can only place a stone on your turn. The port is 5050 by default but you can pass any free port, as long as host and join use the same one.
Note: A rematch (r) currently only works in local mode. Over LAN, restart the
game to play again. You may also need to allow the chosen port through both machines'
firewalls.
๐ Gamify Katas
Improve your Lua and algorithmic skills without leaving Neovim.- Open the menu via
:Gamifyand pressc(or run:GamifyChallenges). - Select a challenge (e.g., Reverse String, FizzBuzz, Fibonacci).
- Write your solution and press
<Enter>to run tests. - Pass all tests to claim your reward!
solution won't leak into your global environment.
๐ฏ Daily Quests & Combos
- Daily Quests โ Every day you get 3 randomized objectives (write N lines,
- Focus Combo โ Keep coding without long breaks to build a focus streak.
- Prestige โ Once you reach the level cap (default 50), run
:GamifyPrestige
๐ Achievements
| Achievement | Description | XP | |----------------------------|------------------------------------------------------------------------------|--------:| | Weekly Streak | Open Neovim every day for 7 consecutive days | 500 | | Night Owl | Code for at least 3 hours between 11PM and 4AM five times | 1000 | | Early Bird | Code for at least 3 hours between 6AM and 11AM five times | 1000 | | Polyglot | Write at least 1000 lines in at least 10 languages | 5000 | | Commit Deity | Make 500 total commits in your coding journey | 8000 | | Get a Life! | Spend at least 200 hours in nvim | 9000 |
(And many more... type :Achievements to see them all!)
๐ Statusline
Show your level, an XP bar, and your streak in your statusline:
-- lualine example
require('lualine').setup {
sections = {
lualine_x = {
function() return require('gamify.logic').getstatuslinebar() end,
},
},
}
getstatuslinebar(bar_width) renders e.g. Lvl 12 [โโโโโโ] ๐ฅ7. For a minimal variant use getstatuslinetext() โ Lvl 12 ๐ฅ 7.
๐ ๏ธ Configuration
Pass a table to setup() to override any default. Shown below with defaults:
require('gamify').setup {
xp = {
per_lines = 10, -- 1 XP per N lines written
per_keypresses = 50, -- 1 XP per N keypresses
pererrorfixed = 5, -- XP per resolved diagnostic error
clean_code = 15, -- XP for saving a buffer with zero errors
new_day = 10, -- XP for the first launch on a new day
random_luck = 50, -- XP for the rare lucky bonus
snakeperapple = 10,
saper_win = 200,
},
cleancodeonceperbuffer = true, -- prevent :w XP farming
randomluckchance = 40, -- 1-in-N chance per save / new day
focus = {
enabled = true,
idletimeoutsec = 120, -- a longer gap resets the combo
tier_seconds = 300, -- every N focused seconds bumps the multiplier
max_multiplier = 3.0,
},
quests = {
enabled = true,
count = 3, -- quests generated per day
completion_bonus = 200, -- bonus XP for clearing all daily quests
},
leveling = { A = 0.001, B = 1.02 }, -- level = floor(1 + A * (xp ^ B))
prestige = {
enabled = true,
level_required = 50,
xpbonusper_rank = 0.05, -- +5% XP per prestige rank
},
ui = {
confetti = true,
popups = true,
xp_popups = true,
popuptimeoutms = 5000,
},
avatar = {
enabled = true, -- register avatar commands and allow the companion
showonstart = true, -- restore the corner companion across sessions
animations = true, -- idle animations (blink, bounce, wave)
transparent = true, -- no background (shows through on transparent terminals)
},
}