mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-09 12:06:11 +00:00
Generated using:
- `sd -F "inherit (lib.nvim.binds) mkMappingOption;" "inherit (config.vim.lib) mkMappingOption;" $(find . -type f)`
- `sd -F "{lib, ...}: let" "{config, lib, ...}: let" $(find . -type f)`
Tweaked manually (placement in inherit list, fixing todo-comments and toggleterm).
Ran `nix run nixpkgs#deadnix -- -e` to clean up.
Next commit includes unrelated dead code.
31 lines
972 B
Nix
31 lines
972 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.options) mkEnableOption;
|
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
|
inherit (config.vim.lib) mkMappingOption;
|
|
in {
|
|
options.vim.comments.comment-nvim = {
|
|
enable = mkEnableOption "smart and powerful comment plugin for neovim comment-nvim";
|
|
|
|
mappings = {
|
|
toggleCurrentLine = mkMappingOption "Toggle current line comment" "gcc";
|
|
toggleCurrentBlock = mkMappingOption "Toggle current block comment" "gbc";
|
|
|
|
toggleOpLeaderLine = mkMappingOption "Toggle line comment" "gc";
|
|
toggleOpLeaderBlock = mkMappingOption "Toggle block comment" "gb";
|
|
|
|
toggleSelectedLine = mkMappingOption "Toggle selected comment" "gc";
|
|
toggleSelectedBlock = mkMappingOption "Toggle selected block" "gb";
|
|
};
|
|
|
|
setupOpts = mkPluginSetupOption "Comment-nvim" {
|
|
mappings = {
|
|
basic = mkEnableOption "basic mappings";
|
|
extra = mkEnableOption "extra mappings";
|
|
};
|
|
};
|
|
};
|
|
}
|