Update Keybindings

This commit is contained in:
2026-04-15 13:11:02 +02:00
parent 1e761356fe
commit c75f9a8b4c
3 changed files with 13 additions and 9 deletions

View File

@@ -53,9 +53,9 @@ The **Leader Key** is set to `Space`.
### LSP & Development ### LSP & Development
| Action | Keybinding | Description | | 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. | | **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. | | **Align File** | `<leader>af` | Auto align file. |
| **References** | `gr` | List all places where a symbol is used. | | **References** | `gr` | List all places where a symbol is used. |
| **Rename** | `<leader>rn` | Rename all occurrences of the symbol. | | **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. | | **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. | | **Next Error** | `]d` | Jump to the next diagnostic in the file. |
| **Previous Error** | `[d` | Jump to the previous 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. | | **Error List** | `<leader>el` | Load all diagnostics into the error list. |
| **Close Quickfix** | `:q <Enter>` | Close the quickfix window while active. | | **Close Error List** | `:q <Enter>` | Close the error list window while active. |
### Window Management ### Window Management
| Action | Keybinding | Description | | Action | Keybinding | Description |
| :--- | :--- | :--- | | :--- | :--- | :--- |
| **Cycle Windows** | `Ctrl + w + w` | Cycle focus between open windows (e.g. quickfix ↔ code). | | **Cycle Windows** | `Ctrl + w w` | Cycle focus between open windows (). |
| **Move Down** | `Ctrl + w + j` | Move focus to the window below. | | **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 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. | | **Jump & Stay** | `Ctrl + w + Enter` | Open quickfix entry in a split, keeping quickfix focused. |
### Commenting ### Commenting

View File

@@ -9,7 +9,7 @@
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"flutter-tools.nvim": { "branch": "main", "commit": "677cc07c16e8b89999108d2ebeefcfc5f539b73c" }, "flutter-tools.nvim": { "branch": "main", "commit": "677cc07c16e8b89999108d2ebeefcfc5f539b73c" },
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" }, "harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "a979821a975897b88493843301950c456a725982" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "a979821a975897b88493843301950c456a725982" },
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },

View File

@@ -67,10 +67,11 @@ return {
callback = function(ev) callback = function(ev)
local opts = { buffer = ev.buf } local opts = { buffer = ev.buf }
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts) 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", "gr", vim.lsp.buf.references, opts)
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, 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" }, "<leader>ca", vim.lsp.buf.code_action, opts)
vim.keymap.set({ "n", "v" }, "<C-.>", vim.lsp.buf.code_action, opts)
-- Diagnostic keymaps -- Diagnostic keymaps
vim.keymap.set("n", "<leader>e", vim.diagnostic.open_float, opts) -- show error under cursor 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 vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) -- jump to previous error