mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 02:11:33 +00:00
Merge branch 'main' into main
This commit is contained in:
commit
a8291918a9
6 changed files with 155 additions and 152 deletions
|
@ -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";
|
||||
};
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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`";
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue