17

My Project View in CLion lists not only C++ files and headers but also built libraries (.la) and object files (.o). I don't want to see them. What can I do to make them not appear in the list?

rwst
  • 2,515
  • 2
  • 30
  • 36

3 Answers3

31

In the menu go to Files/Settings: in the dialog box chose the item File types. The last field in the dialog is Ignored files and folders. It contains semicolon-separated patterns that will be applied and, if the file matches one of these, ignored. Wildcards like * are allowed.

So just add ;*.la;*.o at the end.

rwst
  • 2,515
  • 2
  • 30
  • 36
3

You can also define a so-called "Scope" by clicking on the gear icon at the right of the project view's header bar -> "Edit scopes". This will present you with a nice ui to define your filter. Afterwards, click on the triangle next to "Project" in the project view header bar and select your newly created scope.

suluke
  • 683
  • 5
  • 14
1

If you are using version control(git) you can also add the file extensions to the .gitignore file and Clion should hide those files as well. If you're not using version control then adding the file extensions to the Clion Ignored files and folders list.