make the error tags file location customizable

This commit is contained in:
anon 2025-01-04 03:51:39 +01:00
parent 7bc5c0459e
commit 28338ca32a
2 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,9 @@
#!/usr/bin/tclsh
set outputFilename "/home/anon/stow/.cache/errtags.tags"
set outputFilename [expr { \
[info exists env(ERRTAGS_CACHE_FILE)] ? \
$env(ERRTAGS_CACHE_FILE) : "$env(XDG_CACHE_HOME)/errtags.tags"
}]
set ERRTAGS_SESSION [expr { \
[info exists env(ERRTAGS_SESSION)] ? $env(ERRTAGS_SESSION) : "" \

View File

@ -69,7 +69,7 @@ function! DoErrtagsNotices()
call prop_remove({ 'type': 'ErrtagsHighlight' })
call prop_remove({ 'type': 'ErrtagsMessage' })
let l:lines = readfile(expand('~/stow/.cache/errtags.tags'))
let l:lines = readfile(g:errtags_cache)
let l:notices = ParseErrtagsNotices(l:lines)
@ -85,5 +85,9 @@ if exists('g:errtags_events')
endfor
endif
if expand('$ERRTAGS_CACHE_FILE') == '$ERRTAGS_CACHE_FILE'
let g:errtags_cache = expand('$XDG_CACHE_HOME/errtags.tags')
endif
command! DoErrtagsNotices :call DoErrtagsNotices()
" #pragma endregion