diff options
Diffstat (limited to 'pkgs/custom-neovim/config/lua/plugins')
4 files changed, 75 insertions, 5 deletions
diff --git a/pkgs/custom-neovim/config/lua/plugins/auto-session.lua b/pkgs/custom-neovim/config/lua/plugins/auto-session.lua new file mode 100644 index 0000000..99df59b --- /dev/null +++ b/pkgs/custom-neovim/config/lua/plugins/auto-session.lua @@ -0,0 +1 @@ +require("auto-session").setup() 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, + }, +}) diff --git a/pkgs/custom-neovim/config/lua/plugins/mini/statusline.lua b/pkgs/custom-neovim/config/lua/plugins/mini/statusline.lua index acb04be..e5931a2 100644 --- a/pkgs/custom-neovim/config/lua/plugins/mini/statusline.lua +++ b/pkgs/custom-neovim/config/lua/plugins/mini/statusline.lua @@ -1 +1,28 @@ -require("mini.statusline") {} +require("mini.statusline").setup() + +MiniStatusline.config = { + content = { + active = function() + local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 }) + local git = MiniStatusline.section_git({ trunc_width = 40 }) + local diff = MiniStatusline.section_diff({ trunc_width = 75 }) + local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75 }) + local lsp = MiniStatusline.section_lsp({ trunc_width = 75 }) + local filename = MiniStatusline.section_filename({ trunc_width = 140 }) + local fileinfo = MiniStatusline.section_fileinfo({ trunc_width = 120 }) + local location = MiniStatusline.section_location({ trunc_width = 75 }) + local search = MiniStatusline.section_searchcount({ trunc_width = 75 }) + + return MiniStatusline.combine_groups({ + { hl = mode_hl, strings = { mode } }, + { hl = 'MiniStatuslineDevinfo', strings = { git, diff, diagnostics, lsp } }, + '%<', -- Mark general truncate point + { hl = 'MiniStatuslineFilename', strings = { filename } }, + '%=', -- End left alignment + { hl = 'MiniStatuslineFileinfo', strings = { fileinfo } }, + { hl = mode_hl, strings = { search, location } }, + }) + end + }, + use_icons = true, +} diff --git a/pkgs/custom-neovim/config/lua/plugins/tabby.lua b/pkgs/custom-neovim/config/lua/plugins/tabby.lua index c4533c7..c00dad7 100644 --- a/pkgs/custom-neovim/config/lua/plugins/tabby.lua +++ b/pkgs/custom-neovim/config/lua/plugins/tabby.lua @@ -1,6 +1,6 @@ local general_theme = Utils.generate_theme_from_highlight_groups() local colors = { - current = { fg = general_theme.modes.insert, bg = general_theme.background, style = 'bold'}, + current = { fg = general_theme.modes.normal, bg = general_theme.background, style = 'bold'}, not_current = { fg = general_theme.text.light, bg = general_theme.background }; fill = { bg = general_theme.background }; }; @@ -24,7 +24,7 @@ require('tabby').setup({ return { line.sep('', hl, theme.fill), -- tab.is_current() and '' or '', - tab.number(), + -- tab.number(), tab.name(), line.sep('', hl, theme.fill), hl = hl, @@ -44,7 +44,7 @@ require('tabby').setup({ end), { line.sep('', theme.tail, theme.fill), - { ' ', hl = theme.tail }, + -- { ' ', hl = theme.tail }, }, hl = theme.fill, } |
