mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2026-01-01 06:14:23 -05:00
fix config bug
This commit is contained in:
@@ -29,8 +29,9 @@ Somewhere in your vim config, put a snippet like this:
|
|||||||
|
|
||||||
```vimscript
|
```vimscript
|
||||||
lua << END
|
lua << END
|
||||||
|
local home = vim.fn.expand("~/zettelkasten")
|
||||||
require('telekasten').setup({
|
require('telekasten').setup({
|
||||||
home = vim.fn.expand("~/zettelkasten"),
|
home = home
|
||||||
dailies = vim.fn.expand("~/zettelkasten/daily"),
|
dailies = vim.fn.expand("~/zettelkasten/daily"),
|
||||||
weeklies = vim.fn.expand("~/zettelkasten/weekly"),
|
weeklies = vim.fn.expand("~/zettelkasten/weekly"),
|
||||||
extension = ".md",
|
extension = ".md",
|
||||||
@@ -50,13 +51,13 @@ require('telekasten').setup({
|
|||||||
weeklies_create_nonexisting = true,
|
weeklies_create_nonexisting = true,
|
||||||
|
|
||||||
-- template for new notes (new_note, follow_link)
|
-- 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 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 for newly created weekly notes (goto_thisweek)
|
||||||
template_new_weekly= ZkCfg.home .. '/' .. 'templates/weekly.md',
|
template_new_weekly= home .. '/' .. 'templates/weekly.md',
|
||||||
})
|
})
|
||||||
END
|
END
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -10,35 +10,38 @@ local vim = vim
|
|||||||
-- ----------------------------------------------------------------------------
|
-- ----------------------------------------------------------------------------
|
||||||
-- DEFAULT CONFIG
|
-- DEFAULT CONFIG
|
||||||
-- ----------------------------------------------------------------------------
|
-- ----------------------------------------------------------------------------
|
||||||
|
local home = vim.fn.expand("~/zettelkasten")
|
||||||
|
|
||||||
ZkCfg = {
|
ZkCfg = {
|
||||||
home = vim.fn.expand("~/zettelkasten"),
|
home = home,
|
||||||
dailies = vim.fn.expand("~/zettelkasten/daily"),
|
dailies = vim.fn.expand("~/zettelkasten/daily"),
|
||||||
weeklies = vim.fn.expand("~/zettelkasten/weekly"),
|
weeklies = vim.fn.expand("~/zettelkasten/weekly"),
|
||||||
extension = ".md",
|
extension = ".md",
|
||||||
daily_finder = "daily_finder.sh",
|
daily_finder = "daily_finder.sh",
|
||||||
|
|
||||||
-- where to install the daily_finder,
|
-- where to install the daily_finder,
|
||||||
-- (must be a dir in your PATH)
|
-- (must be a dir in your PATH)
|
||||||
my_bin = vim.fn.expand('~/bin'),
|
my_bin = vim.fn.expand('~/bin'),
|
||||||
|
|
||||||
-- download tool for daily_finder installation: curl or wget
|
-- download tool for daily_finder installation: curl or wget
|
||||||
downloader = 'curl',
|
downloader = 'curl',
|
||||||
-- downloader = 'wget', -- wget is supported, too
|
-- downloader = 'wget', -- wget is supported, too
|
||||||
|
|
||||||
-- following a link to a non-existing note will create it
|
-- following a link to a non-existing note will create it
|
||||||
follow_creates_nonexisting = true,
|
follow_creates_nonexisting = true,
|
||||||
dailies_create_nonexisting = true,
|
dailies_create_nonexisting = true,
|
||||||
weeklies_create_nonexisting = true,
|
weeklies_create_nonexisting = true,
|
||||||
|
|
||||||
-- templates for new notes
|
-- templates for new notes
|
||||||
template_new_note = ZkCfg.home .. '/' .. 'templates/new_note.md',
|
template_new_note = home .. '/' .. 'templates/new_note.md',
|
||||||
-- currently unused, hardcoded in daily_finder.sh:
|
template_new_daily = home .. '/' .. 'templates/daily_tk.md',
|
||||||
template_new_daily = ZkCfg.home .. '/' .. 'templates/daily_tk.md',
|
template_new_weekly = home .. '/' .. 'templates/weekly_tk.md',
|
||||||
-- currently unused
|
|
||||||
template_new_weekly= ZkCfg.home .. '/' .. 'templates/weekly_tk.md',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- ----------------------------------------------------------------------------
|
-- ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local downloader2cmd = {
|
local downloader2cmd = {
|
||||||
curl = 'curl -o',
|
curl = 'curl -o',
|
||||||
wget = 'wget -O',
|
wget = 'wget -O',
|
||||||
|
|||||||
Reference in New Issue
Block a user