diff --git a/doc/telekasten.txt b/doc/telekasten.txt index 9bc088c..a6017eb 100644 --- a/doc/telekasten.txt +++ b/doc/telekasten.txt @@ -103,6 +103,9 @@ telekasten.setup({opts}) dailies_create_nonexisting = true, -- create non-existing dailies weeklies_create_nonexisting = true, -- create non-existing weeklies + -- skip telescope prompt for goto_today and goto_thisweek + journal_auto_open = false, + -- Image link style", -- wiki: ![[image name]] -- markdown: ![](image_subdir/xxxxx.png) @@ -347,6 +350,14 @@ telekasten.setup({opts}) Default: true + *telekasten.settings.journal_auto_open* + journal_auto_open: ~ + Flag that determines whether the telescope picker should be used when + opening the daily and weekly notes, or if they should be directly + created/opened. + + Default: false + *telekasten.settings.template_new_note* template_new_note: ~ Markdown template for new notes. Set to `nil` if you don't want a diff --git a/lua/telekasten.lua b/lua/telekasten.lua index cd4f484..3a07f47 100644 --- a/lua/telekasten.lua +++ b/lua/telekasten.lua @@ -1643,6 +1643,10 @@ local function GotoDate(opts) local fexists = fileutils.file_exists(fname) local function picker() if opts.journal_auto_open then + if opts.calendar == true then + -- ensure that the calendar window is not improperly overwritten + vim.cmd("wincmd w") + end vim.cmd("e " .. fname) else find_files_sorted({ @@ -2550,6 +2554,10 @@ local function GotoThisWeek(opts) local fexists = fileutils.file_exists(fname) local function picker() if opts.journal_auto_open then + if opts.calendar == true then + -- ensure that the calendar window is not improperly overwritten + vim.cmd("wincmd w") + end vim.cmd("e " .. fname) else find_files_sorted({