From c75f9a8b4ccd7a67c5e1095dd51f7f8aa83bb0fb Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Wed, 15 Apr 2026 13:11:02 +0200 Subject: [PATCH] Update Keybindings --- README.md | 17 ++++++++++------- lazy-lock.json | 2 +- lua/plugins/lsp.lua | 3 ++- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b8dc5af..1616fdd 100644 --- a/README.md +++ b/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** | `ca` | Show available fixes or refactors. | +| **Code Actions** | `ca` or `Ctrl + .` | Show available code actions, fixes or refactors. | | **Align File** | `af` | Auto align file. | | **References** | `gr` | List all places where a symbol is used. | | **Rename** | `rn` | Rename all occurrences of the symbol. | @@ -66,15 +66,18 @@ The **Leader Key** is set to `Space`. | **Show Error** | `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** | `el` | Load all diagnostics into the quickfix list. | -| **Close Quickfix** | `:q ` | Close the quickfix window while active. | +| **Error List** | `el` | Load all diagnostics into the error list. | +| **Close Error List** | `:q ` | 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 diff --git a/lazy-lock.json b/lazy-lock.json index 881b116..7fa7349 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -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" }, diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index cf6975f..95d3667 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -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", "", vim.lsp.buf.hover, opts) vim.keymap.set("n", "gr", vim.lsp.buf.references, opts) vim.keymap.set("n", "rn", vim.lsp.buf.rename, opts) vim.keymap.set({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts) + vim.keymap.set({ "n", "v" }, "", vim.lsp.buf.code_action, opts) -- Diagnostic keymaps vim.keymap.set("n", "e", vim.diagnostic.open_float, opts) -- show error under cursor vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) -- jump to previous error -- 2.49.1