How to preview latex (.tex) files in IntelliJ like at https://www.sharelatex.com/ ?
You can try the TeXiFy plugin. The full instructions to compile .tex
(LaTeX) files are in the GitHub readme.
A very short summary of those instructions in the case you know what you're doing:
.tex
files using the button which appears next to the \begin{document}
line.[Edit] Automatic compilation is also supported: https://github.com/Hannah-Sten/TeXiFy-IDEA/wiki/Automatic-compilation