14 lines
450 B
Lua
14 lines
450 B
Lua
|
-- Autocmds are automatically loaded on the VeryLazy event
|
||
|
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||
|
-- Add any additional autocmds here
|
||
|
local function open_nvim_tree(data)
|
||
|
local directory = vim.fn.isdirectory(data.file) == 1
|
||
|
if not directory then
|
||
|
return
|
||
|
end
|
||
|
|
||
|
vim.cmd.cd(data.file)
|
||
|
end
|
||
|
|
||
|
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|