mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-25 11:45:27 +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,45 +5,37 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.plugins.cursorline;
|
||||
in {
|
||||
options.plugins.cursorline =
|
||||
helpers.neovim-plugin.extraOptionsOptions
|
||||
// {
|
||||
enable = mkEnableOption "nvim-cursorline";
|
||||
in
|
||||
{
|
||||
options.plugins.cursorline = helpers.neovim-plugin.extraOptionsOptions // {
|
||||
enable = mkEnableOption "nvim-cursorline";
|
||||
|
||||
package = helpers.mkPackageOption "nvim-cursorline" pkgs.vimPlugins.nvim-cursorline;
|
||||
package = helpers.mkPackageOption "nvim-cursorline" pkgs.vimPlugins.nvim-cursorline;
|
||||
|
||||
cursorline = {
|
||||
enable =
|
||||
helpers.defaultNullOpts.mkBool true
|
||||
"Show / hide cursorline in connection with cursor moving.";
|
||||
cursorline = {
|
||||
enable = helpers.defaultNullOpts.mkBool true "Show / hide cursorline in connection with cursor moving.";
|
||||
|
||||
timeout =
|
||||
helpers.defaultNullOpts.mkInt 1000
|
||||
"Time (in ms) after which the cursorline appears.";
|
||||
timeout = helpers.defaultNullOpts.mkInt 1000 "Time (in ms) after which the cursorline appears.";
|
||||
|
||||
number =
|
||||
helpers.defaultNullOpts.mkBool false
|
||||
"Whether to also highlight the line number.";
|
||||
};
|
||||
cursorword = {
|
||||
enable = helpers.defaultNullOpts.mkBool true "Underlines the word under the cursor.";
|
||||
|
||||
minLength = helpers.defaultNullOpts.mkInt 3 "Minimum length for underlined words.";
|
||||
|
||||
hl =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
types.attrs
|
||||
"{underline = true;}"
|
||||
"Highliht definition map for cursorword highlighting.";
|
||||
};
|
||||
number = helpers.defaultNullOpts.mkBool false "Whether to also highlight the line number.";
|
||||
};
|
||||
cursorword = {
|
||||
enable = helpers.defaultNullOpts.mkBool true "Underlines the word under the cursor.";
|
||||
|
||||
config = let
|
||||
options =
|
||||
{
|
||||
minLength = helpers.defaultNullOpts.mkInt 3 "Minimum length for underlined words.";
|
||||
|
||||
hl =
|
||||
helpers.defaultNullOpts.mkNullable types.attrs "{underline = true;}"
|
||||
"Highliht definition map for cursorword highlighting.";
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
options = {
|
||||
cursorline = with cfg.cursorline; {
|
||||
inherit enable timeout number;
|
||||
};
|
||||
|
@ -52,11 +44,10 @@ in {
|
|||
min_length = minLength;
|
||||
inherit hl;
|
||||
};
|
||||
}
|
||||
// cfg.extraOptions;
|
||||
in
|
||||
} // cfg.extraOptions;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
extraPlugins = [cfg.package];
|
||||
extraPlugins = [ cfg.package ];
|
||||
|
||||
extraConfigLua = ''
|
||||
require('nvim-cursorline').setup(${helpers.toLuaObject options})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue