Skip to content

Journal Summary Flakiness #203

@donniep

Description

@donniep

Thank you for this very useful plugin. NVIM v0.5.1 on MacOS 12.0.1:

:WikiJournalToWeek/Month are not pulling any journals for me. The generated title is the default title (ignoring init.vim). Then follows the rest of any matched template (unfortunately) - but no journals. I've tried commenting out my wiki_template section entirely in init.vim, and then I just get the default title, period - but, again, no journals. The wiki root is ~/Notes and the journals are in ~/Notes/journal of the form YYYY-MM-DD.md. Maybe I'm just missing something fundamental?

Relevant section of init.vim:

" Wiki Export
let g:wiki_export = {
        \ 'args' : '--pdf-engine=xelatex',
        \ 'from_format' : 'markdown',
        \ 'ext' : 'pdf',
        \ 'link_ext_replace': v:false,
        \ 'view' : v:true,
        \ 'viewer' : 'open',
        \ 'output': fnamemodify(tempname(), ':h'),
        \}

" Markdown Wiki.vim
let g:wiki_root = '~/Notes'
let g:wiki_filetypes = ['md']
let g:wiki_link_extension = '.md'
let g:wiki_write_on_nav = 1
let s:tag_parser = deepcopy(g:wiki#tags#default_parser)
let s:tag_parser.re_match = '\v%(^|\s)#\zs[^# ]+'
let s:tag_parser.re_findstart = '\v%(^|\s)#\zs[^# ]+'
let s:tag_parser.make = {t, l -> empty(t) ? '' : join(map(t, "#" . v:val))}
let g:wiki_tag_parsers = [s:tag_parser]
let g:wiki_toc_title = 'Contents'
let g:wiki_template_title_week = '# Summary Week %(week), %(year)'
let g:wiki_template_title_month = '# Summary for %(month-name) %(year)'

" Wiki.vim Templates
let g:wiki_templates = [
          \ { 'match_re': '202',
          \   'source_filename': '/Users/donnie/Notes/templates/daily-vim.md'},
          \ { 'match_re': 'Quote',
          \   'source_filename': '/Users/donnie/Notes/templates/quote-vim.md'},
          \ { 'match_re': 'Project',
          \   'source_filename': '/Users/donnie/Notes/templates/project-vim.md'},
          \ { 'match_re': '',
          \   'source_filename': '/Users/donnie/Notes/templates/atomic-vim.md'},
          \]

" Enable ncm2 for all buffers
autocmd BufEnter * call ncm2#enable_for_buffer()
" IMPORTANT: :help Ncm2PopupOpen for more information
"set completeopt=noinsert,menuone,noselect
" Use <TAB> to select the popup menu:
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
" Wiki Link Completion with ncm2
augroup my_cm_setup
    autocmd!
    autocmd BufEnter * call ncm2#enable_for_buffer()
    autocmd User WikiBufferInitialized call ncm2#register_source({
          \ 'name': 'markdown',
          \ 'priority': 9,
          \ 'scope': ['markdown'],
          \ 'word_pattern': '\w+',
          \ 'complete_pattern': '\[\[',
          \ 'on_complete': ['ncm2#on_complete#delay', 200,
          \                 'ncm2#on_complete#omni',
          \                 'wiki#complete#omnicomplete'],
          \})
  augroup END

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions