A Neovim plugin for fast, structured debug logging in JavaScript and TypeScript.
rocketlog.nvim helps you insert consistent console.* statements, keep embedded file/line labels fresh as code moves, and manage existing logs from a purpose-built dashboard instead of hunting through files like a raccoon in a cable drawer.
console.log / warn / error / info outputsnacks.nvim?| Doc | What it covers |
|---|---|
| Docs index | Start here for the full documentation set |
| Getting started | Install, configure, and use RocketLog in a few minutes |
| Usage guide | Motions, word logging, deletion, refresh behavior, workflows |
| Dashboard guide | Dashboard layout, keybindings, filters, folds, toggles |
| Configuration reference | Every setup option and practical examples |
| Troubleshooting | Common issues, warnings, and fixes |
| Media guide | Screenshot and GIF placeholders to replace before release |
| Contributing | Dev setup, tests, and contribution expectations |
console.log(`π[ROCKETLOG] ~ user.ts:42 ~ account:`, account);
console.warn(`π[ROCKETLOG] ~ user.ts:42 ~ account:`, account);
console.error(`π[ROCKETLOG] ~ user.ts:42 ~ account:`, account);
console.info(`π[ROCKETLOG] ~ user.ts:42 ~ account:`, account);
const fullName = user.profile.name;
<leader>rL on fullNameconst fullName = user.profile.name;
console.log(`π[ROCKETLOG] ~ user.ts:2 ~ fullName:`, fullName);
Media placeholder β hero GIF
Add a short GIF here showing:
- opening a TypeScript file,
- inserting a log with
<leader>rL,- saving the file,
- opening the dashboard with
<leader>rr,- pressing
?to open the help modal.Suggested filename:
docs/assets/hero-overview.gif
This gives you the full experience, including the picker command.
{
"evanmcpheron/rocketlog.nvim",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"folke/snacks.nvim",
},
config = function()
require("rocketlog").setup()
end,
}
If you do not care about the picker, snacks.nvim is not required. The plugin will still work, and :RocketLogFind will simply warn if snacks.nvim is unavailable.
{
"evanmcpheron/rocketlog.nvim",
dependencies = {
"nvim-treesitter/nvim-treesitter",
},
config = function()
require("rocketlog").setup()
end,
}
By default, plugin/rocketlog.lua calls require("rocketlog").setup() automatically.
If you want full control over when setup runs:
vim.g.rocketlog_disable_auto_setup = true
require("rocketlog").setup()
<leader>rL.<leader>rl followed by a motion or text object, like iw.<leader>rr.c to toggle a selected log on or off, d to delete it, or <CR> to jump to it.? inside the dashboard any time you want the full help modal.For the full walkthrough, see Getting started.
| Keymap | Action |
|---|---|
<leader>rl |
console.log using a motion or text object |
<leader>rL |
console.log for the word under cursor |
<leader>re |
console.error using a motion or text object |
<leader>rE |
console.error for the word under cursor |
<leader>rw |
console.warn using a motion or text object |
<leader>rW |
console.warn for the word under cursor |
<leader>ri |
console.info using a motion or text object |
<leader>rI |
console.info for the word under cursor |
| Keymap | Action |
|---|---|
<leader>rf |
Open the RocketLog picker |
<leader>rr |
Toggle the RocketLog dashboard |
<leader>rd |
Delete the next RocketLog below the cursor |
<leader>rD |
Delete the nearest RocketLog above the cursor |
<leader>ra |
Delete all RocketLogs in the current buffer |
For examples using motions like iw, a{, and more, see Usage.
| Command | Action |
|---|---|
:RocketLogFind |
Open the RocketLog picker |
:RocketLogDashboard |
Open the dashboard |
The dashboard is the pluginβs command center. It groups logs by file, shows a preview pane, keeps an always-visible footer cheatsheet on screen, and opens a dedicated help modal on ? when you want the full keybinding reference without leaving the UI.
| Key | Action |
|---|---|
<CR> / o |
Open selected log in the current window and close the dashboard |
v |
Open selected log in a vertical split and close the dashboard |
c |
Toggle the selected logβs comment state |
C |
Toggle all logs in the selected file |
d |
Delete the selected log |
D |
Delete all logs in the selected file |
r |
Refresh labels in the selected file |
R |
Rescan the dashboard |
/ |
Open the live filter prompt |
x |
Clear the current filter |
<Tab> / za |
Toggle the selected file fold |
zo / zc |
Open or close the selected file fold |
zR / zM |
Expand or collapse all file groups |
t |
Toggle project scope / current-file scope |
? |
Open the dashboard help modal |
q / <Esc> |
Close the dashboard, or close the help modal if it is open |
See Dashboard guide for the full walkthrough.

require("rocketlog").setup({
keymaps = {
motions = "<leader>rl",
word = "<leader>rL",
error_motions = "<leader>re",
error_word = "<leader>rE",
warn_motions = "<leader>rw",
warn_word = "<leader>rW",
info_motions = "<leader>ri",
info_word = "<leader>rI",
delete_below = "<leader>rd",
delete_above = "<leader>rD",
delete_all_buffer = "<leader>ra",
find = "<leader>rf",
dashboard = "<leader>rr",
},
label = "ROCKETLOG",
enabled = true,
refresh_on_save = true,
refresh_on_insert = true,
prefer_treesitter = true,
fallback_to_heuristics = true,
allowed_filetypes = {
javascript = true,
javascriptreact = true,
typescript = true,
typescriptreact = true,
},
dashboard = {
width = 0.96,
height = 0.92,
preview_context = 4,
max_files = 2000,
excluded_dirs = {
".git",
"node_modules",
"dist",
"build",
"coverage",
".next",
".turbo",
},
},
})
For a full option-by-option breakdown, see Configuration reference.
rg is installed, the dashboard uses it to narrow project scans before parsing files.:RocketLogFind depends on snacks.nvim.