diff options
| author | Stefan Weigl-Bosker <stefan@s00.xyz> | 2026-01-13 15:27:20 -0500 |
|---|---|---|
| committer | Stefan Weigl-Bosker <stefan@s00.xyz> | 2026-01-13 15:27:20 -0500 |
| commit | 5f8170ec0acb6b055398103799d18a3697584eb7 (patch) | |
| tree | de5c9e50b271e236065864d3eceb29aa2b463325 /modules/neovim/nvim/lua/config/keybinds.lua | |
| parent | 8b89238a07fd59609fabd6f142794c2129aa69c0 (diff) | |
| download | home-5f8170ec0acb6b055398103799d18a3697584eb7.tar.gz | |
modules/neovim: sync
Diffstat (limited to 'modules/neovim/nvim/lua/config/keybinds.lua')
| -rw-r--r-- | modules/neovim/nvim/lua/config/keybinds.lua | 7 |
1 files changed, 7 insertions, 0 deletions
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('<leader>?', '<cmd>Telescope live_grep<CR>', { silent = true }) nmap('<leader>to', '<cmd>te<CR>', { 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() |