https://github.com/mistgc/pinmd.nvim
Picture In Markdown. A plugin written in Lua for Neovim to paste images from clipboard.
https://github.com/mistgc/pinmd.nvim
clipboard lua markdown neovim neovim-plugin nvim-lua nvim-plugin
Last synced: 16 days ago
JSON representation
Picture In Markdown. A plugin written in Lua for Neovim to paste images from clipboard.
- Host: GitHub
- URL: https://github.com/mistgc/pinmd.nvim
- Owner: mistgc
- License: mit
- Created: 2023-07-22T10:48:01.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-06-01T09:49:14.000Z (almost 2 years ago)
- Last Synced: 2024-06-02T08:59:16.087Z (almost 2 years ago)
- Topics: clipboard, lua, markdown, neovim, neovim-plugin, nvim-lua, nvim-plugin
- Language: Lua
- Homepage:
- Size: 1.83 MB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Pinmd
Picture In Markdown
## Install
packer.nvim
```lua
use 'mistgc/pinmd.nvim'
```
lazy.nvim
```lua
{ 'mistgc/pinmd.nvim' }
```
## Usage
cmd: `PinmdPaste`

## Config
Recommend Config:
```lua
options = {
files = {
link_format = "relative_path_in_vault",
location_for_new_attachments = "specified_folder_in_vault",
attachment_folder_path = "_attachments/" -- folder specified by yourself
}
}
```
Default Config:
```lua
options = {
files = {
link_format = "absolute_path_in_vault", -- "absolute_path_in_vault", "relative_path_in_vault"
location_for_new_attachments = "vault_folder", -- "vault_folder", "specified_folder_in_vault"
attachment_folder_path = "assets/imgs/",
},
images = {
name = function()
return tostring(os.date("%Y-%m-%d-%H-%M-%S"))
end,
},
filetype = {
default = {
affix = "%s",
},
markdown = {
affix = "",
},
asciidoc = {
affix = "image::%s[]",
},
},
}
```