Update Keybindings #21
17
README.md
17
README.md
@@ -53,9 +53,9 @@ The **Leader Key** is set to `Space`.
|
||||
### LSP & Development
|
||||
| Action | Keybinding | Description |
|
||||
| :--- | :--- | :--- |
|
||||
| **Hover Docs** | `K` | Display documentation for the symbol under cursor. |
|
||||
| **Hover Docs** | `Ctrl + k` | Display documentation for the symbol under cursor. |
|
||||
| **Go to Definition**| `gd` | Jump to the source code of a function/variable. |
|
||||
| **Code Actions** | `<leader>ca` | Show available fixes or refactors. |
|
||||
| **Code Actions** | `<leader>ca` or `Ctrl + .` | Show available code actions, fixes or refactors. |
|
||||
| **Align File** | `<leader>af` | Auto align file. |
|
||||
| **References** | `gr` | List all places where a symbol is used. |
|
||||
| **Rename** | `<leader>rn` | Rename all occurrences of the symbol. |
|
||||
@@ -66,15 +66,18 @@ The **Leader Key** is set to `Space`.
|
||||
| **Show Error** | `<leader>e` | Open a floating window with the full error under cursor. |
|
||||
| **Next Error** | `]d` | Jump to the next diagnostic in the file. |
|
||||
| **Previous Error** | `[d` | Jump to the previous diagnostic in the file. |
|
||||
| **Error List** | `<leader>el` | Load all diagnostics into the quickfix list. |
|
||||
| **Close Quickfix** | `:q <Enter>` | Close the quickfix window while active. |
|
||||
| **Error List** | `<leader>el` | Load all diagnostics into the error list. |
|
||||
| **Close Error List** | `:q <Enter>` | Close the error list window while active. |
|
||||
|
||||
### Window Management
|
||||
| Action | Keybinding | Description |
|
||||
| :--- | :--- | :--- |
|
||||
| **Cycle Windows** | `Ctrl + w + w` | Cycle focus between open windows (e.g. quickfix ↔ code). |
|
||||
| **Move Down** | `Ctrl + w + j` | Move focus to the window below. |
|
||||
| **Move Up** | `Ctrl + w + k` | Move focus to the window above. |
|
||||
| **Cycle Windows** | `Ctrl + w w` | Cycle focus between open windows (). |
|
||||
| **Move Down** | `Ctrl + w j` | Move focus to the window below. |
|
||||
| **Move Up** | `Ctrl + w k` | Move focus to the window above. |
|
||||
| **Move Up** | `Ctrl + w s` | Duplicate window (horizontal). |
|
||||
| **Move Up** | `Ctrl + w v` | Duplicate window (Verticle). |
|
||||
| **Move Up** | `Ctrl + w q` | Close active window. |
|
||||
| **Jump & Stay** | `Ctrl + w + Enter` | Open quickfix entry in a split, keeping quickfix focused. |
|
||||
|
||||
### Commenting
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||
"flutter-tools.nvim": { "branch": "main", "commit": "677cc07c16e8b89999108d2ebeefcfc5f539b73c" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a979821a975897b88493843301950c456a725982" },
|
||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||
|
||||
@@ -67,10 +67,11 @@ return {
|
||||
callback = function(ev)
|
||||
local opts = { buffer = ev.buf }
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "<C-k>", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set({ "n", "v" }, "<C-.>", vim.lsp.buf.code_action, opts)
|
||||
-- Diagnostic keymaps
|
||||
vim.keymap.set("n", "<leader>e", vim.diagnostic.open_float, opts) -- show error under cursor
|
||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) -- jump to previous error
|
||||
|
||||
Reference in New Issue
Block a user