exclude no name and qf buffers from bufferline nvim
This commit is contained in:
parent
125503a2c0
commit
55267ca797
2 changed files with 13 additions and 3 deletions
|
|
@ -108,7 +108,7 @@ window:
|
||||||
# Font configuration
|
# Font configuration
|
||||||
font:
|
font:
|
||||||
normal:
|
normal:
|
||||||
family: JetBrainsMono Nerd Font Mono
|
family: JetBrainsMono NF
|
||||||
style: Regular
|
style: Regular
|
||||||
bold:
|
bold:
|
||||||
# family: JetBrainsMono NF
|
# family: JetBrainsMono NF
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ return {
|
||||||
local opts = {
|
local opts = {
|
||||||
highlights = { separator = { bg = "NONE" } },
|
highlights = { separator = { bg = "NONE" } },
|
||||||
options = {
|
options = {
|
||||||
-- FIXME: Doesn't work with onedark pro colorscheme
|
|
||||||
-- separator_style = "padded_slant",
|
-- separator_style = "padded_slant",
|
||||||
-- themable = true,
|
-- themable = true,
|
||||||
close_command = function(n)
|
close_command = function(n)
|
||||||
|
|
@ -39,10 +38,21 @@ return {
|
||||||
.. (diag.warning and icons.Warn .. diag.warning or "")
|
.. (diag.warning and icons.Warn .. diag.warning or "")
|
||||||
return vim.trim(ret)
|
return vim.trim(ret)
|
||||||
end,
|
end,
|
||||||
|
-- return false to exluce buffers
|
||||||
|
custom_filter = function(buf_number)
|
||||||
|
if vim.bo[buf_number].filetype == "qf" then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if vim.fn.bufname(buf_number) == "" then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end,
|
||||||
offsets = {
|
offsets = {
|
||||||
{
|
{
|
||||||
filetype = "NvimTree",
|
filetype = "NvimTree",
|
||||||
-- text = "nvim-tree",
|
text = "nvim-tree",
|
||||||
highlight = "Directory",
|
highlight = "Directory",
|
||||||
text_align = "left",
|
text_align = "left",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue