task-note matches correct template, %link is highlighted on vimwiki

filetypes
This commit is contained in:
Anish Lakhwara 2023-05-04 23:09:27 +10:00
parent 5f3d27695e
commit b595688a65
2 changed files with 4 additions and 2 deletions

View file

@ -151,6 +151,8 @@ in
home.file.".config/nvim/after/syntax/vimwiki.vim".text = ''
" match with %update
syntax match VimwikiPlaceholder /^\s*%update\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite
" match with %link
syntax match VimwikiPlaceholder /^\s*%link\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite
'';
#environment.systemPackages = with customPlugins; [ tidal ];

View file

@ -41,9 +41,9 @@ def write_note(task_id: int):
time = datetime.datetime.now().strftime("%y-%m-%d %H:%M")
with open(notes_file, "w") as f:
f.write(f"%title: {task_description}")
f.write(f"%title {task_description}")
f.write(f":task:{task_project}:{task_tags if len(task_tags) else ''}\n")
f.write(f"%date: {time}\n\n")
f.write(f"%date {time}\n\n")
f.flush()
os.execlp(EDITOR, EDITOR, notes_file)