vim-polyglot
vim-polyglot copied to clipboard
Wrong comment string when using Dockerfile in listing in LaTeX files
Describe the bug:
When using a dockerfile in a LaTeX llisting, commentstring
gets set to # %s
while Vim still detects the filetype as being tex.
To Reproduce:
Create the following document as main.tex
:
\documentclass{article}
\usepackage{listings}
\usepackage{minted}
\usemintedstyle{borland}
\setminted{%
autogobble,
xleftmargin=20pt,
linenos
}
\begin{document}
\begin{listing}[ht]
\begin{minted}{dockerfile}
FROM java:8
ADD example-app-1.0.jar app.jar
EXPOSE 8761
ENTRYPOINT ["java", "-jar", "/app.jar"]
\end{minted}
\caption{Simple \texttt{Dockerfile} example.}
\label{lst:example-docker}
\end{listing}
\end{document}
Running :verbose set commentstring
gives the following output:
commentstring=# %s
Last set from ~/dotfiles/config/nvim/plugged/vim-polyglot/syntax/dockerfile.vim line 42