diff --git a/init.lua b/init.lua index 47af72d..d1adcb9 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,6 @@ -- adjust proxy on Windows if vim.loop.os_environ().OS == 'Windows_NT' then - -- TODO move out of the tree and do not check in + -- TODO move out of the tree vim.fn.setenv("http_proxy", "http://10.167.16.21:80") vim.fn.setenv("https_proxy", "http://10.167.16.21:80") end diff --git a/lua/colorscheme.lua b/lua/colorscheme.lua index 7b2edd9..f71f49b 100644 --- a/lua/colorscheme.lua +++ b/lua/colorscheme.lua @@ -1,8 +1,8 @@ -- define your colorscheme here -local colorscheme = 'lunaperche-sl' +local COLORSCHEME = 'lunaperche-sl' -local is_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) +local is_ok, _ = pcall(vim.cmd, "colorscheme " .. COLORSCHEME) if not is_ok then - vim.notify('colorscheme ' .. colorscheme .. ' not found!') + vim.notify('colorscheme ' .. COLORSCHEME .. ' not found!') return end diff --git a/lua/diary.lua b/lua/diary.lua index 0ee26c2..acda03a 100644 --- a/lua/diary.lua +++ b/lua/diary.lua @@ -1,7 +1,9 @@ +local DIARY_FOLDER = vim.fs.joinpath(vim.env.HOME, '.diary/asciidoc') + 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 = vim.fs.joinpath(vim.env.HOME, string.format('.diary/asciidoc/%s', year)) + local folder = vim.fs.joinpath(DIARY_FOLDER, string.format('%s', year)) vim.fn.mkdir(folder, "p") local file = string.format('%s/diary-%s-%s.adoc', folder, year, month) print("file is:", file) diff --git a/lua/options.lua b/lua/options.lua index 914b163..1c8b0fa 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -5,10 +5,9 @@ --------------------------------------------------- -- this is specific for a machine -if vim.loop.os_gethostname() == 'slaptop' then - _G.ORG_BASE_FOLDER = '~/Documents/Eigene (Briefe etc.)/org' -else - _G.ORG_BASE_FOLDER = '~/OneDrive/Desktop/orgfiles' +local ORG_BASE_FOLDER = '~/Documents/Eigene (Briefe etc.)/org' +if vim.loop.os_gethostname() != 'slaptop' then + ORG_BASE_FOLDER = '~/OneDrive/Desktop/orgfiles' end sl_opt = { org_base_folder = ORG_BASE_FOLDER, diff --git a/snippets/all.snippets b/snippets/all.snippets index e80f12f..04de2e2 100644 --- a/snippets/all.snippets +++ b/snippets/all.snippets @@ -1,4 +1,4 @@ -# slaptop local snippets for all modes +# local snippets for all modes snippet todo "Add a TODO marker" // TODO.`strftime("%Y-%m-%d -")`