diff --git a/lua/img-clip/config.lua b/lua/img-clip/config.lua index 50b2e8f..e169f78 100644 --- a/lua/img-clip/config.lua +++ b/lua/img-clip/config.lua @@ -1,24 +1,30 @@ local M = {} local defaults = { - dir_path = "assets", - file_name = "%Y-%m-%d-%H-%M-%S", - use_absolute_path = false, - prompt_for_file_name = true, - show_dir_path_in_prompt = false, - insert_mode_after_paste = true, - respect_cursor_placment_in_template = true, - + dir_path = "assets", -- directory path to save images to, can be relative or absolute + file_name = "%Y-%m-%d-%H-%M-%S", -- file name format (see lua.org/pil/22.1.html) + use_absolute_path = false, -- expands dir_path to absolute path + prompt_for_file_name = true, -- ask user for file name before saving, leave empty to use default + show_dir_path_in_prompt = false, -- show dir_path in prompt when prompting for file name + insert_mode_after_paste = true, -- enter insert mode after pasting the markup code + respect_cursor_placment_in_template = true, -- jump to cursor position in template after pasting + + -- default template when filetype-specific template is not defined template = "$FILE_PATH", + -- markdown specific options markdown = { + -- any opt can be passed here to override the global config + -- e.g. insert_mode_after_paste = false, template = "![$CURSOR]($FILE_PATH)", }, + -- html specific options html = { template = '$CURSOR', }, + -- latex specific options tex = { template = [[ \begin{figure}[h] @@ -30,6 +36,7 @@ local defaults = { ]], }, + -- typst specific options typst = { template = [[ #figure(