1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 19:46:06 +01:00
nixvim/tests/test-sources/plugins/by-name/comment/default.nix
saygo-png 79d53a50e2 tests: use __empty and __raw
Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-11-05 21:26:13 +00:00

61 lines
1.3 KiB
Nix

{
empty = {
plugins.comment.enable = true;
};
defaults = {
plugins.comment = {
enable = true;
settings = {
padding = true;
sticky = true;
ignore.__raw = "nil";
toggler = {
line = "gcc";
block = "gbc";
};
opleader = {
line = "gc";
block = "gb";
};
extra = {
above = "gcO";
below = "gco";
eol = "gcA";
};
mappings = {
basic = true;
extra = true;
};
pre_hook.__raw = "nil";
post_hook.__raw = "nil";
};
};
};
example = {
plugins = {
treesitter.enable = true;
ts-context-commentstring.enable = true;
comment = {
enable = true;
settings = {
ignore = "^const(.*)=(%s?)%((.*)%)(%s?)=>";
pre_hook = "require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook()";
post_hook = ''
function(ctx)
if ctx.range.srow == ctx.range.erow then
-- do something with the current line
else
-- do something with lines range
end
end
'';
};
};
};
};
}