From 40d9d37925e18705f13706be41052b73e1fd1292 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Mon, 13 Jul 2026 10:06:32 +0100 Subject: [PATCH] Updated keybindings to resolve conflicts --- init.lua | 3 +++ lua/config/keys.lua | 25 +++++++++++-------------- lua/plugins/lang/python.lua | 3 +++ 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/init.lua b/init.lua index 6862c78..1c561a8 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,9 @@ -- Enable experimental fast lua module loader vim.loader.enable() +vim.g.mapleader = "\\" +vim.g.maplocalleader = "\\\\" + require("config") require("keybindings") diff --git a/lua/config/keys.lua b/lua/config/keys.lua index b9b4b88..f5d08bd 100644 --- a/lua/config/keys.lua +++ b/lua/config/keys.lua @@ -22,6 +22,8 @@ return { { "h", group = "[H]arpoon", icon = "󱡀" }, { "x", group = "[X] Trouble", icon = "󰋔" }, { "a", group = "[A]genda / [O]rg Mode", icon = "󰕪" }, + { "", group = "[L]ocal Leader (\\\\)", icon = "" }, + { "x", group = "Local [X] UV", icon = "" }, }, commands = { { "f", group = "[F]ormat", icon = "󰗈" }, @@ -228,18 +230,18 @@ return { desc = "[G]oto [T]ype", }, { - "ss", + "cs", function() require("telescope.builtin").lsp_document_symbols() end, - desc = "[S]earch [S]ymbols", + desc = "[C]ode [S]ymbols", }, { - "ws", + "cw", function() require("telescope.builtin").lsp_dynamic_workspace_symbols() end, - desc = "[W]orkspace [S]ymbols", + desc = "[C]ode [W]orkspace Symbols", }, { "r", vim.lsp.buf.rename, desc = "[R]ename" }, { "ca", vim.lsp.buf.code_action, desc = "[C]ode [A]ction" }, @@ -342,8 +344,8 @@ return { }, { "sb", - telescope_builtin.find_files, - desc = "[S]earch file [B]rowser", + telescope_builtin.buffers, + desc = "[S]earch [B]uffers", mode = "n", }, { @@ -382,12 +384,7 @@ return { desc = '[S]earch Recent Files ("." for repeat)', mode = "n", }, - { - "", - telescope_builtin.buffers, - desc = "[󰜞] Find existing buffers", - mode = "n", - }, + -- Slightly advanced example of overriding default behavior and theme { "/", @@ -462,9 +459,9 @@ return { "Trouble diagnostics toggle filter.buf=0", desc = "Buffer Diagnostics", }, - { "cs", "Trouble symbols toggle", desc = "Symbols" }, + { "xs", "Trouble symbols toggle", desc = "Symbols (Trouble)" }, { - "cS", + "xS", "Trouble lsp toggle", desc = "LSP references/definitions/... (Trouble)", }, diff --git a/lua/plugins/lang/python.lua b/lua/plugins/lang/python.lua index 9565cdc..bf74013 100644 --- a/lua/plugins/lang/python.lua +++ b/lua/plugins/lang/python.lua @@ -8,6 +8,9 @@ return { }, opts = { picker_integration = true, + keymaps = { + prefix = "x", + }, }, }, {