mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
feat(picker.buffer): add filetype to bufname for buffers without name
This commit is contained in:
parent
da5556aa6b
commit
83baea06d6
1 changed files with 3 additions and 1 deletions
|
@ -23,7 +23,9 @@ function M.buffers(opts, filter)
|
|||
and (opts.nofile or vim.bo[buf].buftype ~= "nofile")
|
||||
if keep then
|
||||
local name = vim.api.nvim_buf_get_name(buf)
|
||||
name = name == "" and "[No Name]" or name
|
||||
if name == "" then
|
||||
name = "[No Name]" .. (vim.bo[buf].filetype ~= "" and " " .. vim.bo[buf].filetype or "")
|
||||
end
|
||||
local info = vim.fn.getbufinfo(buf)[1]
|
||||
local flags = {
|
||||
buf == current_buf and "%" or (buf == alternate_buf and "#" or ""),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue