aboutsummaryrefslogtreecommitdiff
path: root/modules/neovim/nvim/lua/config/keybinds.lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/neovim/nvim/lua/config/keybinds.lua')
-rw-r--r--modules/neovim/nvim/lua/config/keybinds.lua7
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()