Skip to content

Unpleasent error message on compilation failure when vim.g.vimtex_quickfix_mode = 0  #2844

@aabbccddeeffggj

Description

@aabbccddeeffggj

Description

  1. When having "vim.g.vimtex_quickfix_mode = 0" + autocommand for opening up Trouble on compilation failures + Compilation failure, errors pops in front of the window.

  2. Error:

Error detected while processing function <SNR>69_callback_nvim_output[8]..<SNR>69_check_callback[4]..vimtex#compiler#callback:
line   49:
E121 Undefined variable: b:vimtex
  1. Image of the error:
    image

  2. I would like to not have my window blocked by this error, I have set Trouble (in quickfix mode) to pop up and show the compilation errors (Observation: Trouble indeed pops up, but only after after closing this window).

  3. Options I did set:

vim.g.vimtex_syntax_conceal_disable = 1
vim.g.vimtex_view_method = 'zathura'
vim.g.vimtex_view_forward_search_on_start = 0
vim.g.vimtex_quickfix_mode = 0
  1. Autocommand I set for Trouble:
autocmd('User', {
    pattern = 'VimtexEventCompileFailed',
    callback = function()
        require('trouble').open('quickfix')
    end,
})

Steps to reproduce

  1. Set vim.g.vimtex_quickfix_mode = 0
  2. Have trouble
  3. set the the autocommand I previously showed.
  4. Compile a tex file with syntactic errors.

Expected behavior

My window not get blocked by this unusual error.

Actual behavior

My window gets blocked by this unusual error.

Do you use a latexmkrc file?

Yes

VimtexInfo

The only thing I have in the file is `$pdf_mode = 4;`

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions