fix config bug

This commit is contained in:
Rene Schallner
2021-11-21 21:21:45 +01:00
parent f8a7469fd7
commit 3ee8ba7716
2 changed files with 29 additions and 25 deletions

View File

@@ -29,8 +29,9 @@ Somewhere in your vim config, put a snippet like this:
```vimscript
lua << END
local home = vim.fn.expand("~/zettelkasten")
require('telekasten').setup({
home = vim.fn.expand("~/zettelkasten"),
home = home
dailies = vim.fn.expand("~/zettelkasten/daily"),
weeklies = vim.fn.expand("~/zettelkasten/weekly"),
extension = ".md",
@@ -50,13 +51,13 @@ require('telekasten').setup({
weeklies_create_nonexisting = true,
-- template for new notes (new_note, follow_link)
template_new_note = ZkCfg.home .. '/' .. 'templates/new_note.md',
template_new_note = home .. '/' .. 'templates/new_note.md',
-- template for newly created daily notes (goto_today)
template_new_daily = ZkCfg.home .. '/' .. 'templates/daily.md',
template_new_daily = home .. '/' .. 'templates/daily.md',
-- template for newly created weekly notes (goto_thisweek)
template_new_weekly= ZkCfg.home .. '/' .. 'templates/weekly.md',
template_new_weekly= home .. '/' .. 'templates/weekly.md',
})
END
```

View File

@@ -10,35 +10,38 @@ local vim = vim
-- ----------------------------------------------------------------------------
-- DEFAULT CONFIG
-- ----------------------------------------------------------------------------
local home = vim.fn.expand("~/zettelkasten")
ZkCfg = {
home = vim.fn.expand("~/zettelkasten"),
dailies = vim.fn.expand("~/zettelkasten/daily"),
weeklies = vim.fn.expand("~/zettelkasten/weekly"),
extension = ".md",
daily_finder = "daily_finder.sh",
home = home,
dailies = vim.fn.expand("~/zettelkasten/daily"),
weeklies = vim.fn.expand("~/zettelkasten/weekly"),
extension = ".md",
daily_finder = "daily_finder.sh",
-- where to install the daily_finder,
-- (must be a dir in your PATH)
my_bin = vim.fn.expand('~/bin'),
-- where to install the daily_finder,
-- (must be a dir in your PATH)
my_bin = vim.fn.expand('~/bin'),
-- download tool for daily_finder installation: curl or wget
downloader = 'curl',
-- downloader = 'wget', -- wget is supported, too
-- download tool for daily_finder installation: curl or wget
downloader = 'curl',
-- downloader = 'wget', -- wget is supported, too
-- following a link to a non-existing note will create it
follow_creates_nonexisting = true,
dailies_create_nonexisting = true,
weeklies_create_nonexisting = true,
-- following a link to a non-existing note will create it
follow_creates_nonexisting = true,
dailies_create_nonexisting = true,
weeklies_create_nonexisting = true,
-- templates for new notes
template_new_note = ZkCfg.home .. '/' .. 'templates/new_note.md',
-- currently unused, hardcoded in daily_finder.sh:
template_new_daily = ZkCfg.home .. '/' .. 'templates/daily_tk.md',
-- currently unused
template_new_weekly= ZkCfg.home .. '/' .. 'templates/weekly_tk.md',
-- templates for new notes
template_new_note = home .. '/' .. 'templates/new_note.md',
template_new_daily = home .. '/' .. 'templates/daily_tk.md',
template_new_weekly = home .. '/' .. 'templates/weekly_tk.md',
}
-- ----------------------------------------------------------------------------
local downloader2cmd = {
curl = 'curl -o',
wget = 'wget -O',