akinsho / akinsho/bufferline.nvim
[Bug]: offset not working for NvimTree
- 主要言語
- Lua
- スター
- 4.4k
- フォーク
- 240
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
### Is there an existing issue for this?
- [x] I have searched the existing issues
### What happened?
The issue is that when the NvimTree is opened, it not create an offset for the file explorer.
### What did you expect to happen?
Expected behaviour is the NvimTree is separated with other tabs in bufferline.
### Config
`lua/configs/bufferline.lua`:
```lua
llocal bufferline_ok, bufferline = pcall(require, "bufferline")
if not bufferline_ok then
return
end
bufferline.setup({
options = {
numbers = "none",
close_command = "Bdelete! %d",
right_mouse_command = "Bdelete! %d",
left_mouse_command = "buffer %d",
middle_mouse_command = nil,
indicator_icon = "▎",
buffer_close_icon = "",
modified_icon = "●",
close_icon = "",
left_trunc_marker = "",
right_trunc_marker = "",
max_name_length = 30,
max_prefix_length = 30,
tab_size = 21,
diagnostics = "nvim_lsp",
diagnostics_indicator = function(count, level, diagnostics_dict, context)
local icon = level:match("error") and " " or " "
return " " .. icon .. count
end,
update_in_insert = true,
offsets = {
{
filetype = "NvimTree",
text = "File Explorer",
text_align = "left",
separator = true,
},
},
show_buffer_icons = true,
show_buffer_close_icons = true,
show_close_icon = true,
show_tab_indicators = true,
persist_buffer_sort = true,
separator_style = "thin",
enforce_regular_tabs = true,
always_show_bufferline = true,
},
highlights = require("catppuccin.special.bufferline").get_theme(),
})
```
`lua/configs/nvim_tree.lua`:
```lua
-- following options are the default
-- each of these are documented in `:help nvim-tree.OPTION_NAME`
local nvim_tree_ok, nvim_tree = pcall(require, "nvim-tree")
if not nvim_tree_ok then
return
end
nvim_tree.setup({
disable_netrw = true,
hijack_netrw = true,
open_on_tab = false,
hijack_cursor = true,
update_cwd = true,
hijack_directories = {
enable = true,
auto_open = true,
},
filters = {
dotfiles = false,
},
diagnostics = {
enable = true,
icons = {
hint = "",
info = "",
warning = "",
error = "",
},
},
update_focused_file = {
enable = true,
update_cwd = true,
ignore_list = {},
},
git = {
enable = true,
ignore = false,
timeout = 500,
},
view = {
width = 30,
side = "left",
number = false,
relativenumber = false,
preserve_window_proportions = true,
},
renderer = {
highlight_git = true,
root_folder_modifier = ":t",
indent_markers = { enable = true },
icons = {
show = {
file = true,
folder = true,
folder_arrow = true,
git = true,
},
glyphs = {
default = "",
symlink = "",
git = {
unstaged = "",
staged = "S",
unmerged = "",
renamed = "➜",
deleted = "",
untracked = "U",
ignored = "◌",
},
folder = {
default = "",
open = "",
empty = "",
empty_open = "",
symlink = "",
},
},
},
},
})
```
Full configurations: https://github.com/fzl-22/zielisme.nvim
### Additional Information
When running `:echo &filetype`, the output is `NvimTree` which is the exact string of the filetype value:
### commit
_No response_
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。