flake/nixos/nvim/plugins/codesnap.nix

40 lines
904 B
Nix
Raw Permalink Normal View History

2025-02-06 23:23:02 -06:00
{
programs.nixvim = {
plugins = {
codesnap = {
enable = true;
settings = {
bg_theme = "grape";
breadcrumbs_separator = "/";
has_breadcrumbs = true;
show_workspace = true;
has_line_number = true;
mac_window_bar = false;
# https://github.com/mistricky/codesnap.nvim/issues/135
# code_font_family = "ComicCodeLigatures Nerd Font";
title = "Nixvim";
watermark = "";
# half of defaults (122, 82)
bg_x_padding = 61;
bg_y_padding = 41;
};
};
};
keymaps = [
{
mode = [
"v"
"x"
"s"
];
key = "<leader>s";
action = "<CMD>CodeSnap<CR>";
options = {
desc = "Copy Selection as CodeSnap Image";
silent = true;
};
}
];
};
}