nix-community.nixvim/plugins/by-name/cursorline/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.5 KiB
Nix
Raw Permalink Normal View History

2023-06-13 09:39:54 +02:00
{
lib,
...
}:
let
inherit (lib.nixvim) defaultNullOpts;
inherit (lib) types;
2023-06-13 09:39:54 +02:00
in
lib.nixvim.plugins.mkNeovimPlugin {
name = "cursorline";
moduleName = "nvim-cursorline";
packPathName = "nvim-cursorline";
package = "nvim-cursorline";
2023-06-13 09:39:54 +02:00
maintainers = [ lib.maintainers.khaneliman ];
2023-06-13 09:39:54 +02:00
description = ''
A Neovim plugin to highlight the cursor line and word under the cursor.
'';
2023-06-13 09:39:54 +02:00
settingsOptions = {
cursorline = {
enable = defaultNullOpts.mkBool true "Show / hide cursorline in connection with cursor moving.";
timeout = defaultNullOpts.mkInt 1000 "Time (in ms) after which the cursorline appears.";
number = defaultNullOpts.mkBool false "Whether to also highlight the line number.";
2023-06-13 09:39:54 +02:00
};
cursorword = {
enable = defaultNullOpts.mkBool true "Underlines the word under the cursor.";
min_length = defaultNullOpts.mkInt 3 "Minimum length for underlined words.";
hl = defaultNullOpts.mkAttrsOf types.anything {
underline = true;
} "Highlight definition map for cursorword highlighting.";
2023-06-13 09:39:54 +02:00
};
2024-05-05 19:39:35 +02:00
};
2023-06-13 09:39:54 +02:00
settingsExample = {
settings = {
cursorline = {
enable = true;
timeout = 1000;
number = false;
};
cursorword = {
enable = true;
min_length = 3;
hl = {
underline = true;
2023-06-13 09:39:54 +02:00
};
};
2023-06-13 09:39:54 +02:00
};
};
# TODO: Deprecated in 2025-02-01
inherit (import ./deprecations.nix) deprecateExtraOptions optionsRenamedToSettings;
2023-06-13 09:39:54 +02:00
}