[edit] Overleaf guides

[edit] LaTeX Basics

[edit] Mathematics

[edit] Figures and tables

[edit] References and Citations

[edit] Languages

[edit] Document structure

[edit] Formatting

[edit] Fonts

[edit] Presentations

[edit] Commands

[edit] Field specific

[edit] Class files

The minted package provides automatic syntax highlighting for source code listings—here's an example showing how to use it. It uses the excellent pygments highlighter, which provides very high quality highlighting for wide range of languages (click on this link to view the full list).