feat(nvim): add silicon plugin to create code screenshots

This commit is contained in:
Stefan Imhoff
2024-03-01 12:56:39 +01:00
parent f62e68d2f6
commit 0bd8041207
3 changed files with 36 additions and 0 deletions

View File

@@ -82,6 +82,7 @@
"nvim-lspconfig": { "branch": "master", "commit": "0ebcaedb2feb946e56658e0c9b6155fb6c8ad62b" }, "nvim-lspconfig": { "branch": "master", "commit": "0ebcaedb2feb946e56658e0c9b6155fb6c8ad62b" },
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
"nvim-silicon": { "branch": "main", "commit": "6637c3e366bcee54a322672ad57d4697cca9a920" },
"nvim-spectre": { "branch": "master", "commit": "3712ff0cdf4f9f877d9ca708d835a877d9a0abaf" }, "nvim-spectre": { "branch": "master", "commit": "3712ff0cdf4f9f877d9ca708d835a877d9a0abaf" },
"nvim-transparent": { "branch": "main", "commit": "fd35a46f4b7c1b244249266bdcb2da3814f01724" }, "nvim-transparent": { "branch": "main", "commit": "fd35a46f4b7c1b244249266bdcb2da3814f01724" },
"nvim-treesitter": { "branch": "master", "commit": "31d06480554789557d24f1c2b7eacf627e43510c" }, "nvim-treesitter": { "branch": "master", "commit": "31d06480554789557d24f1c2b7eacf627e43510c" },

View File

@@ -0,0 +1,33 @@
-- Create code images using the external silicon tool
-- https://github.com/michaelrommel/nvim-silicon
return {
"michaelrommel/nvim-silicon",
lazy = true,
cmd = "Silicon",
config = function()
require("silicon").setup({
font = "Fira Code=34;Noto Emoji=34",
theme = "Catppuccin-mocha",
background = "#68677b",
pad_horiz = 100,
pad_vert = 80,
no_round_corner = false,
no_window_controls = false,
no_line_number = false,
line_pad = 0,
tab_width = 2,
language = function()
return vim.bo.filetype
end,
shadow_blur_radius = 16,
shadow_offset_x = 8,
shadow_offset_y = 8,
shadow_color = "#100808",
gobble = true,
to_clipboard = true,
window_title = function()
return vim.fn.fnamemodify(vim.api.nvim_buf_get_name(vim.api.nvim_get_current_buf()), ":t")
end,
})
end,
}

View File

@@ -62,7 +62,9 @@ source ./golang.sh
# GitHub CLI Extensions # GitHub CLI Extensions
echo "Installing GitHub CLI Extensions" echo "Installing GitHub CLI Extensions"
source ./github.sh source ./github.sh
# Install Themes # Install Themes
cd ~/.dotfiles/bat cd ~/.dotfiles/bat
bat cache --build bat cache --build
silicon --build-cache
cd .. cd ..