ekickx / clipboard-image.nvim

Neovim Lua plugin to paste image from clipboard.
MIT License
313 stars 51 forks source link

filetype specific configuration #6

Closed jdeut closed 3 years ago

jdeut commented 3 years ago

In case nvim is used to write multiple markup languages (html, md, tex) it would help to configure the plugin like this:

require'clipboard-image'.setup {
  tex = { 
    img_dir = 'img',
    img_dir_txt = 'img',
    img_name = function () return os.date('%Y-%m-%d-%H-%M-%S') end,
    affix = [[\includegraphics{%s}]]
  },
  md = { 
    img_dir = 'img',
    img_dir_txt = 'img',
    img_name = function () return os.date('%Y-%m-%d-%H-%M-%S') end,
    affix = '![](%s)''
  },
...
}
ekickx commented 3 years ago

Ohh that's a good idea. I'll find a time to work on it.

jdeut commented 3 years ago

Ohh that's a good idea. I'll find a time to work on it.

Thanks a lot :)

ekickx commented 3 years ago

Ohh that's a good idea. I'll find a time to work on it.

Thanks a lot :)

You're welcome (。•̀ᴗ-)✧