code: cleaned up

This commit is contained in:
2026-02-25 16:11:35 +01:00
parent ba939661c7
commit 2015c0e32c
7 changed files with 76 additions and 89 deletions

View File

@@ -2,7 +2,7 @@
" This resolves denote links. The function has access to the variable v:fname,
" which corresponds to the filename under the cursor.
function s:gotofile()
return v:fname !~ "^denote:"
return v:fname !~ '^denote:'
\ ? v:fname
\ : denote#meta#fileFromNoteId(v:fname[7:]) ?? v:fname
endfunction
@@ -19,7 +19,7 @@ function denote#ft#denote()
" Set the function to resolve the filename under the cursor (see |gf|).
setlocal includeexpr=s:gotofile()
" Back references command
let l:noteid = denote#meta#noteIdFromFile(expand("%:t"))
let l:noteid = denote#meta#noteIdFromFile(expand('%:t'))
exe 'command! DenoteBackReferences DenoteGrep /\<denote:' .. l:noteid .. '\>/gj'
endfunction
@@ -32,7 +32,6 @@ function denote#ft#qf()
" Clear settings
set spell<
nmapclear <buffer>
" nunmap <buffer> q
return
endif
setlocal nospell