From 5f8170ec0acb6b055398103799d18a3697584eb7 Mon Sep 17 00:00:00 2001 From: Stefan Weigl-Bosker Date: Tue, 13 Jan 2026 15:27:20 -0500 Subject: modules/neovim: sync --- modules/neovim/nvim/lua/config/keybinds.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/neovim/nvim/lua/config/keybinds.lua') diff --git a/modules/neovim/nvim/lua/config/keybinds.lua b/modules/neovim/nvim/lua/config/keybinds.lua index 69c5ce3..a2b6fef 100644 --- a/modules/neovim/nvim/lua/config/keybinds.lua +++ b/modules/neovim/nvim/lua/config/keybinds.lua @@ -14,6 +14,10 @@ local function swapnv(bind1, bind2) swap({'n', 'v'}, bind1, bind2) end +function mapobject(bind, action, opts) + vim.keymap.set({"x", "o"}, bind, action, opts) +end + -- swapnv('m', 'h') -- swapnv('n', 'j') -- swapnv('e', 'k') @@ -51,6 +55,9 @@ nmap('?', 'Telescope live_grep', { silent = true }) nmap('to', 'te', { silent = true; desc = "Open a terminal buffer in the current window." }) +-- mapobject("]f", require("nvim-treesitter-textobjects.move").goto_next_start("@function.outer", "textobjects"), { desc = "jump to the start of the next function"}) +-- mapobject("[f", require("nvim-treesitter-textobjects.move").goto_prev_start("@function.outer", "textobjects"), { desc = "jump to the start of the previous function"}) + vim.api.nvim_create_autocmd({ 'FileType' }, { pattern = '*', callback = function() -- cgit v1.2.3