alpha-nvim
alpha-nvim copied to clipboard
When nvimTree opens the file, alpha is not closed
When I opened the file via nvimTree, alpha was not closed
~~Same here, but only for a certain filetypes. This happens when opening lua
files but golang
files do replace alpha.~~
Happens for me too but I'm guessing this is a nvim-tree issue. Happens only if not in a git init
ed folder
this doesn't happen for me but i suspect maybe it's because i have
https://github.com/goolord/nvim/blob/main/lua/plugins/nvim-tree.lua#L46
update_focused_file = { enable = true },
anyway, this is either an issue with nvimTree or with your specific configuration, i've done about all i can on alpha's side to integrate it with other plugins ¯\_(ツ)_/¯
it's already
vim.opt_local.bufhidden = 'wipe'
vim.opt_local.buflisted = false
vim.opt_local.buftype = 'nofile'
same happening for me too, any fix? tho it only happens when i open file from NvimTree, telescope works fine edit i just copied @goolord 's NvimTree config and now it works fine
yeah so from what i gather the window picker for nvim-tree ignores buftype = nofile
buffers, which will keep the alpha buffer open in a split, unless update_focused_file is set for some reason.
i can think of some workarounds for this but they're not really very pretty..
I have a fairly basic nvim-tree config and I don't have this issue.
use {
'kyazdani42/nvim-tree.lua',
requires = 'kyazdani42/nvim-web-devicons',
ft = 'alpha',
config = function()
local tree_cb = require('nvim-tree.config').nvim_tree_callback
require('nvim-tree').setup {
disable_netrw = true,
ignore_buffer_on_setup = true,
open_on_setup = true,
view = {
mappings = {
custom_only = true,
list = {
{ key = '<cr>', cb = tree_cb('edit') },
{ key = '<C-v>', cb = tree_cb('vsplit') },
{ key = '<C-x>', cb = tree_cb('split') },
{ key = 'h', cb = tree_cb('toggle_dotfiles') },
{ key = 'i', cb = tree_cb('toggle_git_ignored') },
{ key = 'R', cb = tree_cb('refresh') },
{ key = 'a', cb = tree_cb('create') },
{ key = 'd', cb = tree_cb('trash') },
{ key = 'q', cb = tree_cb('close') },
{ key = 'r', cb = tree_cb('rename') },
{ key = 's', cb = tree_cb('system_open') },
{ key = 'x', cb = tree_cb('cut') },
{ key = 'c', cb = tree_cb('copy') },
{ key = 'p', cb = tree_cb('paste') },
{ key = 'y', cb = tree_cb('copy_path') },
{ key = 'Y', cb = tree_cb('copy_absolute_path') },
{ key = 'K', cb = tree_cb('toggle_help') },
},
},
},
}
end,
}
I use ft=alpha
to launch nvim-tree at startup after alpha.
Also experiencing this. Any ideas?