Closed hmajid2301 closed 1 year ago
I have no idea why this could happen.. in the meantime, you can guard the callback using something like this:
"rebelot/heirline.nvim",
event = "BufEnter",
opts = function()
local status = require "astronvim.utils.status"
return {
opts = {
disable_winbar_cb = function(args)
if not vim.api.nvim_buf_is_valid(args.buf) then return end
return status.condition.buffer_matches({
buftype = { "terminal", "prompt", "nofile", "help", "quickfix" },
filetype = { "NvimTree", "neo%-tree", "dashboard", "Outline", "aerial" },
}, args.buf)
end,
},
// ....
}
I tried to do it like this; https://gitlab.com/hmajid2301/dotfiles/-/blob/tmux-status-bar/nvim/lua/user/plugins/heirline.lua#L80-88
opts.disable_winbar_cb = function(args)
if not vim.api.nvim_buf_is_valid(args.buf) then return end
return status.condition.buffer_matches({
buftype = {"terminal", "prompt", "nofile", "help", "quickfix"},
filetype = {
"NvimTree", "neo%-tree", "dashboard", "Outline", "aerial"
}
}, args.buf)
end
And I'm still getting the same error
May I ask how you solved the issue?
I stopped using astronvim and moved to lazyvim. Which doesnt user either of these plugins. So didnt really solve it :sweat:
Hi :wave:,
I'm trying to setup my own nvim config. I used astronvim as the base config. I tried to add the persisted.nvim plugin. To help me manage my sessions, where the config looks something like this https://github.com/hmajid2301/dotfiles/blob/tmux-status/nvim/lua/user/plugins/user.lua#L53-L59:
However when ever I try to open nvim I know get this error:
It seems to be caused by https://github.com/hmajid2301/dotfiles/blob/main/nvim/lua/plugins/heirline.lua#L9-L12. When I comment this code out the error goes away.
Im very new to nvim and lua, so any help would be greatly appreciated.