-
Notifications
You must be signed in to change notification settings - Fork 407
Hide preamble in TOC not working #2787
Copy link
Copy link
Closed
Labels
Description
Description
vim.g.vimtex_toc_show_preamble doesn't seem to work
Steps to reproduce
- Open nvim with the following minimal init.lua:
local root = '/tmp/nvim-minimal' -- Set stdpaths to use root dir for _, name in ipairs({ 'config', 'data', 'state', 'cache' }) do vim.env[('XDG_%s_HOME'):format(name:upper())] = root .. '/' .. name end -- Bootstrap lazy local lazypath = root .. '/plugins/lazy.nvim' if not vim.loop.fs_stat(lazypath) then vim.fn.system({ 'git', 'clone', '--filter=blob:none', '--single-branch', 'https://github.com/folke/lazy.nvim.git', lazypath, }) end vim.opt.runtimepath:prepend(lazypath) -- Install and configure plugins local plugins = { { 'lervag/vimtex', config = function() vim.g.vimtex_toc_show_preamble = 0 end, ft = { 'tex', 'bib' }, }, } require('lazy').setup(plugins, { root = root .. '/plugins', })
- Edit a tex file containing
\documentclass{article} \begin{document} \section{Foo} \end{document}
- Run
VimtexTocOpen
Expected behavior
After 3. above I would expect the preamble not to be seen in the TOC.
Actual behavior
There is a preamble entry in the TOC.
Do you use a latexmkrc file?
No
VimtexInfo
System info:
OS: Arch Linux
Vim version: NVIM v0.10.0-dev-1045+g131a1ee82d
Has clientserver: true
Servername: /run/user/1000/nvim.2623593.0
VimTeX project: foo
base: foo.tex
root: /home/pedro/Desktop
tex: /home/pedro/Desktop/foo.tex
main parser: current file verified
document class: article
compiler: latexmk
engine: -pdf
options:
-verbose
-file-line-error
-synctex=1
-interaction=nonstopmode
callback: 1
continuous: 1
executable: latexmk
viewer: General
qf method: LaTeX logfileReactions are currently unavailable
