Fix: alpha window closing. Patches to open files with telescope and neotree on the same window as alpha. Autocmds to load global and local settigs to every window after opening from telescope/neovim from alpha window.

This commit is contained in:
psychhim
2025-10-15 02:10:11 +05:30
parent 036a8d766c
commit a6a8f01ebf
5 changed files with 111 additions and 7 deletions

View File

@@ -93,11 +93,16 @@ return {
local name = vim.api.nvim_buf_get_name(buf)
local buftype = vim.api.nvim_buf_get_option(buf, 'buftype')
local modified = vim.api.nvim_buf_get_option(buf, 'modified')
-- PATCH: also treat Alpha dashboard buffer as empty
if (name == '' and buftype == '' and not modified) or is_alpha_buffer(buf) then
vim.api.nvim_set_current_win(win)
-- DELETE Alpha buffer if it's in this window
if is_alpha_buffer(buf) then
vim.api.nvim_buf_delete(buf, { force = true })
end
-- Now open the file in this window
vim.cmd('edit ' .. vim.fn.fnameescape(path))
-- Stop further processing
return
end
end