nvim: fix weird chdir bug, for real
This commit is contained in:
parent
7de139a6e8
commit
cbcc45ad69
|
@ -39,11 +39,8 @@ vim.api.nvim_create_autocmd({ 'FileType' }, {
|
||||||
pattern = { 'git', 'Neogit*' },
|
pattern = { 'git', 'Neogit*' },
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.o.list = false
|
vim.o.list = false
|
||||||
-- when root is nil it can mess up pwd for some reason
|
-- this messes up the path of the current file for some reason
|
||||||
local root = require('my.functions').get_project_root()
|
--vim.cmd.lcd(require('my.functions').get_project_root())
|
||||||
if root then
|
|
||||||
vim.cmd.lcd(root)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue