Closed aabbccddeeffggj closed 9 months ago
Hi, compilations done within the continuous compilation mode only populates the quickfix list the first time it finds an error, in the subsequent compilations I do not get my quickfix populated.
Strange.
Steps to reproduce
Have errors, then compile.
Check quickfix window, it's populated with the compiler error messages.
Have no errors, then compile
Check quickfix window, now there's no error messages.
Have errors, then compile.
Check quickfix window, now there's no error messages, but it should have been populated.
I can't reproduce this. For me, this works as expected.
Can you provide a minimal config and minimal example as explained in the issue template? Repeated below for convenience.
Or, at least as a minimum, your personal configuration?
Please include minimal test files (minimal.vim
and minimal.tex
) and include an initial step like:
nvim --clean -u minimal.vim minimal.tex
minimal.vim
set nocompatible
let &runtimepath = '~/.vim/bundle/vimtex,' . &runtimepath
let &runtimepath .= ',~/.vim/bundle/vimtex/after'
filetype plugin indent on
syntax enable
" Add relevant options and VimTeX configuration below.
minimal.tex
\documentclass{minimal}
\begin{document}
Hello world!
\end{document}
Can you provide a minimal config and minimal example as explained in the issue template? Repeated below for convenience.
I tested with the test files, it worked, then I texted with my configuration, but without the auto-command I set for Trouble, and it also worked. The auto-command in question:
autocmd('User', {
pattern = 'VimtexEventCompileFailed',
callback = function()
require('trouble').open('quickfix')
end,
})
It seems like this auto-command is causing the quickfix list to not be updated.
It seems like this auto-command is causing the quickfix list to not be updated.
Yes, it sounds like the problem here is related to Trouble. I've never used that and barely know what it is.
Can you provide a listing of the minimal configuration you need to reproduce this? I.e., use my previously supplied minimal.vim
. I believe you would need something like this:
set nocompatible
let &runtimepath = '~/.vim/bundle/vimtex,' . &runtimepath
let &runtimepath = '~/.vim/bundle/troublepath,' . &runtimepath
let &runtimepath .= ',~/.vim/bundle/vimtex/after'
filetype plugin indent on
syntax enable
" Add relevant options and VimTeX configuration below.
autocmd User VimtexEventCompileFailed lua require('trouble').open('quickfix')
Can you provide a listing of the minimal configuration you need to reproduce this?
set nocompatible
let &runtimepath = '~/.vim/bundle/vimtex,' . &runtimepath
let &runtimepath .= ',~/.vim/bundle/vimtex/after'
filetype plugin indent on
syntax enable
" Add relevant options and VimTeX configuration below.
lua << EOF
-------------------------------------------------
--Plugin manager
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
'lervag/vimtex',
'folke/trouble.nvim'
})
-------------------------------------------------
--Vimtex options
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
-------------------------------------------------
--Open Trouble in quickfix mode whenever there's a compilation error
vim.api.nvim_create_autocmd('User', {
pattern = 'VimtexEventCompileFailed',
callback = function()
require('trouble').open('quickfix')
end,
})
EOF
I'm sorry for not providing it earlier.
barely know what it is.
It's basically a window that can show different kinds of info, in this case it shows the quickfix window.
Thanks; I've pushed an update that I believe fixes this for you. Please update and test.
All's working now, thanks once again for your efforts and kindness!
Glad to hear it!
Description
Hi, compilations done within the continuous compilation mode only populates the quickfix list the first time it finds an error, in the subsequent compilations I do not get my quickfix populated.
Steps to reproduce
Expected behavior
Quickfix window always get populated with the compilers errors when there're such.
Actual behavior
Quickfix window only get populated with the compilers errors when there's such in the first time errors are found.
Do you use a latexmkrc file?
Yes, it's content is: "$pdf_mode = 4;"
VimtexInfo