feat: denote directory support
This commit is contained in:
@@ -51,8 +51,13 @@ endfunction
|
||||
|
||||
" Load all references to the given note into the location list.
|
||||
function denote#loclist#references(noteId)
|
||||
if !exists('t:denote_directory')
|
||||
echohl WarningMsg
|
||||
echom "Denote directory not specified, see |vim-denote|."
|
||||
return
|
||||
endif
|
||||
" Populate location list
|
||||
execute "lvimgrep /\\<denote:" .. a:noteId .. "\\>/gj *"
|
||||
silent! execute "lvimgrep /\\<denote:" .. a:noteId .. "\\>/gj " .. t:denote_directory .. "*"
|
||||
" Adjust location list: set title and specify display function
|
||||
let file=denote#meta#fileFromNoteId(a:noteId)
|
||||
let noteTitle=denote#meta#noteTitleFromFile(file)
|
||||
|
||||
Reference in New Issue
Block a user