diff --git a/docs/keybindings.md b/docs/keybindings.md deleted file mode 100644 index be5fabb..0000000 --- a/docs/keybindings.md +++ /dev/null @@ -1,507 +0,0 @@ -# nvim Keybindings - -Here are all the keybindings defined for nvim. - -Check out the source code of individual files for more info. - -Sources: - -- [Which Key](../lua/plugins/tools/which-key.lua) - Biggest source of keybindings, fully documented. -- [General](../lua/core/keys.lua) - Changes behavior of core keys, not documented here. -- Individual plugin configs - Check out the source code of individual files in [plugins](../lua/plugins/) for more info. - -## Leader Bindings (Normal Mode) - -> Leader key is set to ``. - -### b - Debugging - -| Keybinding | Action | -| ---------------------------------- | ------------- | -| Leader b b | Breakpoint | -| Leader b c | Continue | -| Leader b i | Into | -| Leader b l | Last | -| Leader b o | Over | -| Leader b O | Out | -| Leader b r | Repl | -| Leader b R | Restart Frame | -| Leader b t | Debugger | -| Leader b x | Exit | - -### c - Code - -| Keybinding | Action | -| ---------------------------------- | ----------------- | -| Leader c d | Root Directory | -| Leader c f | Format File | -| Leader c F | Fix Tabs | -| Leader c r | Reload Module | -| Leader c R | Reload Configs | -| Leader c o | Dashboard | -| Leader c c | Highlight Colors | -| Leader c h | Hardtime | -| Leader c l | Clean Empty Lines | -| Leader c m | Markdown Preview | -| Leader c n | Notifications | -| Leader c p | Pick Color | -| Leader c P | Convert Color | -| Leader c x | Run File | - -### d - Database - -| Keybinding | Action | -| ---------------------------------- | ----------- | -| Leader d b | DB Explorer | -| Leader d j | DB Next | -| Leader d k | DB Prev | -| Leader d s | To CSV | -| Leader d S | To JSON | -| Leader d t | To Table | - -### e - Edit - -| Keybinding | Action | -| ---------------------------------- | ----------------- | -| Leader e a | Alternate File | -| Leader e c | Config | -| Leader e d | Config Dir | -| Leader e e | Explorer | -| Leader e f | File Under Cursor | -| Leader e l | Local Config | -| Leader e m | Readme | -| Leader e n | New File | -| Leader e z | Zsh Config | - -### f - Find - -| Keybinding | Action | -| ---------------------------------- | ------------------ | -| Leader f a | All Files | -| Leader f b | Buffers | -| Leader f c | File Commits | -| Leader f f | Find files | -| Leader f g | Find Text | -| Leader f l | Location List | -| Leader f m | Modified files | -| Leader f o | Find in Open Files | -| Leader f p | Last Search | -| Leader f q | Quickfix | -| Leader f r | Recent Files | -| Leader f s | Fuzzy Find in File | -| Leader f t | Panel | -| Leader f u | Undo History | -| Leader f w | Find Word | - -### g - Git - -| Keybinding | Action | -| ------------------------------------ | --------------- | -| Leader g a | Stage Hunk | -| Leader g A | Stage Buffer | -| Leader g b | Blame | -| Leader g c | Find Commits | -| Leader g C | Co-Authors | -| Leader g d | Diff | -| Leader g f | Fugitive Panel | -| Leader g g | Lazygit | -| Leader g i | Hunk Info | -| Leader g j | Next Hunk | -| Leader g k | Prev Hunk | -| Leader g l | Log | -| Leader g p | Pull | -| Leader g P | Push | -| Leader g r | Reset Hunk | -| Leader g R | Reset Buffer | -| Leader g s | Switch Branch | -| Leader g S | Stashed Changes | -| Leader g t b | Blame | -| Leader g t d | Deleted | -| Leader g t l | Line HL | -| Leader g t n | Number HL | -| Leader g t s | Signs | -| Leader g t w | Word Diff | -| Leader g u | Undo Stage Hunk | -| Leader g v | Select Hunk | - -### h - Help - -| Keybinding | Action | -| ---------------------------------- | ---------------- | -| Leader h h | Help Pages | -| Leader h i | Inspect Position | -| Leader h k | Hover Doc | -| Leader h m | Man Pages | - -### i - Insert - -| Keybinding | Action | -| ---------------------------------- | ------------- | -| Leader i d | Date | -| Leader i e | Emojis | -| Leader i f | File Name | -| Leader i n | Nerd Glyphs | -| Leader i P | Absolute Path | -| Leader i p | Relative Path | -| Leader i r | Registers | -| Leader i t | Time | - -### j - Jump - -| Keybinding | Action | -| ---------------------------------- | ----------------- | -| Leader j c | Word | -| Leader j d | Diagnostics | -| Leader j f | Jumplist | -| Leader j h | Backward | -| Leader j j | Remote | -| Leader j k | Treesitter | -| Leader j l | Forward | -| Leader j n | Search Forward | -| Leader j N | Search Backward | -| Leader j p | Previous Jump | -| Leader j s | Search | -| Leader j t | Remote Treesitter | -| Leader j w | Current Word | - -### k - Keys - -| Keybinding | Action | -| ---------------------------------- | --------------- | -| Leader k c | Commands | -| Leader k h | Command History | -| Leader k k | Keymaps | -| Leader k s | Search History | - -### l - LSP - -| Keybinding | Action | -| ---------------------------------- | --------------------- | -| Leader l a | Code Action | -| Leader l d | Peek Definition | -| Leader l f | Finder | -| Leader l F | References | -| Leader l g | Goto Definition | -| Leader l h | Hover | -| Leader l i | LSP Info | -| Leader l j | Next Diagnostic | -| Leader l k | Prev Diagnostic | -| Leader l L | Workspace Diagnostics | -| Leader l l | File Diagnostics | -| Leader l o | Outline | -| Leader l p | Incoming Calls | -| Leader l P | Outgoing Calls | -| Leader l q | Stop LSP | -| Leader l Q | Restart LSP | -| Leader l R | Replace | -| Leader l r | Rename | -| Leader l s | Document Symbols | -| Leader l S | Workspace Symbols | -| Leader l T | Goto Type Definition | -| Leader l t | Peek Type Definition | - -### Marks - -| Keybinding | Action | -| ------------------------------------ | ------------------- | -| Leader m b | Bookmarks | -| Leader m d | Delete Line | -| Leader m D | Delete Buffer | -| Leader m h | Next Bookmark | -| Leader m j | Next | -| Leader m k | Previous | -| Leader m l | Previous Bookmark | -| Leader m m | All Marks | -| Leader m n 1 | Next Bookmark 1 | -| Leader m n 2 | Next Bookmark 2 | -| Leader m n 3 | Next Bookmark 3 | -| Leader m n 4 | Next Bookmark 4 | -| Leader m p 1 | Previous Bookmark 1 | -| Leader m p 2 | Previous Bookmark 2 | -| Leader m p 3 | Previous Bookmark 3 | -| Leader m p 4 | Previous Bookmark 4 | -| Leader m P | Preview | -| Leader m s | Set Next | -| Leader m t | Toggle | -| Leader m x | Delete Bookmark | -| Leader m 1 | Toggle Bookmark 0 | -| Leader m 2 | Toggle Bookmark 2 | -| Leader m 3 | Toggle Bookmark 3 | -| Leader m 4 | Toggle Bookmark 4 | - -### n - Notes - -| Keybinding | Action | -| ---------------------------------- | ---------------- | -| Leader n d | Today's Todo | -| Leader n e | Today's Entry | -| Leader n f | All Notes | -| Leader n g | Find Notes | -| Leader n h | Yesterday's Todo | -| Leader n l | Tomorrow's Todo | -| Leader n n | New Note | -| Leader n s | Commit Note | -| Leader n t | Incomplete Todos | -| Leader n x | Toggle Todo | - -### o - Options - -| Keybinding | Action | -| ---------------------------------- | ---------------- | -| Leader o c | Colorscheme | -| Leader o h | Highlight Colors | -| Leader o n | Relative Numbers | -| Leader o o | All Options | - -### p - Packages - -| Keybinding | Action | -| ---------------------------------- | ------- | -| Leader p c | Check | -| Leader p d | Debug | -| Leader p i | Install | -| Leader p l | Log | -| Leader p m | Mason | -| Leader p P | Profile | -| Leader p p | Plugins | -| Leader p r | Restore | -| Leader p s | Sync | -| Leader p u | Update | -| Leader p x | Clean | - -### q - Quit - -| Keybinding | Action | -| ---------------------------------- | -------------- | -| Leader q a | Quit All | -| Leader q b | Close Buffer | -| Leader q d | Delete Buffer | -| Leader q f | Force Quit | -| Leader q q | Quit | -| Leader q s | Close Split | -| Leader q w | Write and Quit | - -### r - Refactor - -| Keybinding | Action | -| ---------------------------------- | -------------------- | -| Leader r b | Replace Buffer | -| Leader r d | Go To Definition | -| Leader r e | Extract Block | -| Leader r f | Extract To File | -| Leader r h | List Definition Head | -| Leader r i | Inline Variable | -| Leader r j | Next Usage | -| Leader r k | Previous Usage | -| Leader r l | List Definition | -| Leader r n | Swap Next | -| Leader r p | Swap Previous | -| Leader r R | Refactor Commands | -| Leader r r | Smart Rename | -| Leader r S | Replace | -| Leader r s | Replace Word | -| Leader r v | Extract Variable | -| Leader r w | Replace Word | - -### s - Split - -| Keybinding | Action | -| ---------------------------------- | ---------------- | -| Leader s ` | Previous Window | -| Leader s \ | Split Right | -| Leader s / | Split Below | -| Leader s - | Decrease Width | -| Leader s = | Increase Width | -| Leader s _ | Decrease Height | -| Leader s + | Increase Height | -| Leader s a | Horizontal Split | -| Leader s c | Close Tab | -| Leader s f | First Tab | -| Leader s h | Move Left | -| Leader s H | Decrease Width | -| Leader s j | Move Down | -| Leader s J | Decrease Height | -| Leader s k | Move Up | -| Leader s K | Increase Height | -| Leader s l | Move Right | -| Leader s L | Increase Width | -| Leader s p | Previous Pane | -| Leader s q | Close Split | -| Leader s s | Vertical Split | - -### t - Terminal - -| Keybinding | Action | -| ---------------------------------- | ------------------- | -| Leader t ` | Horizontal Terminal | -| Leader t c | Rails Console | -| Leader t n | Node | -| Leader t p | Python | -| Leader t r | Ruby | -| Leader t s | Horizontal Terminal | -| Leader t t | Terminal | -| Leader t v | Vertical Terminal | - -### u - Test - -| Keybinding | Action | -| ---------------------------------- | ---------------- | -| Leader u c | Run Current Test | -| Leader u f | Run Test File | -| Leader u o | Test Output | -| Leader u s | Test Summary | - -### v - Select - -| Keybinding | Action | -| ---------------------------------- | -------------- | -| Leader v B | Around Bracket | -| Leader v b | Bracket | -| Leader v P | Around Para | -| Leader v p | Paragraph | -| Leader v Q | Around Quote | -| Leader v q | Quote | - -### w - Writing - -| Keybinding | Action | -| ---------------------------------- | -------------- | -| Leader w c | Spellcheck | -| Leader w f | Force Write | -| Leader w j | Next Misspell | -| Leader w k | Prev Misspell | -| Leader w q | Write and Quit | -| Leader w s | Suggestions | -| Leader w t | Twilight | -| Leader w w | Write and Quit | -| Leader w z | ZenMode | - -### x - Exit - -| Keybinding | Action | -| -------------------------------- | ------------- | -| Leader x | Save and Quit | - -### y - Yank - -| Keybinding | Action | -| ---------------------------------- | --------------- | -| Leader y a | Copy Whole File | -| Leader y f | File Name | -| Leader y g | Copy Git URL | -| Leader y P | Absolute Path | -| Leader y p | Relative Path | - -## Leader Bindings (Visual Mode) - -### a - AI - -| Keybinding | Action | -| ---------------------------------- | -------------- | -| Leader a c | Copilot Chat | -| Leader a d | Docs | -| Leader a e | Explain | -| Leader a f | Fix | -| Leader a F | Fix Diagnostic | -| Leader a g | Commit | -| Leader a G | Commit Staged | -| Leader a o | Optimize | -| Leader a r | Review | -| Leader a t | Tests | - -### c - Code - -| Keybinding | Action | -| ---------------------------------- | --------------------- | -| Leader c i | Sort Case Insensitive | -| Leader c S | Sort Desc | -| Leader c s | Sort Asc | -| Leader c u | Unique | -| Leader c x | Run Code | - -### g - Git - -| Keybinding | Action | -| ---------------------------------- | ---------- | -| Leader g a | Stage Hunk | -| Leader g r | Reset Hunk | - -### j - Jump - -| Keybinding | Action | -| ---------------------------------- | ----------------- | -| Leader j d | Diagnostics | -| Leader j j | Remote | -| Leader j k | Treesitter | -| Leader j n | Search Forward | -| Leader j N | Search Backward | -| Leader j p | Previous Jump | -| Leader j s | Search | -| Leader j t | Remote Treesitter | -| Leader j w | Current Word | - -### l - LSP - -| Keybinding | Action | -| ---------------------------------- | ----------------- | -| Leader l a | Range Code Action | - -### r - Refactor - -| Keybinding | Action | -| ---------------------------------- | ----------------- | -| Leader r r | Refactor Commands | -| Leader r e | Extract Function | -| Leader r f | Extract To File | -| Leader r v | Extract Variable | -| Leader r i | Inline Variable | - -### y - Yank - -| Keybinding | Action | -| ---------------------------------- | ------------ | -| Leader y g | Copy Git URL | - -## Non Leader Bindings - -| Keybinding | Action | -| ---------------------------------- | ---------------------- | -| K | LSP Hover | -| Q | Force Quit! | -| U | Redo | -| Shift + H | Previous Buffer | -| Shift + L | Next Buffer | -| Ctrl + H | Move Left | -| Ctrl + J | Move Down | -| Ctrl + K | Move Up | -| Ctrl + L | Move Right | -| Ctrl + Up | Increase window height | -| Ctrl + Down | Decrease window height | -| Ctrl + Left | Decrease window width | -| Ctrl + Right | Increase window width | -| Ctrl + F | Find Files | -| Ctrl + G | Lazygit | - -### [ - Previous - -| Keybinding | Action | -| ------------------------- | ------------ | -| [ b | Buffer | -| [ c | Change | -| [ B | First Buffer | -| [ d | Diagnostic | -| [ e | Edit | -| [ g | Git Hunk | -| [ j | Jump | - -### ] - Next - -| Keybinding | Action | -| ------------------------- | ----------- | -| ] b | Buffer | -| ] c | Change | -| ] B | Last Buffer | -| ] d | Diagnostic | -| ] e | Edit | -| ] g | Git Hunk | -| ] j | Jump | diff --git a/lua/core/autocmd.lua b/lua/core/autocmd.lua index 9b0f992..75d9995 100644 --- a/lua/core/autocmd.lua +++ b/lua/core/autocmd.lua @@ -1,5 +1,5 @@ local function augroup(name) - return vim.api.nvim_create_augroup('nvim2k_' .. name, { clear = true }) + return vim.api.nvim_create_augroup('nvim' .. name, { clear = true }) end -- Strip trailing spaces before write