Merge branch 'main' into main

This commit is contained in:
raf 2025-04-27 19:59:04 +00:00 committed by GitHub
commit a8291918a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 155 additions and 152 deletions

View file

@ -1,6 +1,6 @@
{lib, ...}: let
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) attrsOf str int nullOr;
inherit (lib.types) listOf str int nullOr;
inherit (lib.generators) mkLuaInline;
inherit (lib.nvim.types) luaInline mkPluginSetupOption;
inherit (lib.nvim.config) batchRenameOptions;
@ -70,7 +70,7 @@ in {
};
sources = mkOption {
type = nullOr (attrsOf luaInline);
type = nullOr (listOf luaInline);
default = null;
description = "Sources for null-ls to register";
};

View file

@ -14,17 +14,28 @@
bCfg = config.vim.ui.breadcrumbs;
in {
config = mkMerge [
(mkIf config.vim.filetree.nvimTree.enable {
vim.statusline.lualine.setupOpts = {
extensions = ["nvim-tree"];
};
})
(mkIf config.vim.filetree.neo-tree.enable {
vim.statusline.lualine.setupOpts = {
extensions = ["neo-tree"];
};
})
{
vim.statusline.lualine.setupOpts.extensions =
(lib.optionals config.vim.filetree.nvimTree.enable ["nvim-tree"])
++ (lib.optionals config.vim.filetree.neo-tree.enable ["neo-tree"])
++ (lib.optionals config.vim.utility.snacks-nvim.enable [
{
# same extensions as nerdtree / neo-tree
# https://github.com/nvim-lualine/lualine.nvim/blob/master/lua/lualine/extensions/nerdtree.lua
# https://github.com/nvim-lualine/lualine.nvim/blob/master/lua/lualine/extensions/neo-tree.lua
sections = {
lualine_a = mkLuaInline ''
{
function()
return vim.fn.fnamemodify(vim.fn.getcwd(), ":~")
end,
}
'';
};
filetypes = ["snacks_picker_list" "snacks_picker_input"];
}
]);
}
(mkIf (bCfg.enable && bCfg.lualine.winbar.enable && bCfg.source == "nvim-navic") {
vim.statusline.lualine.setupOpts = {

View file

@ -272,20 +272,12 @@ in {
offsets = mkOption {
type = listOf attrs;
default = [
{
filetype = "NvimTree";
text = "File Explorer";
highlight = "Directory";
separator = true;
}
{
filetype = "neo-tree";
text = "File Explorer";
highlight = "Directory";
separator = true;
}
];
default = map (filetype: {
inherit filetype;
text = "File Explorer";
highlight = "Directory";
separator = true;
}) ["NvimTree" "neo-tree" "snacks_layout_box"];
description = "The windows to offset bufferline above, see `:help bufferline-offset`";
};