From 152f1037467afa923b49029c1905cf246bcd7fd9 Mon Sep 17 00:00:00 2001 From: Alexandre Ignjatovic Date: Mon, 16 Dec 2024 13:20:05 +0100 Subject: [PATCH] Add treewalker --- init.lua | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 22c6efae..8157b39c 100644 --- a/init.lua +++ b/init.lua @@ -504,6 +504,7 @@ require('lazy').setup({ -- your configuration comes here }, }, + { -- Main LSP Configuration 'neovim/nvim-lspconfig', @@ -986,7 +987,21 @@ require('lazy').setup({ -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects }, - -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the + -- Treewalker for nvim-treesitter based movements + { + 'aaronik/treewalker.nvim', + opts = { + highlight = true, -- default is false + }, + config = function() + vim.api.nvim_set_keymap('n', '', ':Treewalker Down', { noremap = true }) + vim.api.nvim_set_keymap('n', '', ':Treewalker Up', { noremap = true }) + vim.api.nvim_set_keymap('n', '', ':Treewalker Left', { noremap = true }) + vim.api.nvim_set_keymap('n', '', ':Treewalker Right', { noremap = true }) + end, + }, + + -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and -- place them in the correct locations.