From 7468025d4f4745a051b4f815ca5edb2215f6e6cc Mon Sep 17 00:00:00 2001 From: Ernie Miller Date: Thu, 5 May 2022 18:18:45 -0400 Subject: [PATCH 1/2] Hide numbers on calendar display. Without hiding numbers and relative numbers, the week number indicator is cut off. --- lua/telekasten.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/telekasten.lua b/lua/telekasten.lua index ab42de2..b96b01f 100644 --- a/lua/telekasten.lua +++ b/lua/telekasten.lua @@ -2626,7 +2626,11 @@ local function ShowCalendar(opts) if opts.vertical_resize then vim.cmd("vertical resize +" .. opts.vertical_resize) end - vim.cmd("set signcolumn=no") + vim.cmd([[ + set signcolumn=no + set nonumber + set norelativenumber + ]]) end -- set up calendar integration: forward to our lua functions From 49c3a90f324e2ca7b7bc8a13d9a093231771234c Mon Sep 17 00:00:00 2001 From: Ernie Miller Date: Thu, 5 May 2022 19:29:09 -0400 Subject: [PATCH 2/2] Observe calendar monday option correctly The calendar plugin checks the existence of calendar_monday, not whether it's 0 or 1, so we don't want to set it unless it's 1. --- lua/telekasten.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/telekasten.lua b/lua/telekasten.lua index ab42de2..433f51d 100644 --- a/lua/telekasten.lua +++ b/lua/telekasten.lua @@ -2658,7 +2658,6 @@ local function SetupCalendar(opts) let g:calendar_action = 'MyCalAction' " let g:calendar_begin = 'MyCalBegin' - let g:calendar_monday = {{calendar_monday}} let g:calendar_mark = '{{calendar_mark}}' let g:calendar_weeknm = {{weeknm}} ]] @@ -2667,6 +2666,9 @@ local function SetupCalendar(opts) cmd = cmd:gsub("{{" .. k .. "}}", v) end vim.cmd(cmd) + if opts.calendar_monday == 1 then + vim.cmd("let g:calendar_monday = 1") + end end local function ToggleTodo(opts)