Solve Codewars katas from within Neovim.
- Neovim >= 0.9.0
- plenary.nvim — HTTP requests, file operations
- nui.nvim — UI components
- telescope.nvim — kata picker, language picker
- nvim-treesitter with
markdownparser — description rendering (optional) - markdown.nvim — enhanced markdown rendering (optional)
{
"prosk-sudo/codewars.nvim",
lazy = false,
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"nvim-telescope/telescope.nvim", -- kata picker / language picker
-- optional
"tadmccorkle/markdown.nvim", -- markdown rendering in description
},
opts = {},
}- Log in to codewars.com in your browser
- Open Developer Tools (F12) → Application tab → Cookies
- Find these two cookies for
www.codewars.com:CSRF-TOKEN_session_id
- Run
:CW cookiein Neovim and paste them in this format:
CSRF-TOKEN=your_csrf_value; _session_id=your_session_value
Your cookies are stored locally at ~/.cache/nvim/codewars/cookie.
Launch Neovim with the plugin argument to get a dashboard:
nvim codewars.nvimSee COMMANDS.md for the full list, or run :CW help inside Neovim.
:CW cookie " paste your browser cookies (one-time setup)
:CW train multiply python
This opens the 8 kyu Multiply kata with:
- Description split on the left (markdown)
- Code editor on the right (with template)
- Test cases split below the code editor
Write your solution, then:
:CW test " Quick test with example cases
:CW attempt " Full attempt with all test cases
:CW submit " Submit after passing attempt
All settings are optional. See CONFIGS.md for the full reference.
require("codewars").setup({})- Long test output lines (e.g. random test inputs with large data structures) may overflow the result popup. Neovim's
wrapoption is enabled but may not fully contain all content within NUI Layout popups. - Some language icons in the picker may display as boxes or incorrect characters depending on your Nerd Font version and variant. Nerd Font v3 reorganized many codepoints, and not all patched fonts include every icon set (Devicons, Material Design, Seti-UI, etc.).
This plugin was heavily inspired by leetcode.nvim by @kawre!
Built and maintained with the help of Claude Code.
