Skip to content

Latest commit

 

History

History
executable file
·
45 lines (36 loc) · 991 Bytes

README.md

File metadata and controls

executable file
·
45 lines (36 loc) · 991 Bytes

neovim github image uploader

A simple plugin to upload clipboard image

dependency

curl, xclip(for x11), wl-clipboard (for wayland)

Only support Linux now.

install

use your favorate plugin manager, like packer.nvim. then add your configurations in setup

--- default configurations
require'nvim-github-uploader'.setup({
    token = "<your github api token>",
    repo = "<username>/<repo>",
    path = "",
    img_name = function()
        return os.date "%Y-%m-%d-%H-%M-%S.png"
    end,
    affix = "![](%s)",
    message = "upload image",
    committer_name = "uploader",
    committer_email = "xxx@xxx.com",
    notice = "notify",
    tmp_file = "/tmp/nvim-github-uploader",
    show_name = true,
    })

usage

<cmd>lua require'nvim-github-uploader'.upload_img()<cr>

or using command

:UploadClipboard

Thanks

nvim-picgo clipboard-image.nvim