Replies: 1 comment
-
the closest i tried so far is this, but definitely not working lazy.nvim configreturn {
'nvim-lualine/lualine.nvim',
event = 'BufRead',
dependencies = { 'DaikyXendo/nvim-material-icon', 'nvim-neo-tree/neo-tree.nvim' },
opts = {
tabline = {
lualine_a = {
{
function()
-- return string.rep(' ', vim.api.nvim_win_get_width(require('nvim-tree.view').get_winnr()) - 1)
return string.rep(' ', vim.api.nvim_win_get_width(require('neo-tree.sources.common.preview').winid) - 1)
end,
-- cond = require('nvim-tree.view').is_visible,
conf = require('neo-tree.sources.common.preview').is_active(),
color = 'NvimTreeNormal',
},
},
lualine_b = { { 'buffers', mode = 2 } },
},
},
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
how can i replicate these two
nvim-tree
call inneo-tree
:vim.api.nvim_win_get_width(require('nvim-tree.view').get_winnr()) - 1
require('nvim-tree.view').is_visible
i trying to migrate my tabline from bufferline.nvim to lualine built-in
tabline
, I'm missing one feature that i very liked which is the sidebar offset feature.the offset feature is creating a space with the width size same as the neo-tree window if it shown, like the image below, the image is from the issue which i provide on next paragraph

i have tried to find solution on disccussions & issues page from both neo-tree and lualine repo, the closest answer i get to this problem is from ehlxr comment in the lualine discussion, it provide a configuration for lualine to create a space with the
nvim-tree
width and will shown together withnvim-tree
, the next item will be shifted to the right at just the same length asnvim-tree
window.lualine config
from the code it requested the width of
nvim-tree
usingvim.api.nvim_win_get_width(require('nvim-tree.view').get_winnr()) - 1
and the status if
nvim-tree
is showing withrequire('nvim-tree.view').is_visible
i hoped if can get the same those feature works with neo-tree i can get my lualine's tabline behave just like bufferline offset sidebar feature for
neo-tree
🎉.Beta Was this translation helpful? Give feedback.
All reactions