From 382fa580aec083ad6e702a07a9a2180bd08a841e Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Tue, 21 Apr 2026 01:24:37 +0100 Subject: style(nvim): drop unused nvmap helper; reformat treesitter keymaps Also removes a stray ANSI escape in treesitter.lua. --- dot_config/nvim/lua/config/keymaps.lua | 3 -- dot_config/nvim/lua/plugins/treesitter.lua | 78 +++++++++--------------------- 2 files changed, 24 insertions(+), 57 deletions(-) (limited to 'dot_config/nvim/lua') diff --git a/dot_config/nvim/lua/config/keymaps.lua b/dot_config/nvim/lua/config/keymaps.lua index 366a37e..a0dc19e 100644 --- a/dot_config/nvim/lua/config/keymaps.lua +++ b/dot_config/nvim/lua/config/keymaps.lua @@ -13,9 +13,6 @@ end local function vmap(l, r, desc) map("v", l, r, desc) end -local function nvmap(l, r, desc) - map({ "n", "v" }, l, r, desc) -end local function ncmd(l, r, desc) cmd("n", l, r, desc) end diff --git a/dot_config/nvim/lua/plugins/treesitter.lua b/dot_config/nvim/lua/plugins/treesitter.lua index 69902c6..4f3ad31 100644 --- a/dot_config/nvim/lua/plugins/treesitter.lua +++ b/dot_config/nvim/lua/plugins/treesitter.lua @@ -12,60 +12,30 @@ vim.keymap.set( "Treewalker Down", { silent = true, desc = "Moves up to the next neighbor node" } ) -vim.keymap.set( - { "n", "v" }, - "", - "Treewalker Left", - { - silent = true, - desc = "Moves to the first ancestor node that's on a different line from the current node", - } -) -vim.keymap.set( - { "n", "v" }, - "", - "Treewalker Right", - { - silent = true, - desc = "Moves to the next node down that's indented further than the current node", - } -) -vim.keymap.set( - "n", - "", - "Treewalker SwapUp", - { - silent = true, - desc = "Swaps the highest node on the line upwards in the document", - } -) -vim.keymap.set( - "n", - "", - "Treewalker SwapDown", - { - silent = true, - desc = "Swaps the biggest node on the line downward in the document", - } -) -vim.keymap.set( - "n", - "", - "Treewalker SwapLeft", - { - silent = true, - desc = "Swap the node under the cursor with its previous neighbor", - } -) -vim.keymap.set( - "n", - "", - "Treewalker SwapRight", - { - silent = true, - desc = "Swap the node under the cursor with its next neighbor", - } -) +vim.keymap.set({ "n", "v" }, "", "Treewalker Left", { + silent = true, + desc = "Moves to the first ancestor node that's on a different line from the current node", +}) +vim.keymap.set({ "n", "v" }, "", "Treewalker Right", { + silent = true, + desc = "Moves to the next node down that's indented further than the current node", +}) +vim.keymap.set("n", "", "Treewalker SwapUp", { + silent = true, + desc = "Swaps the highest node on the line upwards in the document", +}) +vim.keymap.set("n", "", "Treewalker SwapDown", { + silent = true, + desc = "Swaps the biggest node on the line downward in the document", +}) +vim.keymap.set("n", "", "Treewalker SwapLeft", { + silent = true, + desc = "Swap the node under the cursor with its previous neighbor", +}) +vim.keymap.set("n", "", "Treewalker SwapRight", { + silent = true, + desc = "Swap the node under the cursor with its next neighbor", +}) require("nvim-treesitter").install({ "awk", -- cgit v1.2.3-70-g09d2