Compare commits

...

2 Commits

Author SHA1 Message Date
Lüdecke Sascha
955ceb2f61 TODO template current date moved into todo line 2026-08-07 09:13:41 +02:00
Lüdecke Sascha
83b45009e3 Unified handling of local / global variables 2026-08-07 09:13:07 +02:00
7 changed files with 13 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
-- adjust proxy on Windows -- adjust proxy on Windows
if vim.loop.os_environ().OS == 'Windows_NT' then 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("http_proxy", "http://10.167.16.21:80")
vim.fn.setenv("https_proxy", "http://10.167.16.21:80") vim.fn.setenv("https_proxy", "http://10.167.16.21:80")
end end

View File

@@ -1,8 +1,8 @@
-- define your colorscheme here -- 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 if not is_ok then
vim.notify('colorscheme ' .. colorscheme .. ' not found!') vim.notify('colorscheme ' .. COLORSCHEME .. ' not found!')
return return
end end

View File

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

View File

@@ -19,7 +19,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
vim.keymap.set("n", '<space>F', ":silent !dx fmt --file %<cr>", { desc = "DX format rsx! regions", unpack(bufopts) }) vim.keymap.set("n", '<space>F', ":silent !dx fmt --file %<cr>", { desc = "DX format rsx! regions", unpack(bufopts) })
vim.keymap.set("v", "<space>f", LSPRangeFormatFunction, { desc = "LSP Format region" }) vim.keymap.set("v", "<space>f", LSPRangeFormatFunction, { desc = "LSP Format region" })
-- 2024-09-09 - some slaptop commands for diagnostics, symbols and code actions -- 2024-09-09 - some commands for diagnostics, symbols and code actions
local fzf = require('fzf-lua') local fzf = require('fzf-lua')
vim.keymap.set('n', '<space>d', fzf.diagnostics_document, { desc = "Document diagnostics" }) vim.keymap.set('n', '<space>d', fzf.diagnostics_document, { desc = "Document diagnostics" })
vim.keymap.set('n', '<space>D', fzf.diagnostics_workspace, { desc = "Workspace diagnostics" }) vim.keymap.set('n', '<space>D', fzf.diagnostics_workspace, { desc = "Workspace diagnostics" })

View File

@@ -5,10 +5,9 @@
--------------------------------------------------- ---------------------------------------------------
-- this is specific for a machine -- this is specific for a machine
if vim.loop.os_gethostname() == 'slaptop' then local ORG_BASE_FOLDER = '~/Documents/Eigene (Briefe etc.)/org'
_G.ORG_BASE_FOLDER = '~/Documents/Eigene (Briefe etc.)/org' if vim.loop.os_gethostname() != 'slaptop' then
else ORG_BASE_FOLDER = '~/OneDrive/Desktop/orgfiles'
_G.ORG_BASE_FOLDER = '~/OneDrive/Desktop/orgfiles'
end end
sl_opt = { sl_opt = {
org_base_folder = ORG_BASE_FOLDER, org_base_folder = ORG_BASE_FOLDER,

View File

@@ -209,7 +209,7 @@ require("lazy").setup({
org_default_notes_file = sl_opt.org_default_notes_file, org_default_notes_file = sl_opt.org_default_notes_file,
org_archive_location = sl_opt.org_archive_location, org_archive_location = sl_opt.org_archive_location,
org_capture_templates = { org_capture_templates = {
t = { description = 'Task', template = "* TODO %?\n %u" }, t = { description = 'Task', template = "* TODO %u %?" },
i = { description = 'Interruption', template = "* STARTED [#A] %^{Working on}\n %U\n %a\n" }, i = { description = 'Interruption', template = "* STARTED [#A] %^{Working on}\n %U\n %a\n" },
}, },
org_todo_keywords = { 'TODO(t)', 'STARTED(s)', 'PLANNED(p)', '|', 'DONE(d)', 'UNPLANNED(u)' }, org_todo_keywords = { 'TODO(t)', 'STARTED(s)', 'PLANNED(p)', '|', 'DONE(d)', 'UNPLANNED(u)' },

View File

@@ -1,4 +1,4 @@
# slaptop local snippets for all modes # local snippets for all modes
snippet todo "Add a TODO marker" snippet todo "Add a TODO marker"
// TODO.`strftime("%Y-%m-%d -")` // TODO.`strftime("%Y-%m-%d -")`