From 58bf7b91076cf41088199a7ebd2843b074737383 Mon Sep 17 00:00:00 2001 From: Mist Date: Sun, 17 Mar 2024 20:22:09 +0800 Subject: [PATCH] [Update] add example of background --- README.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 66 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d0dd586..f96af53 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ Of course, you can use `CodeSnapSave` command to save the snapshot to path where ```lua require("codesnap").setup({ -- ... - save_path: ... + save_path = ... }) ``` @@ -81,14 +81,75 @@ require("codesnap").setup({ https://github.com/mistricky/codesnap.nvim/assets/22574136/69b27e77-3dce-4bc3-8516-89ce636fe02d +## Custom background +The `CodeSnap.nvim` comes with many beautify backgrounds preset, you can set any background you like by setting `bg_theme` to its name, just like: +```lua +require("codesnap").setup({ + -- The "default" background is one you see at the beginning of the README + bg_theme = "default" +}) +``` + + + + + + + + + + + + + + + + + + -## Watermark -Watermark is something that makes screenshots more personalized, but if you don't like watermark just set it as empty string to hide it. + + + + + + + + +
bamboosea
+ + + +
peachgrape
+ + + +
dusksummer
+ + + +
+ +### Solid color background +If you prefer solid color background, you can set `bg_color` to your preferred color. For example: ```lua require("codesnap").setup({ -- ... - watermark: "" + bg_color = "#535c68" +}) +``` + +![CodeSnap](https://github.com/mistricky/codesnap.nvim/assets/22574136/a600c2e4-4c60-4ec0-b2fc-3b41481048dc) + + + +## Watermark +Watermark is something that makes screenshots more personalized, but if you don't like watermark just set it as an empty string to hide it. +```lua +require("codesnap").setup({ + -- ... + watermark = "" }) ``` @@ -113,6 +174,7 @@ There is a default config: code_font_family = "CaskaydiaCove Nerd Font", watermark_font_family = "Pacifico", watermark = "CodeSnap.nvim", + bg_theme = "default" } ```