lervag / vimtex

VimTeX: A modern Vim and neovim filetype plugin for LaTeX files.
MIT License
5.57k stars 391 forks source link

Improve g:vimtex_quickfix_latexlog option #1408

Closed lervag closed 4 years ago

lervag commented 5 years ago

As suggested by @kiryph in #1407, it seems appropriate to simplify the configuration of error/warning filtering for g:vimtex_quickfix_latexlog. Exactly how should be further discussed, but one approach could be as follows:

Remove most of the option keys in g:vimtex_quickfix_latexlog, let the errorformat string do its magic and parse the entire log file. Then apply custom filters during post processing similar to the recently added ignore_filters option key. Something like this:

" Currently allowed options with default values
let g:vimtex_quickfix_latexlog = {
      \ 'default' : 1,
      \ 'ignore_filters' : [],
      \ 'general' : 1,
      \ 'references' : 1,
      \ 'overfull' : 1,
      \ 'underfull' : 1,
      \ 'font' : 1,
      \ 'packages' : {
      \   'default' : 1,
      \   'general' : 1,
      \   'babel' : 1,
      \   'biblatex' : 1,
      \   'fixltx2e' : 1,
      \   'hyperref' : 1,
      \   'natbib' : 1,
      \   'scrreprt' : 1,
      \   'titlesec' : 1,
      \ },
      \}

" Suggest to remove the old mechanism for filtering and instead use this:
let g:vimtex_quickfix_latexlog = {
      \ 'ignore_filters' : [],
      \}

Since there is only a single option, one might want to simplify further to something like g:vimtex_quickfix_latexlog_ignore_filters = [].


However, I'm very open to other suggestions!

lervag commented 4 years ago

I have finally looked into this. In #1569, I added the option g:vimtex_quickfix_ignore_filters, which seems to allow exactly what was suggested here. Thus, I hereby propose to simply remove the option g:vimtex_quickfix_latexlog in favor of the ignore_filters variant. This would be a breaking change, so I would add a warning to those who use this option.

Opinions or comments? @kiryph @clason @timokau

lervag commented 4 years ago

This has been implemented, and there should be a warning now for anyone who uses the old option.

timokau commented 4 years ago

Sorry, the previous comment got lost in my inbox. Thanks for implementing this!