summaryrefslogtreecommitdiff
path: root/pkgs/custom-neovim/config/lua/plugins/dropbar.lua
diff options
context:
space:
mode:
authortriethyl <triethylammonium@pm.me>2025-08-02 21:04:09 -0400
committertriethyl <triethylammonium@pm.me>2025-08-02 23:12:59 -0400
commitfb01120809379948eae622b6fa266b4cdb51c3a9 (patch)
tree29256ad70ee6504ce450a0e1cb8790063156192c /pkgs/custom-neovim/config/lua/plugins/dropbar.lua
parentb59291b870bc7f54bf4831496665c3202b7bc3cd (diff)
neovim: bunch of stuff
Diffstat (limited to 'pkgs/custom-neovim/config/lua/plugins/dropbar.lua')
-rw-r--r--pkgs/custom-neovim/config/lua/plugins/dropbar.lua44
1 files changed, 43 insertions, 1 deletions
diff --git a/pkgs/custom-neovim/config/lua/plugins/dropbar.lua b/pkgs/custom-neovim/config/lua/plugins/dropbar.lua
index 6d78b09..2d5fdaa 100644
--- a/pkgs/custom-neovim/config/lua/plugins/dropbar.lua
+++ b/pkgs/custom-neovim/config/lua/plugins/dropbar.lua
@@ -1 +1,43 @@
-require("dropbar").setup {}
+local dropbar = require('dropbar')
+local sources = require('dropbar.sources')
+local utils = require('dropbar.utils')
+
+Utils.link_highlight("DropBarFileName", "MiniFilesTitleFocused")
+
+local custom_path = {
+ get_symbols = function(buff, win, cursor)
+ local symbols = sources.path.get_symbols(buff, win, cursor)
+ symbols[#symbols].name_hl = 'DropBarFileName'
+ if vim.bo[buff].modified then
+ symbols[#symbols].name = symbols[#symbols].name .. ' [+]'
+ symbols[#symbols].name_hl = 'DropBarFileName'
+ symbols[#symbols].truncate = false
+ end
+ return symbols
+ end,
+}
+
+dropbar.setup({
+ bar = {
+ sources = function(buf, _)
+ if vim.bo[buf].ft == 'markdown' then
+ return {
+ custom_path,
+ sources.markdown,
+ }
+ end
+ if vim.bo[buf].buftype == 'terminal' then
+ return {
+ sources.terminal,
+ }
+ end
+ return {
+ custom_path,
+ utils.source.fallback {
+ sources.lsp,
+ sources.treesitter,
+ },
+ }
+ end,
+ },
+})