From c60df482e9708b49be1b9f35dd85b41de866ee83 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Sat, 21 Aug 2021 13:57:15 +0530 Subject: [PATCH] open dir with nvim (#316) opening dir with nvim will work by default but since we have lazy loaded nvimtree , it doesnt update the cwd in nvimtree. This will fix that. --- lua/options.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/options.lua b/lua/options.lua index 647ee3e..84e1a72 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -71,6 +71,8 @@ for _, plugin in pairs(disabled_built_ins) do g["loaded_" .. plugin] = 1 end +vim.cmd [[ autocmd BufEnter * if &buftype != "terminal" | lcd %:p:h | endif ]] + -- Use relative & absolute line numbers in 'n' & 'i' modes respectively -- vim.cmd[[ au InsertEnter * set norelativenumber ]] -- vim.cmd[[ au InsertLeave * set relativenumber ]]