{ "groups": { "b": {"name": "Buffer", "cat": "Buffer & tab"}, "c": {"name": "Code", "cat": "LSP & diagnostics"}, "cb": {"name": "Comment box", "cat": "Comment"}, "f": {"name": "Find", "cat": "Find & pick"}, "g": {"name": "Git", "cat": "Git"}, "h": {"name": "Haunt bookmarks", "cat": "Mark & jump"}, "q": {"name": "Session", "cat": "Session"}, "s": {"name": "Search", "cat": "Find & pick"}, "u": {"name": "UI / toggles", "cat": "UI & toggles"} }, "map_desc": [ {"s": "config", "m": "*", "k": "", "cat": "Find & pick", "sl": "smart find", "e": 1, "n": "Snacks smart picker: open buffers, recent files and project files ranked together (frecency)"}, {"s": "config", "m": "*", "k": ",", "cat": "Buffer & tab", "sl": "buffers", "e": 1}, {"s": "config", "m": "*", "k": "/", "cat": "Find & pick", "sl": "grep", "e": 1, "n": "Live grep (ripgrep) from the current working directory, which auto-cd keeps at the project root"}, {"s": "config", "m": "*", "k": ":", "cat": "Command line", "sl": "cmd hist"}, {"s": "config", "m": "*", "k": "n", "cat": "UI & toggles", "sl": "notifs", "n": "Snacks notifier history window (lua/keymaps.lua:291)"}, {"s": "config", "m": "*", "k": "e", "cat": "Files", "sl": "explorer", "e": 1, "n": "Snacks file explorer (sidebar)"}, {"s": "config", "m": "*", "k": "N", "cat": "Help", "sl": "news", "n": "Shows Neovim's news.txt in a floating window"}, {"s": "config", "m": "*", "k": ".", "cat": "Misc", "sl": "scratch", "n": "Toggle a persistent scratch buffer (Snacks)"}, {"s": "config", "m": "*", "k": "S", "cat": "Misc", "sl": "scratches", "n": "Pick one of the saved scratch buffers"}, {"s": "config", "m": "*", "k": "z", "cat": "UI & toggles", "sl": "zen", "n": "Snacks zen mode: distraction-free centered window"}, {"s": "config", "m": "*", "k": "Z", "cat": "Window", "sl": "zoom", "n": "Snacks zoom: maximize the current window, again to restore"}, {"s": "config", "m": "*", "k": "fb", "cat": "Buffer & tab", "sl": "buffers"}, {"s": "config", "m": "*", "k": "fc", "cat": "Files", "sl": "config", "n": "Files under stdpath('config') (~/.config/nvim)"}, {"s": "config", "m": "*", "k": "ff", "cat": "Find & pick", "sl": "files", "e": 1}, {"s": "config", "m": "*", "k": "fg", "cat": "Find & pick", "sl": "git files", "n": "Only files tracked by git"}, {"s": "config", "m": "*", "k": "fp", "cat": "Find & pick", "sl": "projects"}, {"s": "config", "m": "*", "k": "fr", "cat": "Find & pick", "sl": "recent", "e": 1}, {"s": "config", "m": "*", "k": "gb", "cat": "Git", "sl": "branches"}, {"s": "config", "m": "*", "k": "gl", "cat": "Git", "sl": "log"}, {"s": "config", "m": "*", "k": "gL", "cat": "Git", "sl": "line log", "n": "Git log of the current line"}, {"s": "config", "m": "*", "k": "gs", "cat": "Git", "sl": "status", "e": 1}, {"s": "config", "m": "*", "k": "gS", "cat": "Git", "sl": "stash"}, {"s": "config", "m": "*", "k": "gd", "cat": "Git", "sl": "hunks", "n": "Picker of changed hunks (git diff)"}, {"s": "config", "m": "*", "k": "gf", "cat": "Git", "sl": "file log", "n": "Git log of the current file"}, {"s": "config", "m": "*", "k": "gB", "cat": "Git", "sl": "browse", "n": "Open the file on the remote's web UI; from Visual mode the selected lines are linked"}, {"s": "config", "m": "*", "k": "gg", "cat": "Git", "sl": "lazygit", "e": 1, "n": "Lazygit in a Snacks floating terminal"}, {"s": "config", "m": "*", "k": "gi", "cat": "Git", "sl": "issues", "n": "Snacks GitHub picker; needs the gh CLI, logged in"}, {"s": "config", "m": "*", "k": "gI", "cat": "Git", "sl": "all issues", "n": "Snacks GitHub picker; needs the gh CLI, logged in"}, {"s": "config", "m": "*", "k": "gp", "cat": "Git", "sl": "PRs", "n": "Snacks GitHub picker; needs the gh CLI, logged in"}, {"s": "config", "m": "*", "k": "gP", "cat": "Git", "sl": "all PRs", "n": "Snacks GitHub picker; needs the gh CLI, logged in"}, {"s": "config", "m": "*", "k": "gt", "cat": "Git", "sl": "tea PRs", "n": "snacks-tea (Gitea/Forgejo); needs the tea CLI logged in, uses the origin remote"}, {"s": "config", "m": "*", "k": "gT", "cat": "Git", "sl": "tea all PRs", "n": "snacks-tea (Gitea/Forgejo); needs the tea CLI logged in, uses the origin remote"}, {"s": "config", "m": "*", "k": "gc", "cat": "Git", "sl": "tea new PR", "n": "snacks-tea (Gitea/Forgejo); needs the tea CLI logged in, uses the origin remote"}, {"s": "config", "m": "*", "k": "sb", "cat": "Search", "sl": "lines", "n": "Fuzzy search the lines of the current buffer"}, {"s": "config", "m": "*", "k": "sB", "cat": "Search", "sl": "grep bufs"}, {"s": "config", "m": "*", "k": "sg", "cat": "Find & pick", "sl": "grep", "n": "Same as <leader>/"}, {"s": "config", "m": "*", "k": "sw", "cat": "Search", "sl": "grep word", "n": "Normal: word under the cursor. Visual: the selection"}, {"s": "config", "m": "*", "k": "s\"", "cat": "Register & macro", "sl": "registers"}, {"s": "config", "m": "*", "k": "s/", "cat": "Search", "sl": "search hist"}, {"s": "config", "m": "*", "k": "sa", "cat": "Misc", "sl": "autocmds"}, {"s": "config", "m": "*", "k": "sc", "cat": "Command line", "sl": "cmd hist"}, {"s": "config", "m": "*", "k": "sC", "cat": "Command line", "sl": "commands"}, {"s": "config", "m": "*", "k": "sd", "cat": "LSP & diagnostics", "sl": "diagnostics", "e": 1}, {"s": "config", "m": "*", "k": "sD", "cat": "LSP & diagnostics", "sl": "buf diags"}, {"s": "config", "m": "*", "k": "sh", "cat": "Help", "sl": "help", "e": 1}, {"s": "config", "m": "*", "k": "sH", "cat": "UI & toggles", "sl": "highlights"}, {"s": "config", "m": "*", "k": "si", "cat": "Misc", "sl": "icons"}, {"s": "config", "m": "*", "k": "sj", "cat": "Mark & jump", "sl": "jumps", "n": "Jumplist picker: a way to go forward in the jumplist now that <Tab>/<C-I> is Sidekick NES"}, {"s": "config", "m": "*", "k": "sk", "cat": "Help", "sl": "keymaps", "e": 1}, {"s": "config", "m": "*", "k": "sl", "cat": "Quickfix & lists", "sl": "loclist"}, {"s": "config", "m": "*", "k": "sm", "cat": "Mark & jump", "sl": "marks"}, {"s": "config", "m": "*", "k": "sM", "cat": "Help", "sl": "man pages"}, {"s": "config", "m": "*", "k": "sp", "cat": "Find & pick", "sl": "plugin spec", "n": "Greps lua/plugins.lua for every vim.pack spec (src = \"https://…); type to filter by plugin name"}, {"s": "config", "m": "*", "k": "sq", "cat": "Quickfix & lists", "sl": "quickfix", "n": "Snacks picker over the quickfix list"}, {"s": "config", "m": "*", "k": "sR", "cat": "Find & pick", "sl": "resume", "n": "Reopen the last picker with its query"}, {"s": "config", "m": "*", "k": "su", "cat": "Undo & repeat", "sl": "undo hist", "n": "Snacks undo-tree picker with diff preview"}, {"s": "config", "m": "*", "k": "ss", "cat": "LSP & diagnostics", "sl": "symbols"}, {"s": "config", "m": "*", "k": "sS", "cat": "LSP & diagnostics", "sl": "ws symbols"}, {"s": "config", "m": "*", "k": "sr", "cat": "Search", "sl": "replace", "e": 1, "n": "Grug-far project-wide search & replace, prefilled with the word under the cursor; q closes it"}, {"s": "config", "m": "*", "k": "uC", "cat": "UI & toggles", "sl": "colors"}, {"s": "config", "m": "*", "k": "un", "cat": "UI & toggles", "sl": "dismiss"}, {"s": "config", "m": "*", "k": "uu", "cat": "Undo & repeat", "sl": "undotree", "e": 1, "n": "Toggle the undotree side panel (persistent undo is on)"}, {"s": "config", "m": "*", "k": "ca", "cat": "LSP & diagnostics", "sl": "code action", "e": 1, "n": "Neovim's gra does the same"}, {"s": "config", "m": "*", "k": "cr", "cat": "LSP & diagnostics", "sl": "rename", "e": 1, "n": "Puts :IncRename <cword> on the command line with a live preview: edit the name, then <CR>. Neovim's grn renames without the preview"}, {"s": "config", "m": "*", "k": "cR", "cat": "Files", "sl": "rename file", "n": "Rename the current file on disk; tells LSP servers (willRenameFiles) so imports can follow"}, {"s": "config", "m": "*", "k": "cf", "cat": "Edit", "sl": "format", "e": 1, "n": "conform.nvim with LSP fallback; in Visual mode only the selection is formatted"}, {"s": "config", "m": "*", "k": "cbb", "cat": "Comment", "sl": "box", "n": "Wrap the line(s) in a centered comment box (comment-box.nvim)"}, {"s": "config", "m": "*", "k": "cbl", "cat": "Comment", "sl": "line", "n": "Insert a centered comment line"}, {"s": "config", "m": "*", "k": "cbd", "cat": "Comment", "sl": "del box", "n": "Remove a comment box or titled line around the text"}, {"s": "config", "m": "*", "k": "cbk", "cat": "Comment", "sl": "catalog", "n": "Show all box and line styles"}, {"s": "config", "m": "*", "k": "bd", "cat": "Buffer & tab", "sl": "del buffer", "e": 1, "n": "Snacks.bufdelete(): delete the buffer but keep the window layout"}, {"s": "config", "m": "*", "k": "qs", "cat": "Session", "sl": "restore", "n": "persistence.nvim: one session per directory and git branch, saved automatically on exit"}, {"s": "config", "m": "*", "k": "qS", "cat": "Session", "sl": "select", "n": "persistence.nvim: one session per directory and git branch, saved automatically on exit"}, {"s": "config", "m": "*", "k": "ql", "cat": "Session", "sl": "last"}, {"s": "config", "m": "*", "k": "qd", "cat": "Session", "sl": "no save", "n": "Stop persistence from saving the session when you quit"}, {"s": "config", "m": "*", "k": "ha", "cat": "Mark & jump", "sl": "annotate", "n": "Bookmark the current line with an annotation shown as virtual text (prompts for the text)"}, {"s": "config", "m": "*", "k": "ht", "cat": "Mark & jump", "sl": "show note", "n": "Show/hide the annotation of the bookmark on this line"}, {"s": "config", "m": "*", "k": "hd", "cat": "Mark & jump", "sl": "del mark"}, {"s": "config", "m": "*", "k": "hn", "cat": "Mark & jump", "sl": "next mark"}, {"s": "config", "m": "*", "k": "hp", "cat": "Mark & jump", "sl": "prev mark"}, {"s": "config", "m": "*", "k": "hl", "cat": "Mark & jump", "sl": "bookmarks", "n": "Snacks picker of all Haunt bookmarks"}, {"s": "config", "m": "*", "k": "", "cat": "Completion & AI", "sl": "NES", "e": 1, "n": "Jumps to, then applies, the Sidekick next-edit suggestion. With no suggestion it is a plain jump forward (count works). <C-i> is mapped separately, so terminals that can tell them apart (kitty, Neovide) keep it as jump forward"}, {"s": "config", "m": "*", "k": "d", "cat": "Operator", "d": "Delete {motion} into register d (clipboard untouched)", "force": false, "sl": "del→\"d", "e": 1, "n": "Remapped to \"d{key} (lua/keymaps.lua:23-28) so the system clipboard keeps your last yank. Paste deleted text with \"dp. A register you type first wins (\"add, \"_dd), except \"+, which looks like the default. Normal and Visual mode only"}, {"s": "config", "m": "*", "k": "D", "cat": "Edit", "d": "Delete to end of line into register d", "force": false, "sl": "D→\"d", "n": "Remapped to \"d{key} (lua/keymaps.lua:23-28) so the system clipboard keeps your last yank. Paste deleted text with \"dp. A register you type first wins (\"add, \"_dd), except \"+, which looks like the default. Normal and Visual mode only"}, {"s": "config", "m": "*", "k": "c", "cat": "Operator", "d": "Change {motion}; the old text goes to register d", "force": false, "sl": "chg→\"d", "e": 1, "n": "Remapped to \"d{key} (lua/keymaps.lua:23-28) so the system clipboard keeps your last yank. Paste deleted text with \"dp. A register you type first wins (\"add, \"_dd), except \"+, which looks like the default. Normal and Visual mode only"}, {"s": "config", "m": "*", "k": "C", "cat": "Edit", "d": "Change to end of line; the old text goes to register d", "force": false, "sl": "C→\"d", "n": "Remapped to \"d{key} (lua/keymaps.lua:23-28) so the system clipboard keeps your last yank. Paste deleted text with \"dp. A register you type first wins (\"add, \"_dd), except \"+, which looks like the default. Normal and Visual mode only"}, {"s": "config", "m": "*", "k": "x", "cat": "Edit", "d": "Delete character(s) under the cursor into register d", "force": false, "sl": "x→\"d", "e": 1, "n": "Remapped to \"d{key} (lua/keymaps.lua:23-28) so the system clipboard keeps your last yank. Paste deleted text with \"dp. A register you type first wins (\"add, \"_dd), except \"+, which looks like the default. Normal and Visual mode only"}, {"s": "config", "m": "*", "k": "X", "cat": "Edit", "d": "Delete character(s) before the cursor into register d", "force": false, "sl": "X→\"d", "n": "Remapped to \"d{key} (lua/keymaps.lua:23-28) so the system clipboard keeps your last yank. Paste deleted text with \"dp. A register you type first wins (\"add, \"_dd), except \"+, which looks like the default. Normal and Visual mode only"}, {"s": "config", "m": "*", "k": "K", "cat": "LSP & diagnostics", "sl": "hover", "e": 1, "n": "Always LSP hover, in every buffer: no fallback to 'keywordprg' (:Man, :help) when no LSP is attached"}, {"s": "config", "m": "*", "k": "gd", "cat": "LSP & diagnostics", "sl": "definition", "e": 1, "n": "Snacks LSP picker (jumps directly when there is a single result). Needs an attached LSP server; replaces Vim's search-based gd"}, {"s": "config", "m": "*", "k": "gD", "cat": "LSP & diagnostics", "sl": "declaration", "n": "Snacks LSP picker (jumps directly when there is a single result). Needs an attached LSP server; replaces Vim's search-based gD"}, {"s": "config", "m": "*", "k": "gI", "cat": "LSP & diagnostics", "sl": "impl", "n": "Snacks LSP picker (jumps directly when there is a single result). Needs an attached LSP server; replaces Vim's gI (insert at column 1, use 0i)"}, {"s": "config", "m": "*", "k": "gy", "cat": "LSP & diagnostics", "sl": "type def", "n": "Snacks LSP picker (jumps directly when there is a single result). Needs an attached LSP server"}, {"s": "config", "m": "*", "k": "gai", "cat": "LSP & diagnostics", "sl": "calls in", "n": "Incoming calls picker. Makes Vim's ga wait 'timeoutlen'"}, {"s": "config", "m": "*", "k": "gao", "cat": "LSP & diagnostics", "sl": "calls out", "n": "Outgoing calls picker. Makes Vim's ga wait 'timeoutlen'"}, {"s": "config", "m": "*", "k": "j", "cat": "Motion", "sl": "down", "e": 1, "n": "Without a count moves by display (wrapped) line like gj/gk; with a count (5j, even 1j) moves by real lines. Not mapped in Operator-pending mode, so dj stays linewise"}, {"s": "config", "m": "*", "k": "k", "cat": "Motion", "sl": "up", "e": 1, "n": "Without a count moves by display (wrapped) line like gj/gk; with a count (5j, even 1j) moves by real lines. Not mapped in Operator-pending mode, so dj stays linewise"}, {"s": "config", "m": "*", "k": "", "cat": "Motion", "sl": "down", "n": "Without a count moves by display (wrapped) line like gj/gk; with a count (5j, even 1j) moves by real lines. Not mapped in Operator-pending mode, so dj stays linewise"}, {"s": "config", "m": "*", "k": "", "cat": "Motion", "sl": "up", "n": "Without a count moves by display (wrapped) line like gj/gk; with a count (5j, even 1j) moves by real lines. Not mapped in Operator-pending mode, so dj stays linewise"}, {"s": "config", "m": "i", "k": "", "cat": "Insert", "sl": "down", "n": "Moves by display line in Insert mode (normal! gj/gk); the native popup menu and blink.cmp's menu keep their own arrow keys"}, {"s": "config", "m": "i", "k": "", "cat": "Insert", "sl": "up", "n": "Moves by display line in Insert mode (normal! gj/gk); the native popup menu and blink.cmp's menu keep their own arrow keys"}, {"s": "config", "m": "*", "k": "", "cat": "Terminal", "sl": "terminal", "e": 1, "n": "Toggle a Snacks floating terminal (Normal and Terminal mode). <C-_> is the same for terminals that send Ctrl+/ as Ctrl+_"}, {"s": "config", "m": "*", "k": "grr", "cat": "LSP & diagnostics", "sl": "references", "e": 1, "n": "Snacks picker for LSP references; replaces Neovim's grr list. The other gr* defaults (grn gra gri grt grx) work as normal"}, {"s": "config", "m": "*", "k": "ur", "cat": "Search", "sl": "nohl", "n": "Clears search highlighting; Neovim's <C-L> does it too"}, {"s": "config", "m": "*", "k": "", "cat": "Mark & jump", "sl": "jump fwd", "n": "Mapped to itself so it stays jump forward where the terminal can tell it from <Tab> (:h CTRL-I)"}, {"s": "config", "m": "*", "k": "gx", "cat": "Files", "sl": "open", "e": 1, "n": "gx.nvim's :Browse: URLs, files, plugin names → GitHub, #123 issues, package.json deps, otherwise a web search. Works on a Visual selection too"} ], "entries": [ {"k": "", "m": ["n"], "s": "config", "cat": "Register & macro", "ctx": "Neovide only", "sl": "paste", "d": "Paste the system clipboard (an empty line is replaced by the paste)", "n": "On an empty line the clipboard lines replace it and the cursor goes to the end of the paste; otherwise runs \"+]p (put after, indent adjusted). lua/options.lua:203"}, {"k": "", "m": ["i", "c"], "s": "config", "cat": "Register & macro", "ctx": "Neovide only", "sl": "paste", "d": "Paste the system clipboard (+)", "n": "lua/options.lua:222-223"}, {"k": "", "m": ["x", "s"], "s": "config", "cat": "Register & macro", "ctx": "Neovide only", "sl": "paste", "d": "Replace the selection with the system clipboard", "n": "\"+p, lua/options.lua:224"}, {"k": "", "m": ["t"], "s": "config", "cat": "Terminal", "ctx": "Neovide only", "sl": "paste", "d": "Paste the system clipboard into the terminal", "n": "<C-\\><C-n>\"+pi, lua/options.lua:225"}, {"k": "", "m": ["x", "s"], "s": "config", "cat": "Register & macro", "ctx": "Neovide only", "sl": "copy", "d": "Copy the selection to the system clipboard", "n": "lua/options.lua:231"}, {"k": "", "m": ["n"], "s": "config", "cat": "Register & macro", "ctx": "Neovide only", "sl": "copy line", "d": "Copy the current line to the system clipboard", "n": "lua/options.lua:233"}, {"k": "", "m": ["x", "s"], "s": "config", "cat": "Register & macro", "ctx": "Neovide only", "sl": "cut", "d": "Cut the selection to the system clipboard", "n": "Uses \"+d without remapping, so unlike d it really fills the clipboard. lua/options.lua:239"}, {"k": "", "m": ["n"], "s": "config", "cat": "Register & macro", "ctx": "Neovide only", "sl": "cut line", "d": "Cut the current line to the system clipboard", "n": "lua/options.lua:241"}, {"k": "", "m": ["n", "t"], "s": "config", "cat": "Terminal", "sl": "terminal", "d": "Toggle the Snacks terminal (alias of )", "n": "For terminals that encode Ctrl+/ as Ctrl+_ (no CSI u). Hidden from which-key (which_key_ignore), lua/keymaps.lua:312"}, {"k": "q", "m": ["n"], "s": "config", "cat": "Search", "ctx": "Grug-far buffer", "sl": "close", "d": "Close the Grug-far window", "n": "Buffer-local, replaces macro recording there. lua/options.lua:127-133"} ], "commands": { "Q": "Write all changed buffers (even read-only ones) and quit, no prompts (:xa!)", "Format": "Format the buffer, or [range], with conform.nvim (async, LSP fallback)" }, "notes": [ {"title": "Leader is Space, local leader is backslash", "kind": "change", "lead": "Set before any plugin loads, so every plugin sees them.", "rows": [["<Space>", "<leader>: 80+ Normal-mode maps and a few Visual ones, grouped as listed in the which-key popup"], ["\\", "<localleader> (plugin buffer keys such as Grug-far's)"], ["<Space> alone", "No longer moves right like l: Neovim waits for the next key (which-key shows the options)"]], "note": "lua/options.lua:15-16", "keys": [""]}, {"title": "Yank and put use the system clipboard", "kind": "change", "lead": "clipboard=unnamedplus: every yank, delete and put that would use the unnamed register uses \"+ instead.", "rows": [["y yy Y", "Copy to the system clipboard (\"+) and \"0"], ["p P", "Paste the system clipboard: your last yank, or whatever another app copied"], ["\"0p", "Last yank made inside Neovim, even after copying elsewhere"]], "note": "lua/keymaps.lua:13. Deletes are redirected, see the next card.", "keys": ["y", "p", "P"]}, {"title": "Deleting never touches the clipboard: d c x go to register d", "kind": "change", "lead": "Applies in Normal and Visual mode. A register you type first still wins.", "rows": [["d D c C x X", "Run as \"dd, \"dD, … so the deleted text lands in \"d (and \"1 for whole lines)"], ["\"ad… \"_d…", "An explicit register is honoured (black hole works); only \"+ is treated as the default, so use yy then dd to cut to the clipboard"], ["\"dp", "Paste what you just deleted (plain p pastes the clipboard)"], ["xp ddp", "Classic swap idioms paste the clipboard instead; use x\"dp / dd\"dp"], ["cc cw ciw…", "Change commands also go to \"d"], ["Visual p", "Not remapped: the replaced text overwrites the clipboard. Use Visual P to keep it"]], "note": "lua/keymaps.lua:17-28", "keys": ["d", "D", "c", "C", "x", "X", "p"]}, {"title": "j k and arrows move by display line", "kind": "change", "lead": "'wrap' is on, so long lines span several screen rows.", "rows": [["j k <Down> <Up>", "No count: like gj/gk, one wrapped screen row at a time"], ["5j 12k", "With a count: real lines, so relative numbers still line up"], ["1j", "A real line down even on wrapped text (useful in macros)"], ["dj yk", "Operator-pending is not mapped: still linewise"], ["Insert <Down> <Up>", "Display-line moves too, unless a completion menu is open"]], "note": "A recorded macro that uses a bare j moves by screen row on wrapped lines; use + or 1j. lua/keymaps.lua:36-52", "keys": ["j", "k", "", ""]}, {"title": "Enter does not work in quickfix and q: windows", "kind": "warn", "lead": "The global <CR> map wins because those windows have no buffer-local <CR> map.", "rows": [["Quickfix / location list <CR>", "Starts a Leap instead of opening the entry under the cursor"], ["Command-line window q: q/ <CR>", "Starts a Leap instead of running the line"], ["Instead", ":.cc / :.ll, <C-W><CR> (opens the entry in a split), or i then <CR> in q:"], ["Fix", "Map <CR> back buffer-locally on FileType qf and CmdwinEnter, or pick a different Leap key"]], "note": "Verified headless for both windows. lua/keymaps.lua:352", "keys": [""]}, {"title": "LSP keys open Snacks pickers", "kind": "change", "rows": [["gd gD gI gy", "Definition, declaration, implementation, type definition"], ["grr gai gao", "References, incoming calls, outgoing calls"], ["<leader>ss <leader>sS", "Document / workspace symbols"], ["grn gra gri grt grx", "Neovim's own LSP keys: rename, code action, implementation, type definition, run code lens"], ["K <leader>ca <leader>cr", "Hover, code action, rename (IncRename with live preview)"], ["Lost", "Vim's search-based gd/gD (work without LSP), gI (use 0i), and K's 'keywordprg' (use :Man / :help)"]], "note": "Global maps, active in every buffer; without an LSP client they find nothing. lua/keymaps.lua:233-276", "keys": ["gd", "gD", "gI", "gy", "grr", "grn", "gra", "gai", "gao", "K"]}, {"title": "Tab is Sidekick's next-edit suggestion", "kind": "change", "lead": "Copilot runs as an LSP server; ghost text comes from vim.lsp.inline_completion.", "rows": [["Normal <Tab>", "Jump to the next-edit suggestion, press again to apply it; with none, a plain jump forward"], ["Insert <Tab>", "In order: next snippet placeholder, Sidekick NES jump/apply, accept the Copilot ghost text, else a normal Tab"], ["<C-I>", "Mapped to itself, so where the terminal tells it apart from <Tab> (kitty, Neovide) it is always jump forward"]], "note": "lua/keymaps.lua:338-347; Insert chain lua/plugins.lua (blink keymap); see :help CTRL-I", "keys": ["", ""]}, {"title": ":Q writes everything and quits", "kind": "change", "rows": [[":Q", "Runs :xa!: write all changed buffers, read-only ones too, then quit"], ["Still blocked by", "Unnamed buffers or files that cannot be written"]], "note": "lua/keymaps.lua:58", "keys": [":Q"]}, {"title": "Files save themselves", "kind": "change", "lead": "Only normal file buffers (empty 'buftype').", "rows": [["Leaving Insert mode", ":update (only if modified)"], ["Any Normal-mode change", "x, dd, p, u, .… also save at once"], ["'autowrite'", "On: :make, :next, <C-]>… write first"], ["Undo", "Persistent ('undofile'): u, <leader>uu undotree, <leader>su picker; :e! cannot revert what is already saved"]], "note": "Each save also runs format-on-save, see the next card. lua/options.lua:25, :34, :38-47", "keys": ["u"]}, {"title": "Formatting", "kind": "tip", "rows": [["On save", "conform formats every write (format_on_save, 500 ms); autosave makes that after each change. Turn off with vim.g.disable_autoformat / vim.b.disable_autoformat"], ["<leader>cf", "Format the buffer; in Visual mode only the selected lines"], [":Format :'<,'>Format", "Same, async, optional range"], ["Formatters", "stylua (Lua), clang-format (C/C++), rustfmt, ruff_format (Python), fish_indent, shfmt (sh/bash). Install them yourself (PATH or :MasonInstall): mason-lspconfig only installs LSP servers"], ["Other filetypes", "LSP formatting when the server supports it (lsp_format = \"fallback\")"]], "note": "lua/plugins.lua:249-268; lua/keymaps.lua:363-365; lua/options.lua:69-79", "keys": ["cf"]}, {"title": "Working directory follows the buffer", "kind": "change", "rows": [["On BufEnter", ":cd to the project root of the file (global, all windows)"], ["Root markers", "Tried in order over all parent dirs: .git, then lua, package.json, go.mod, Cargo.toml, Makefile; else the file's own directory"], ["Affects", "<leader>ff, <leader>/, <leader>sr, :e relative/path, new terminals, :make"], ["Skipped", "Special buffers (help, terminals, pickers), except the Snacks explorer"]], "note": "lua/options.lua:100-124; marker order per vim.fs.root()"}, {"title": "Small automatic behaviours", "kind": "change", "rows": [["Reopen a file", "Cursor returns to where you left it (g`\"), lua/options.lua:82-91"], ["File changed outside", "Reloaded on focus and when idle (checktime on FocusGained/CursorHold, 'updatetime' 200 ms) if the buffer has no unsaved edits, lua/options.lua:50-63"], ["Line numbers", "Absolute current line + relative others, made for counts like 5j, lua/options.lua:26-27"], ["Indent", "2 spaces, 'expandtab', lua/options.lua:19-21"], ["Terminal title", "NVIM: file, reset to the shell name on exit, lua/options.lua:139-192"]]}, {"title": "]] and [[ jump between references", "kind": "change", "rows": [["]] [[", "Next / previous LSP reference of the word under the cursor (Snacks words, counts work)"], ["Markdown buffers", "Buffer-local ftplugin maps win: next / previous heading"], ["Terminal buffers (Normal mode)", "Neovim's buffer-local defaults win: previous / next shell prompt"], ["Section motions", "Still available in Visual and Operator-pending mode (v]], d]])"]], "note": "lua/keymaps.lua:315-320", "keys": ["]]", "[["]}, {"title": "Terminal and scratch", "kind": "tip", "rows": [["<C-/>", "Toggle a floating terminal (Normal and Terminal mode; <C-_> in legacy terminals)"], ["<C-\\><C-N>", "Terminal mode to Normal mode (built-in)"], ["<leader>gg", "Lazygit in a floating terminal"], ["<leader>. <leader>S", "Toggle / pick a persistent scratch buffer"]], "note": "lua/keymaps.lua:285-314; lua/plugins.lua:106-120", "keys": ["", ""]}, {"title": "Picker extras from this config", "kind": "tip", "rows": [["s (input, Normal)", "Flash labels on the result list: jump to an item in 2 keys"], ["<A-s>", "The same from Insert mode"], ["<A-a>", "Send the item(s) to the Sidekick AI CLI"], ["Matching", "Fuzzy, smart-case, frecency and cwd bonus"]], "note": "lua/plugins.lua:46-91", "keys": ["", ""]}, {"title": "Sessions and bookmarks", "kind": "tip", "rows": [["<leader>qs <leader>ql <leader>qS", "Restore the session for this directory + git branch, the last one, or pick one"], ["<leader>qd", "Do not save this session on exit (saved automatically otherwise)"], ["<leader>ha", "Bookmark the line with a note (virtual text), <leader>ht shows/hides it"], ["<leader>hn <leader>hp <leader>hl", "Next / previous bookmark, bookmark picker"]], "note": "lua/keymaps.lua:382-416; lua/plugins.lua:133-138, :541-546", "keys": ["qs", "ha"]}, {"title": "Neovide-only clipboard keys", "kind": "tip", "rows": [["<C-S-v>", "Paste the clipboard in every mode (Normal: an empty line is replaced)"], ["<C-S-c>", "Copy the selection, or the current line in Normal mode"], ["<C-S-x>", "Cut the selection or line to the clipboard (bypasses the \"d remap)"]], "note": "lua/options.lua:198-242; only when vim.g.neovide is set.", "keys": ["", "", ""]} ] }