mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-16 04:04:34 +02:00
treewide: Reformat with nixfmt
This commit is contained in:
parent
c6281260dc
commit
62f32bfc71
459 changed files with 28139 additions and 26377 deletions
|
@ -5,61 +5,61 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.plugins.barbecue;
|
||||
mkListStr = helpers.defaultNullOpts.mkNullable (types.listOf types.str);
|
||||
in {
|
||||
options.plugins.barbecue =
|
||||
helpers.neovim-plugin.extraOptionsOptions
|
||||
// {
|
||||
enable = mkEnableOption "barbecue-nvim";
|
||||
in
|
||||
{
|
||||
options.plugins.barbecue = helpers.neovim-plugin.extraOptionsOptions // {
|
||||
enable = mkEnableOption "barbecue-nvim";
|
||||
|
||||
package = helpers.mkPackageOption "barbecue-nvim" pkgs.vimPlugins.barbecue-nvim;
|
||||
package = helpers.mkPackageOption "barbecue-nvim" pkgs.vimPlugins.barbecue-nvim;
|
||||
|
||||
attachNavic = helpers.defaultNullOpts.mkBool true ''
|
||||
Whether to attach navic to language servers automatically.
|
||||
attachNavic = helpers.defaultNullOpts.mkBool true ''
|
||||
Whether to attach navic to language servers automatically.
|
||||
'';
|
||||
|
||||
createAutocmd = helpers.defaultNullOpts.mkBool true ''
|
||||
Whether to create winbar updater autocmd.
|
||||
'';
|
||||
|
||||
includeBuftypes = mkListStr ''[""]'' ''
|
||||
Buftypes to enable winbar in.
|
||||
'';
|
||||
|
||||
excludeFiletypes = mkListStr ''["netrw" "toggleterm"]'' ''
|
||||
Filetypes not to enable winbar in.
|
||||
'';
|
||||
|
||||
modifiers = {
|
||||
dirname = helpers.defaultNullOpts.mkStr ":~:." ''
|
||||
Filename modifiers applied to dirname.
|
||||
|
||||
See: `:help filename-modifiers`
|
||||
'';
|
||||
|
||||
createAutocmd = helpers.defaultNullOpts.mkBool true ''
|
||||
Whether to create winbar updater autocmd.
|
||||
basename = helpers.defaultNullOpts.mkStr "" ''
|
||||
Filename modifiers applied to basename.
|
||||
|
||||
See: `:help filename-modifiers`
|
||||
'';
|
||||
};
|
||||
|
||||
includeBuftypes = mkListStr ''[""]'' ''
|
||||
Buftypes to enable winbar in.
|
||||
'';
|
||||
showDirname = helpers.defaultNullOpts.mkBool true ''
|
||||
Whether to display path to file.
|
||||
'';
|
||||
|
||||
excludeFiletypes = mkListStr ''["netrw" "toggleterm"]'' ''
|
||||
Filetypes not to enable winbar in.
|
||||
'';
|
||||
showBasename = helpers.defaultNullOpts.mkBool true ''
|
||||
Whether to display file name.
|
||||
'';
|
||||
|
||||
modifiers = {
|
||||
dirname = helpers.defaultNullOpts.mkStr ":~:." ''
|
||||
Filename modifiers applied to dirname.
|
||||
showModified = helpers.defaultNullOpts.mkBool false ''
|
||||
Whether to replace file icon with the modified symbol when buffer is modified.
|
||||
'';
|
||||
|
||||
See: `:help filename-modifiers`
|
||||
'';
|
||||
|
||||
basename = helpers.defaultNullOpts.mkStr "" ''
|
||||
Filename modifiers applied to basename.
|
||||
|
||||
See: `:help filename-modifiers`
|
||||
'';
|
||||
};
|
||||
|
||||
showDirname = helpers.defaultNullOpts.mkBool true ''
|
||||
Whether to display path to file.
|
||||
'';
|
||||
|
||||
showBasename = helpers.defaultNullOpts.mkBool true ''
|
||||
Whether to display file name.
|
||||
'';
|
||||
|
||||
showModified = helpers.defaultNullOpts.mkBool false ''
|
||||
Whether to replace file icon with the modified symbol when buffer is modified.
|
||||
'';
|
||||
|
||||
modified =
|
||||
helpers.defaultNullOpts.mkLuaFn
|
||||
modified =
|
||||
helpers.defaultNullOpts.mkLuaFn
|
||||
''
|
||||
function(bufnr)
|
||||
return vim.bo[bufnr].modified
|
||||
|
@ -70,12 +70,12 @@ in {
|
|||
NOTE: This can be used to get file modified status from SCM (e.g. git)
|
||||
'';
|
||||
|
||||
showNavic = helpers.defaultNullOpts.mkBool true ''
|
||||
Whether to show/use navic in the winbar.
|
||||
'';
|
||||
showNavic = helpers.defaultNullOpts.mkBool true ''
|
||||
Whether to show/use navic in the winbar.
|
||||
'';
|
||||
|
||||
leadCustomSection =
|
||||
helpers.defaultNullOpts.mkLuaFn
|
||||
leadCustomSection =
|
||||
helpers.defaultNullOpts.mkLuaFn
|
||||
''
|
||||
function()
|
||||
return " "
|
||||
|
@ -86,8 +86,8 @@ in {
|
|||
NOTE: This function shouldn't do any expensive actions as it is run on each render.
|
||||
'';
|
||||
|
||||
customSection =
|
||||
helpers.defaultNullOpts.mkLuaFn
|
||||
customSection =
|
||||
helpers.defaultNullOpts.mkLuaFn
|
||||
''
|
||||
function()
|
||||
return " "
|
||||
|
@ -98,101 +98,88 @@ in {
|
|||
NOTE: This function shouldn't do any expensive actions as it is run on each render.
|
||||
'';
|
||||
|
||||
theme = helpers.defaultNullOpts.mkStr "auto" ''
|
||||
Theme to be used for generating highlight groups dynamically.
|
||||
theme = helpers.defaultNullOpts.mkStr "auto" ''
|
||||
Theme to be used for generating highlight groups dynamically.
|
||||
'';
|
||||
|
||||
contextFollowIconColor = helpers.defaultNullOpts.mkBool false ''
|
||||
Whether context text should follow its icon's color.
|
||||
'';
|
||||
|
||||
symbols = {
|
||||
modified = helpers.defaultNullOpts.mkStr "●" ''
|
||||
Modification indicator.
|
||||
'';
|
||||
|
||||
contextFollowIconColor = helpers.defaultNullOpts.mkBool false ''
|
||||
Whether context text should follow its icon's color.
|
||||
ellipsis = helpers.defaultNullOpts.mkStr "…" ''
|
||||
Truncation indicator.
|
||||
'';
|
||||
|
||||
symbols = {
|
||||
modified = helpers.defaultNullOpts.mkStr "●" ''
|
||||
Modification indicator.
|
||||
'';
|
||||
|
||||
ellipsis = helpers.defaultNullOpts.mkStr "…" ''
|
||||
Truncation indicator.
|
||||
'';
|
||||
|
||||
separator = helpers.defaultNullOpts.mkStr "" ''
|
||||
Entry separator.
|
||||
'';
|
||||
};
|
||||
|
||||
kinds =
|
||||
mapAttrs
|
||||
(
|
||||
name: default:
|
||||
helpers.defaultNullOpts.mkStr default "icon for ${name}."
|
||||
)
|
||||
{
|
||||
File = "";
|
||||
Module = "";
|
||||
Namespace = "";
|
||||
Package = "";
|
||||
Class = "";
|
||||
Method = "";
|
||||
Property = "";
|
||||
Field = "";
|
||||
Constructor = "";
|
||||
Enum = "";
|
||||
Interface = "";
|
||||
Function = "";
|
||||
Variable = "";
|
||||
Constant = "";
|
||||
String = "";
|
||||
Number = "";
|
||||
Boolean = "";
|
||||
Array = "";
|
||||
Object = "";
|
||||
Key = "";
|
||||
Null = "";
|
||||
EnumMember = "";
|
||||
Struct = "";
|
||||
Event = "";
|
||||
Operator = "";
|
||||
TypeParameter = "";
|
||||
};
|
||||
separator = helpers.defaultNullOpts.mkStr "" ''
|
||||
Entry separator.
|
||||
'';
|
||||
};
|
||||
|
||||
config = let
|
||||
setupOptions = with cfg;
|
||||
{
|
||||
attach_navic = attachNavic;
|
||||
create_autocmd = createAutocmd;
|
||||
include_buftypes = includeBuftypes;
|
||||
exclude_filetypes = excludeFiletypes;
|
||||
modifiers = {
|
||||
inherit
|
||||
(modifiers)
|
||||
dirname
|
||||
basename
|
||||
;
|
||||
};
|
||||
show_dirname = showDirname;
|
||||
show_basename = showBasename;
|
||||
show_modified = showModified;
|
||||
inherit modified;
|
||||
show_navic = showNavic;
|
||||
lead_custom_section = leadCustomSection;
|
||||
custom_section = customSection;
|
||||
inherit theme;
|
||||
context_follow_icon_color = contextFollowIconColor;
|
||||
symbols = {
|
||||
inherit
|
||||
(symbols)
|
||||
modified
|
||||
ellipsis
|
||||
separator
|
||||
;
|
||||
};
|
||||
inherit kinds;
|
||||
}
|
||||
// cfg.extraOptions;
|
||||
in
|
||||
kinds = mapAttrs (name: default: helpers.defaultNullOpts.mkStr default "icon for ${name}.") {
|
||||
File = "";
|
||||
Module = "";
|
||||
Namespace = "";
|
||||
Package = "";
|
||||
Class = "";
|
||||
Method = "";
|
||||
Property = "";
|
||||
Field = "";
|
||||
Constructor = "";
|
||||
Enum = "";
|
||||
Interface = "";
|
||||
Function = "";
|
||||
Variable = "";
|
||||
Constant = "";
|
||||
String = "";
|
||||
Number = "";
|
||||
Boolean = "";
|
||||
Array = "";
|
||||
Object = "";
|
||||
Key = "";
|
||||
Null = "";
|
||||
EnumMember = "";
|
||||
Struct = "";
|
||||
Event = "";
|
||||
Operator = "";
|
||||
TypeParameter = "";
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
setupOptions =
|
||||
with cfg;
|
||||
{
|
||||
attach_navic = attachNavic;
|
||||
create_autocmd = createAutocmd;
|
||||
include_buftypes = includeBuftypes;
|
||||
exclude_filetypes = excludeFiletypes;
|
||||
modifiers = {
|
||||
inherit (modifiers) dirname basename;
|
||||
};
|
||||
show_dirname = showDirname;
|
||||
show_basename = showBasename;
|
||||
show_modified = showModified;
|
||||
inherit modified;
|
||||
show_navic = showNavic;
|
||||
lead_custom_section = leadCustomSection;
|
||||
custom_section = customSection;
|
||||
inherit theme;
|
||||
context_follow_icon_color = contextFollowIconColor;
|
||||
symbols = {
|
||||
inherit (symbols) modified ellipsis separator;
|
||||
};
|
||||
inherit kinds;
|
||||
}
|
||||
// cfg.extraOptions;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
extraPlugins = [cfg.package];
|
||||
extraPlugins = [ cfg.package ];
|
||||
|
||||
extraConfigLua = ''
|
||||
require('barbecue').setup(${helpers.toLuaObject setupOptions})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue