Bekaboo / dropbar.nvim

IDE-like breadcrumbs, out of the box
GNU General Public License v3.0
1.05k stars 24 forks source link

[feature] add ability to disable file path display #197

Closed melsiir closed 1 day ago

melsiir commented 1 day ago

Problem

dropbar is very good and fast compared to barbecue but the the problem is that the winbar become too messy when in small screen even the transcating wont help Screenshot_٢٠٢٤١١١٥-١٢١٤٠٨_Termux

i hope to see winbar have the options to transcating the left side always instead of trying to fit the all the components into the screen which effect the readabilty of the winbar i tried to mess reletive to disable the plugin from showing the file path but no luck in barbecue there are this simple option to do the job show_dirname = false i think this option should be added to dropbar.nvim

Expected behavior

hide file path completely to fit in small screen

RenGeng commented 1 day ago

There's a config here https://github.com/Bekaboo/dropbar.nvim/discussions/132

Bekaboo commented 1 day ago

You can disable the path source by

require("dropbar").setup({
    bar = {
        sources = function(buf, _)
            local sources = require("dropbar.sources")
            local utils = require("dropbar.utils")
            if vim.bo[buf].ft == "markdown" then
                return { sources.markdown }
            end
            if vim.bo[buf].buftype == "terminal" then
                return { sources.terminal }
            end
            return { utils.source.fallback({ sources.lsp, sources.treesitter }) }
        end,
    },
})

See https://github.com/Bekaboo/dropbar.nvim#bar