From d28af9a31e55225d013b5a61d687c6f1cf37553e Mon Sep 17 00:00:00 2001 From: ray Date: Mon, 12 Jan 2026 16:28:26 +0000 Subject: [PATCH] Update netrw configuration to keep directories separate Set netrw_keepdir to 0 to prevent changing the working directory, ensuring LSP and symlink navigation remain functional. --- lua/netrw-config.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/netrw-config.lua b/lua/netrw-config.lua index c22bba5..7855ba6 100644 --- a/lua/netrw-config.lua +++ b/lua/netrw-config.lua @@ -20,9 +20,7 @@ vim.g.netrw_alto = 0 -- 50% split when pressing 'p' vim.g.netrw_winsize = 50 --- Keep the current directory and browsing directory separate --- This prevents netrw from changing pwd and breaking LSP/symlink navigation -vim.g.netrw_keepdir = 1 +vim.g.netrw_keepdir = 0 -- Open files in the same window (replace netrw buffer) -- Options: 0=same window, 1=horizontal split, 2=vertical split, 3=new tab, 4=previous window