You need to add technology (I think it's called - maybe a facet).
When creating a web module project, you can choose additional technologies. JSF is an option for the Web. Under the JSF node, there is a sub-node with four- Primefaces technology, one of which is Primefaces (the others are IronFaces, RichFaces and others).
When you select the desired support option, IntelliJ IDEA will download the required libraries and add them to an existing or new library.
I believe that this functionality is only available in the full version; i.e. not Community Edition.
source share