From b8ba854b768a0cb3e7554ee99cbbdc58c19b82b6 Mon Sep 17 00:00:00 2001 From: Tom Sorabella Date: Wed, 13 Mar 2024 11:51:31 -0400 Subject: [PATCH] feat: add carbon --- init.lua | 3 +++ lua/custom/plugins/init.lua | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/init.lua b/init.lua index 5f11dc53..aa848abe 100644 --- a/init.lua +++ b/init.lua @@ -870,3 +870,6 @@ map({ 'n' }, 'wb', 'vs', { desc = 'New [W]orkspace [B]uffer' }) -- Resize buffer (width) -- map({ 'n' }, '', 'vertical res -5^M', { desc = 'Buffer - width' }) map({ 'n' }, '', 'vertical res +5^M', { desc = 'Buffer + width' }) + +--CarbonNow Screenshot +map({ 'v' }, 's', ':CarbonNow', { desc = '[S]creenshoot with carbon now' }) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 78d42288..98ab5a06 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -62,4 +62,31 @@ return { end, { desc = 'Open harpoon window' }) end, }, + { + 'ellisonleao/carbon-now.nvim', + lazy = true, + cmd = 'CarbonNow', + -- @param opts cn.ConfigSchema + opts = { + base_url = 'https://carbon.now.sh/', + open_cmd = 'xdg-open', + options = { + bg = 'gray', + drop_shadow_blur = '68px', + drop_shadow = false, + drop_shadow_offset_y = '20px', + font_family = 'JetBrains Mono', + font_size = '16px', + line_height = '124%', + line_numbers = true, + theme = 'verminal', + titlebar = 'Made with carbon-now.nvim', + watermark = false, + width = '680', + window_theme = 'sharp', + padding_horizontal = '0px', + padding_vertical = '0px', + }, + }, + }, }