33
lua/taken/plugins/nvim-silicon.lua
Normal file
33
lua/taken/plugins/nvim-silicon.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
return {
|
||||
"michaelrommel/nvim-silicon",
|
||||
lazy = true,
|
||||
cmd = "Silicon",
|
||||
keys = {
|
||||
{
|
||||
"<leader>sc",
|
||||
"<cmd>Silicon<CR>",
|
||||
mode = { "v" },
|
||||
desc = "Capture code to image",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local tmpdir = vim.fn.environ().TMP .. "/"
|
||||
|
||||
require("silicon").setup({
|
||||
font = "CaskaydiaCove Nerd Font Mono=34",
|
||||
theme = "Dracula",
|
||||
-- background = "#076678",
|
||||
-- background_image = nil,
|
||||
gobble = true,
|
||||
num_separator = " ",
|
||||
output = function()
|
||||
return tmpdir .. os.date("!%Y-%m-%dT%H-%M-%S") .. "_code.png"
|
||||
end,
|
||||
to_clipboard = true,
|
||||
window_title = function()
|
||||
return vim.fn.fnamemodify(vim.api.nvim_buf_get_name(vim.api.nvim_get_current_buf()), ":t")
|
||||
.. " | Silicon & nvim-silicon"
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user