From 74e7dd0f260daed67c60dfecec84922ba182329c Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Sun, 15 Jun 2025 21:15:06 +0900 Subject: updates --- ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua | 1 + ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/context.lua | 9 ++++----- ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/grug-far.lua | 2 +- ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/keys.lua | 2 +- ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/lsp.lua | 2 +- ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua | 10 +++++++++- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua index 5924b91..d2bc5bb 100644 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/keymaps.lua @@ -20,6 +20,7 @@ vim.keymap.set("n", "", "e #", { desc = "Switch to last vim.keymap.set({ "n", "v", "x", "t" }, "bd", ":bd", { desc = "Close buffer" }) vim.keymap.set({ "n", "v", "x", "t" }, "BD", ":bd!", { desc = "Force close buffer" }) vim.keymap.set("n", "bn", "enew", { desc = "Open new buffer" }) +vim.keymap.set("n", "bc", "e!", { desc = "Clear edit" }) vim.keymap.set({ "i", "x", "n", "s" }, "", "w", { desc = "Save current buffer" }) vim.keymap.set({ "n", "v" }, "wq", "wq", { desc = "Save current buffer and quit" }) vim.keymap.set({ "n", "v" }, "WQ", "wqa", { desc = "Save all buffers and quit" }) diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/context.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/context.lua index e8979c8..1daaa54 100644 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/context.lua +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/context.lua @@ -16,11 +16,10 @@ return { zindex = 20, -- The Z-index of the context window on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching }) - end, - keys = { + vim.keymap.set("n", "[t", function() require("treesitter-context").go_to_context(vim.v.count1) - end, { silent = true, desc = "Go to context" }), - vim.keymap.set({ "n", "v" }, "zc", "TSContextToggle", { desc = "Toggle context" }), - }, + end, { silent = true, desc = "Go to context" }) + vim.keymap.set({ "n", "v" }, "zc", "TSContextToggle", { desc = "Toggle context" }) + end, } diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/grug-far.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/grug-far.lua index 6f6ff48..997b1a6 100644 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/grug-far.lua +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/grug-far.lua @@ -13,7 +13,7 @@ return { end, keys = { { - "rp", + "rc", function() local grug = require("grug-far") local ext = vim.bo.buftype == "" and vim.fn.expand("%:e") diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/keys.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/keys.lua index a353118..8efb41f 100644 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/keys.lua +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/keys.lua @@ -103,9 +103,9 @@ return { desc = "Which-key query lookup", }, { - mode = { "n", "v", "x" }, "wK", "WhichKey", + mode = { "n", "v", "x" }, desc = "Which-key all key", }, }, diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/lsp.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/lsp.lua index 829eac4..c725789 100644 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/lsp.lua +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/lsp.lua @@ -360,11 +360,11 @@ return { end, keys = { { - mode = { "n", "v" }, "lf", function() require("conform").format({ async = true }) end, + mode = { "n", "v" }, desc = "Format buffer by lsp", }, { diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua index 1048a1e..a48bb74 100644 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua @@ -46,7 +46,15 @@ return { event = "VeryLazy", dependencies = { "vimwiki/vimwiki", - "powerman/vim-plugin-AnsiEsc", + { + "powerman/vim-plugin-AnsiEsc", + keys = { + { "swp", false }, + { "rwp", false }, + { "wp", "SaveWinPosn", noremap = false, desc = "Save window position" }, + { "rp", "RestoreWinPosn", noremap = false, desc = "Restore window position" }, + }, + }, "majutsushi/tagbar", "farseer90718/vim-taskwarrior", }, -- cgit v1.2.3