From 3284a97a1edb648b8158b277fa0ecc37da08390d Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 6 Sep 2023 20:14:57 +0200 Subject: [PATCH] neotree follow --- lua/plex/plugins/coding.lua | 2 +- lua/plex/plugins/neo-tree.lua | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lua/plex/plugins/coding.lua b/lua/plex/plugins/coding.lua index 74f2fff..7ad2a80 100644 --- a/lua/plex/plugins/coding.lua +++ b/lua/plex/plugins/coding.lua @@ -134,7 +134,7 @@ return { event = 'InsertEnter', dependencies = { 'rafamadriz/friendly-snippets' }, build = (not jit.os:find('Windows')) - and "echo 'NOTE: jsregexp is optional, so not a big deal if it fails to build'; make install_jsregexp" + and "echo 'jsregexp is optional, so not a big deal if it fails to build'; make install_jsregexp" or nil, -- stylua: ignore keys = { diff --git a/lua/plex/plugins/neo-tree.lua b/lua/plex/plugins/neo-tree.lua index fce3bc3..e8b20c0 100644 --- a/lua/plex/plugins/neo-tree.lua +++ b/lua/plex/plugins/neo-tree.lua @@ -170,6 +170,11 @@ return { }, }, filesystem = { + follow_current_file = { + enabled = true, -- This will find and focus the file in the active buffer every time + -- -- the current file is changed while the tree is open. + leave_dirs_open = true, -- `false` closes auto expanded dirs, such as with `:Neotree reveal` + }, window = { mappings = { ['H'] = 'toggle_hidden', @@ -196,7 +201,7 @@ return { end, }, }, - group_empty_dirs = true, + group_empty_dirs = false, use_libuv_file_watcher = true, bind_to_cwd = false, cwd_target = { @@ -227,7 +232,7 @@ return { }, }, buffers = { - bind_to_cwd = false, + bind_to_cwd = true, window = { mappings = { [''] = 'navigate_up',