ekickx / clipboard-image.nvim

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

feat: filetype specific config #7

Closed ekickx closed 3 years ago

ekickx commented 3 years ago

So yeah now you can configure this plugin like this:

require'clipboard-image'.setup {
  default = {
    img_dir = 'img',
    img_dir_txt = 'img',
    img_name = function () return os.date('%Y-%m-%d-%H-%M-%S') end,
    affix = '%s'
  },
  markdown = {
    affix = '![](%s)'
  },
}

The default table is the default config for all filetype. You can configure a specific filetype by making a table of it. To know the filetype of the current buffer, run :lua print(vim.bo.filetype)