mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2026-02-04 06:42:05 +00:00
Update 2025-05-31
Update 2025-05-03 Update 2025-05-05 Update 2025-05-07 Update 2025-05-09 chore: use mini.nvim Update 2025-05-12 Update 2025-05-14 Update 2025-05-16 Update 2025-05-17 Update 2025-05-20 Update 2025-05-21 Update 2025-05-23 Update 2025-05-25 Update 2025-05-30
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
local function is_typst()
|
||||
return vim.bo.filetype == "typst"
|
||||
end
|
||||
return {
|
||||
"HakonHarnes/img-clip.nvim",
|
||||
event = "VeryLazy",
|
||||
@@ -7,11 +10,29 @@ return {
|
||||
opts = {
|
||||
default = {
|
||||
dir_path = "assets/img",
|
||||
extension = "webp",
|
||||
process_cmd = "convert - -quality 75 webp:-",
|
||||
file_name = "%Y-%m-%d-%H%M%S",
|
||||
extension = function()
|
||||
if is_typst() then
|
||||
return "png"
|
||||
else
|
||||
return "webp"
|
||||
end
|
||||
end,
|
||||
process_cmd = function()
|
||||
if is_typst() then
|
||||
return ""
|
||||
else
|
||||
return "convert - -quality 75 webp:-"
|
||||
end
|
||||
end,
|
||||
file_name = "%Y-%m-%d_%H-%M-%S",
|
||||
relative_to_current_file = false,
|
||||
prompt_for_file_name = false,
|
||||
prompt_for_file_name = function()
|
||||
return is_typst()
|
||||
end,
|
||||
embed_image_as_base64 = false,
|
||||
drag_and_drop = {
|
||||
insert_mode = true,
|
||||
},
|
||||
},
|
||||
filetypes = {
|
||||
markdown = {
|
||||
@@ -20,6 +41,14 @@ return {
|
||||
vimwiki = {
|
||||
template = "![[$FILE_PATH]]",
|
||||
},
|
||||
typst = {
|
||||
template = [[
|
||||
#figure(
|
||||
image("$FILE_PATH", width: 80%),
|
||||
caption: [$CURSOR],
|
||||
) <$LABEL>
|
||||
]],
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user