1
0
Fork 0

nvim: fix weird chdir bug, for real

This commit is contained in:
tastytea 2023-08-07 01:42:49 +02:00
parent 7de139a6e8
commit cbcc45ad69
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 2 additions and 5 deletions

View File

@ -39,11 +39,8 @@ vim.api.nvim_create_autocmd({ 'FileType' }, {
pattern = { 'git', 'Neogit*' },
callback = function()
vim.o.list = false
-- when root is nil it can mess up pwd for some reason
local root = require('my.functions').get_project_root()
if root then
vim.cmd.lcd(root)
end
-- this messes up the path of the current file for some reason
--vim.cmd.lcd(require('my.functions').get_project_root())
end
})