Changed show line diagnostics with lspsaga to <leader>D

This commit is contained in:
josean-dev 2022-11-23 10:12:34 -04:00
parent 7c98538698
commit 6ed08e64fd
2 changed files with 76 additions and 1 deletions

View file

@ -30,7 +30,7 @@ local on_attach = function(client, bufnr)
keymap.set("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts) -- go to implementation
keymap.set("n", "<leader>ca", "<cmd>Lspsaga code_action<CR>", opts) -- see available code actions
keymap.set("n", "<leader>rn", "<cmd>Lspsaga rename<CR>", opts) -- smart rename
keymap.set("n", "<leader>d", "<cmd>Lspsaga show_line_diagnostics<CR>", opts) -- show diagnostics for line
keymap.set("n", "<leader>D", "<cmd>Lspsaga show_line_diagnostics<CR>", opts) -- show diagnostics for line
keymap.set("n", "<leader>d", "<cmd>Lspsaga show_cursor_diagnostics<CR>", opts) -- show diagnostics for cursor
keymap.set("n", "[d", "<cmd>Lspsaga diagnostic_jump_prev<CR>", opts) -- jump to previous diagnostic in buffer
keymap.set("n", "]d", "<cmd>Lspsaga diagnostic_jump_next<CR>", opts) -- jump to next diagnostic in buffer

75
cheatsheet.md Normal file
View file

@ -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 `<leader>` = `<space>`
## Insert Mode Keymaps
| Keymap | Action |
| ------ | ---------------- |
| `jk` | Exit Insert Mode |
## Normal Mode Keymaps
### Search Related Keymaps
| Keymap | Action |
| ------------ | ----------------------- |
| `<leader>nh` | Clear Search Highlights |
### Increment/Decrement Numbers
| Keymap | Action |
| ----------- | ---------------- |
| `<leader>+` | Increment number |
| `<leader>-` | Decrement number |
### Split Window Management
| Keymap | Action |
| ------------ | --------------------------------------- |
| `<leader>sv` | Split Window Vertically |
| `<leader>sh` | Split Window Horizontally |
| `<leader>se` | Make Split Windows Equal Width & Height |
| `<leader>sx` | Close Current Split Window |
| `<leader>sm` | Toggle Split Window Maximization |
### Tab Management
| Keymap | Action |
| ------------ | ------------------ |
| `<leader>to` | Open New Tab |
| `<leader>tx` | Close Current Tab |
| `<leader>tn` | Go To Next Tab |
| `<leader>tp` | Go To Previous tab |
### Nvim-Tree File Explorer
| Keymap | Action |
| ----------- | -------------------- |
| `<leader>e` | Toggle File Explorer |
### Telescope Fuzzy Finder
| Keymap | Action |
| ------------ | --------------------------------------- |
| `<leader>ff` | Find files within project |
| `<leader>fs` | Find string within project |
| `<leader>fc` | Find string under cursor within project |
| `<leader>fb` | Show open buffers |
| `<leader>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 |
| ------ | ------ |
| `<leader>gc` | List git commits for repository |
| `<leader>gfc` | List git commits for current file/buffer |
| `<leader>gb` | List git branches for repository |
| `<leader>gs` | List current changes per file with diff preview |
### LSP
| Keymap | Action |
| ------------ | ----------- |
| `<leader>rs` | Restart lsp |