You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed and implemented in #2095, the keys match_str_fmt, menu_fmt, and abbr_fmt of dictionary g:vimtex_complete_bib allow a customization of the match string and the displayed menu for citation completion. After the BibTeX entries of a LaTeX document were formatted according to the specified settings, the result is stored in a bibcomplete*.json cache file.
Feature suggestion
When any of the above keys' values change, the cache needs to be cleaned and regenerated to correctly reflect the updated formats. Currently, this has to be done manually by the user, who needs to call :VimtexClearCache bibcomplete. This process should be automated.
Proposed implementation
Store the values of the aforementioned keys within the bibcomplete*.json cache file. When loading the cache data, compare their current values with the values from the cache file. If any differs, clear the cache file automatically.
Note that only the cache file of the current document should to be cleaned as other cache files may already be up to date.
The text was updated successfully, but these errors were encountered:
Thanks, I've now pushed a change where the bibcomplete cache files are validated. If the validation fails, then the cache should be automatically cleared. I added a couple of tests, and it seems to work well. But of course, let me know if you find any bugs!
Background
As discussed and implemented in #2095, the keys
match_str_fmt
,menu_fmt
, andabbr_fmt
of dictionaryg:vimtex_complete_bib
allow a customization of the match string and the displayed menu for citation completion. After the BibTeX entries of a LaTeX document were formatted according to the specified settings, the result is stored in abibcomplete*.json
cache file.Feature suggestion
When any of the above keys' values change, the cache needs to be cleaned and regenerated to correctly reflect the updated formats. Currently, this has to be done manually by the user, who needs to call
:VimtexClearCache bibcomplete
. This process should be automated.Proposed implementation
Store the values of the aforementioned keys within the
bibcomplete*.json
cache file. When loading the cache data, compare their current values with the values from the cache file. If any differs, clear the cache file automatically.Note that only the cache file of the current document should to be cleaned as other cache files may already be up to date.
The text was updated successfully, but these errors were encountered: