mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
plugins/comment-nvim: add {pre,post}Hook options
This commit is contained in:
parent
856b88d1e3
commit
1f1065df1e
1 changed files with 4 additions and 0 deletions
|
@ -29,6 +29,8 @@ in {
|
|||
description = "Lines to be ignored while comment/uncomment";
|
||||
default = null;
|
||||
};
|
||||
preHook = helpers.mkNullOrLuaFn "Lua function called before (un)comment.";
|
||||
postHook = helpers.mkNullOrLuaFn "Lua function called after (un)comment.";
|
||||
toggler = mkOption {
|
||||
type = types.nullOr (types.submodule (_: {
|
||||
options = {
|
||||
|
@ -94,6 +96,8 @@ in {
|
|||
config = let
|
||||
setupOptions = {
|
||||
inherit (cfg) padding sticky ignore toggler opleader mappings;
|
||||
pre_hook = cfg.preHook;
|
||||
post_hook = cfg.postHook;
|
||||
};
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue