Diary and most lsp only available on ccflow, added hostname guard condition

This commit is contained in:
2026-03-04 21:58:23 +01:00
parent 107a257642
commit 2b47d7a9cd
4 changed files with 56 additions and 44 deletions

View File

@@ -1,7 +1,7 @@
local diary_open = function(opts)
local date = opts.args ~= '' and opts.args or os.date('%Y-%m-%d')
local year, month = date:match('(%d%d%d%d)-(%d%d)')
local folder = string.format('~/.diary/asciidoc/%s', year)
local folder = vim.fs.joinpath(vim.env.HOME, string.format('.diary/asciidoc/%s', year))
vim.fn.mkdir(folder, "p")
local file = string.format('%s/diary-%s-%s.adoc', folder, year, month)
print("file is:", file)