dotfiles/.config/nvim/lua/core/autocmds.lua

28 lines
678 B
Lua
Raw Normal View History

2022-10-21 06:15:28 -04:00
vim.api.nvim_create_autocmd({"BufEnter","BufWinEnter","WinEnter","CmdwinEnter"},{
2024-07-08 14:57:05 -04:00
callback = function()
if vim.fn.expand("%") == "NvimTree_1" then
vim.opt.statusline = " NvimTree"
return ""
end
local ok, statusline_output = pcall(require, "core.statusline")
if ok then
vim.opt.statusline = statusline_output
else
local ok, notify = pcall(require, "notify")
if not ok then
return
end
print(statusline_output)
notify("Error loading status line")
end
end
2022-10-21 06:15:28 -04:00
})
2024-07-08 14:57:05 -04:00
-- vim.api.nvim_create_autocmd({"BufEnter","BufWinEnter","WinEnter","CmdwinEnter"},{
-- callback = function()
--
-- end,
-- })