Diary and most lsp only available on ccflow, added hostname guard condition
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user