diff --git a/.config/nvim/lua/josean/plugins/lsp/lspconfig.lua b/.config/nvim/lua/josean/plugins/lsp/lspconfig.lua index 39a89ef..78b94a3 100644 --- a/.config/nvim/lua/josean/plugins/lsp/lspconfig.lua +++ b/.config/nvim/lua/josean/plugins/lsp/lspconfig.lua @@ -30,7 +30,7 @@ local on_attach = function(client, bufnr) keymap.set("n", "gi", "lua vim.lsp.buf.implementation()", opts) -- go to implementation keymap.set("n", "ca", "Lspsaga code_action", opts) -- see available code actions keymap.set("n", "rn", "Lspsaga rename", opts) -- smart rename - keymap.set("n", "d", "Lspsaga show_line_diagnostics", opts) -- show diagnostics for line + keymap.set("n", "D", "Lspsaga show_line_diagnostics", opts) -- show diagnostics for line keymap.set("n", "d", "Lspsaga show_cursor_diagnostics", opts) -- show diagnostics for cursor keymap.set("n", "[d", "Lspsaga diagnostic_jump_prev", opts) -- jump to previous diagnostic in buffer keymap.set("n", "]d", "Lspsaga diagnostic_jump_next", opts) -- jump to next diagnostic in buffer diff --git a/cheatsheet.md b/cheatsheet.md new file mode 100644 index 0000000..3b06536 --- /dev/null +++ b/cheatsheet.md @@ -0,0 +1,75 @@ +# Neovim Keymaps + +Here's a list of the keymaps you can use with the Neovim config. It does not include standard Vim keymaps. + +In this config `` = `` + +## Insert Mode Keymaps + +| Keymap | Action | +| ------ | ---------------- | +| `jk` | Exit Insert Mode | + +## Normal Mode Keymaps + +### Search Related Keymaps + +| Keymap | Action | +| ------------ | ----------------------- | +| `nh` | Clear Search Highlights | + +### Increment/Decrement Numbers + +| Keymap | Action | +| ----------- | ---------------- | +| `+` | Increment number | +| `-` | Decrement number | + +### Split Window Management + +| Keymap | Action | +| ------------ | --------------------------------------- | +| `sv` | Split Window Vertically | +| `sh` | Split Window Horizontally | +| `se` | Make Split Windows Equal Width & Height | +| `sx` | Close Current Split Window | +| `sm` | Toggle Split Window Maximization | + +### Tab Management + +| Keymap | Action | +| ------------ | ------------------ | +| `to` | Open New Tab | +| `tx` | Close Current Tab | +| `tn` | Go To Next Tab | +| `tp` | Go To Previous tab | + +### Nvim-Tree File Explorer + +| Keymap | Action | +| ----------- | -------------------- | +| `e` | Toggle File Explorer | + +### Telescope Fuzzy Finder + +| Keymap | Action | +| ------------ | --------------------------------------- | +| `ff` | Find files within project | +| `fs` | Find string within project | +| `fc` | Find string under cursor within project | +| `fb` | Show open buffers | +| `fh` | Show help tags | + +The following git related keymaps for telescope are not in the youtube video. They must must be present in [keymaps.lua](.config/nvim/lua/josean/core/keymaps.lua) as they are in this repository. +| Keymap | Action | +| ------ | ------ | +| `gc` | List git commits for repository | +| `gfc` | List git commits for current file/buffer | +| `gb` | List git branches for repository | +| `gs` | List current changes per file with diff preview | + +### LSP + +| Keymap | Action | +| ------------ | ----------- | +| `rs` | Restart lsp |