mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +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";
|
description = "Lines to be ignored while comment/uncomment";
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
preHook = helpers.mkNullOrLuaFn "Lua function called before (un)comment.";
|
||||||
|
postHook = helpers.mkNullOrLuaFn "Lua function called after (un)comment.";
|
||||||
toggler = mkOption {
|
toggler = mkOption {
|
||||||
type = types.nullOr (types.submodule (_: {
|
type = types.nullOr (types.submodule (_: {
|
||||||
options = {
|
options = {
|
||||||
|
@ -94,6 +96,8 @@ in {
|
||||||
config = let
|
config = let
|
||||||
setupOptions = {
|
setupOptions = {
|
||||||
inherit (cfg) padding sticky ignore toggler opleader mappings;
|
inherit (cfg) padding sticky ignore toggler opleader mappings;
|
||||||
|
pre_hook = cfg.preHook;
|
||||||
|
post_hook = cfg.postHook;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
mkIf cfg.enable {
|
mkIf cfg.enable {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue