From 9c2758ed56ea605d623c2124a0ffe4799a5787a5 Mon Sep 17 00:00:00 2001 From: Pyxels <39232833+Pyxels@users.noreply.github.com> Date: Wed, 4 Dec 2024 10:45:39 +0100 Subject: [PATCH] feat(editor): add treesitter context, selection and movement --- config/editor.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/config/editor.nix b/config/editor.nix index 7b0460d..43d18e4 100644 --- a/config/editor.nix +++ b/config/editor.nix @@ -48,6 +48,25 @@ indent.enable = true; }; }; + treesitter-context = { + enable = true; + settings.max_lines = 2; + }; + treesitter-textobjects = { + enable = true; + select = { + enable = true; + keymaps = { + "af" = "@function.outer"; + "if" = "@function.inner"; + }; + }; + move = { + enable = true; + gotoNextStart = {"]f" = "@function.outer";}; + gotoPreviousStart = {"[f" = "@function.outer";}; + }; + }; nvim-surround.enable = true;