more sane defaults for pasted images

This commit is contained in:
Rene Schallner
2021-11-26 05:38:21 +01:00
parent 723a2d25ef
commit 87c4c1de21
3 changed files with 8 additions and 6 deletions

View File

@@ -105,7 +105,7 @@ require('telekasten').setup({
-- image link style -- image link style
-- wiki: ![[image name]] -- wiki: ![[image name]]
-- markdown: ![](image_subdir/xxxxx.png) -- markdown: ![](image_subdir/xxxxx.png)
image_link_style = "wiki", image_link_style = "markdown",
-- integrate with calendar-vim -- integrate with calendar-vim
plug_into_calendar = true, plug_into_calendar = true,
@@ -128,7 +128,7 @@ END
| `templates` | path where your note templates go | ~/zettelkasten/templates | | `templates` | path where your note templates go | ~/zettelkasten/templates |
| `image_subdir` | sub-directory where pasted images should go | img | | `image_subdir` | sub-directory where pasted images should go | img |
| | set to nil if pasted images shouldn't go into a special subdir | img | | | set to nil if pasted images shouldn't go into a special subdir | img |
| `image_link_style` | style of img links inserted when pasting images from clipboard | wiki | | `image_link_style` | style of img links inserted when pasting images from clipboard | markdown |
| | `markdown` ... `![](image_subdir/xxxxx.png)` | | | | `markdown` ... `![](image_subdir/xxxxx.png)` | |
| | `wiki` ... `![[image name]]` | | | | `wiki` ... `![[image name]]` | |
| `extension` | filename extension of your note files | .md | | `extension` | filename extension of your note files | .md |

View File

@@ -144,7 +144,7 @@ telekasten.setup({opts})
Sub-directory where pasted images should go to. Set to `nil` if images Sub-directory where pasted images should go to. Set to `nil` if images
should not go into a sub-directory. should not go into a sub-directory.
Default: 'img' Default: `nil`
*telekasten.settings.image_link_style* *telekasten.settings.image_link_style*
image_link_style: ~ image_link_style: ~
@@ -154,7 +154,7 @@ telekasten.setup({opts})
- 'wiki' .. places links like this: `![[image_name]]` - 'wiki' .. places links like this: `![[image_name]]`
- 'markdown' .. `![](image_subdir/image_name)` - 'markdown' .. `![](image_subdir/image_name)`
Default: 'wiki' Default: 'markdown'
*telekasten.settings.follow_create_nonexisting* *telekasten.settings.follow_create_nonexisting*
follow_creates_nonexisting: ~ follow_creates_nonexisting: ~

View File

@@ -23,7 +23,7 @@ local ZkCfg = {
-- image subdir for pasting -- image subdir for pasting
-- subdir name -- subdir name
-- or nil if pasted images shouldn't go into a special subdir -- or nil if pasted images shouldn't go into a special subdir
image_subdir = "img", image_subdir = nil,
-- markdown file extension -- markdown file extension
extension = ".md", extension = ".md",
@@ -41,7 +41,7 @@ local ZkCfg = {
-- image link style -- image link style
-- wiki: ![[image name]] -- wiki: ![[image name]]
-- markdown: ![](image_subdir/xxxxx.png) -- markdown: ![](image_subdir/xxxxx.png)
image_link_style = "wiki", image_link_style = "markdown",
-- integrate with calendar-vim -- integrate with calendar-vim
plug_into_calendar = true, plug_into_calendar = true,
@@ -642,6 +642,8 @@ local Setup = function(cfg)
or "left-fit" or "left-fit"
SetupCalendar(ZkCfg.calendar_opts) SetupCalendar(ZkCfg.calendar_opts)
end end
print(vim.inspect(cfg))
print(vim.inspect(ZkCfg))
end end
local M = { local M = {