From 131f96299d65691c2e8dbd31a54aff4b68ecf911 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Mon, 14 Apr 2025 00:37:36 +0200 Subject: [PATCH] feat(neo-tree): add mapping to focus tree --- lua/plugins/neo-tree.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index d5f7451..ffc333a 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -7,6 +7,13 @@ local function toggle_neo_tree() }) end +local function focus_neo_tree() + require("neo-tree.command").execute({ + action = "focus", + reveal = true, + }) +end + ---@type LazyPluginSpec return { "nvim-neo-tree/neo-tree.nvim", @@ -21,6 +28,10 @@ return { "tt", toggle_neo_tree, }, + { + "a", + focus_neo_tree, + }, }, ---@type neotree.Config? opts = {