|
| 1 | +{ |
| 2 | + lib, |
| 3 | + helpers, |
| 4 | + config, |
| 5 | + pkgs, |
| 6 | + ... |
| 7 | +}: |
| 8 | +with lib; |
| 9 | +helpers.neovim-plugin.mkNeovimPlugin config { |
| 10 | + name = "codesnap"; |
| 11 | + originalName = "codesnap.nvim"; |
| 12 | + defaultPackage = pkgs.vimPlugins.codesnap-nvim; |
| 13 | + |
| 14 | + maintainers = [ maintainers.GaetanLepage ]; |
| 15 | + |
| 16 | + settingsOptions = { |
| 17 | + save_path = helpers.defaultNullOpts.mkStr null '' |
| 18 | + The save_path must be ends with `.png`, unless when you specified a directory path, CodeSnap |
| 19 | + will append an auto-generated filename to the specified directory path. |
| 20 | +
|
| 21 | + For example: |
| 22 | + - `save_path = "~/Pictures";` |
| 23 | + parsed: `"~/Pictures/CodeSnap_y-m-d_at_h:m:s.png"` |
| 24 | + - `save_path = "~/Pictures/foo.png";` |
| 25 | + parsed: `"~/Pictures/foo.png"` |
| 26 | + ''; |
| 27 | + |
| 28 | + mac_window_bar = helpers.defaultNullOpts.mkBool true '' |
| 29 | + Whether to display the MacOS style title bar. |
| 30 | + ''; |
| 31 | + |
| 32 | + title = helpers.defaultNullOpts.mkStr "CodeSnap.nvim" '' |
| 33 | + The editor title. |
| 34 | + ''; |
| 35 | + |
| 36 | + code_font_family = helpers.defaultNullOpts.mkStr "CaskaydiaCove Nerd Font" '' |
| 37 | + Which font to use for the code. |
| 38 | + ''; |
| 39 | + |
| 40 | + watermark_font_family = helpers.defaultNullOpts.mkStr "Pacifico" '' |
| 41 | + Which font to use for watermarks. |
| 42 | + ''; |
| 43 | + |
| 44 | + watermark = helpers.defaultNullOpts.mkStr "CodeSnap.nvim" '' |
| 45 | + Wartermark of the code snapshot. |
| 46 | + ''; |
| 47 | + |
| 48 | + bg_theme = helpers.defaultNullOpts.mkStr "default" '' |
| 49 | + Background theme name. |
| 50 | +
|
| 51 | + Check the [upstream README](https://github.com/mistricky/codesnap.nvim?tab=readme-ov-file#custom-background) |
| 52 | + for available options. |
| 53 | + ''; |
| 54 | + |
| 55 | + bg_color = helpers.defaultNullOpts.mkStr' { |
| 56 | + pluginDefault = null; |
| 57 | + example = "#535c68"; |
| 58 | + description = '' |
| 59 | + If you prefer solid color background, you can set bg_color to your preferred color. |
| 60 | + ''; |
| 61 | + }; |
| 62 | + |
| 63 | + breadcrumbs_separator = helpers.defaultNullOpts.mkStr "/" '' |
| 64 | + Separator for breadcrumbs. |
| 65 | + The CodeSnap.nvim uses `/` as the separator of the file path by default, of course, you can |
| 66 | + specify any symbol you prefer as the custom separator. |
| 67 | + ''; |
| 68 | + |
| 69 | + has_breadcrumbs = helpers.defaultNullOpts.mkBool false '' |
| 70 | + Whether to display the current snapshot file path. |
| 71 | + ''; |
| 72 | + |
| 73 | + has_line_number = helpers.defaultNullOpts.mkBool false '' |
| 74 | + Whether to display line numbers. |
| 75 | + ''; |
| 76 | + |
| 77 | + show_workspace = helpers.defaultNullOpts.mkBool false '' |
| 78 | + Breadcrumbs hide the workspace name by default, if you want to display workspace in |
| 79 | + breadcrumbs, you can just set this option to `true`. |
| 80 | + ''; |
| 81 | + |
| 82 | + min_width = helpers.defaultNullOpts.mkUnsignedInt 0 '' |
| 83 | + Minimum width for the snapshot. |
| 84 | + ''; |
| 85 | + }; |
| 86 | + |
| 87 | + settingsExample = { |
| 88 | + save_path = "~/Pictures/Screenshots/"; |
| 89 | + mac_window_bar = true; |
| 90 | + title = "CodeSnap.nvim"; |
| 91 | + watermark = ""; |
| 92 | + breadcrumbs_separator = "/"; |
| 93 | + has_breadcrumbs = true; |
| 94 | + has_line_number = false; |
| 95 | + }; |
| 96 | +} |
0 commit comments