Background/Situation
There are projects with complex directory hierarchy, so that Rider doesn't always index all the necessary files by default. On the other hand, it might index files that a user does not wish to use/to navigate to/to be indexed.
Question
How to explicitly specify what files and directories need to be indexed and what don't need?
Answer
User can include and exclude files and folders by right-clicking on it in explorer -> Tools -> Start/Stop Index:
.
Performing this action commonly (but not always) writes to .idea/.idea.ProjectName/.idea/indexLayout.xml .
There is what this file looks like:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes>
<Path>AvaloniaApplication1/bin</Path>
<Path>AvaloniaApplication1/obj/project.nuget.cache</Path>
</explicitIncludes>
<explicitExcludes>
<Path>AvaloniaApplication1/App.axaml.cs</Path>
</explicitExcludes>
</component>
</project>
If for some reason, one can't specify files/folders via UI, he can go to that file and specify files/folders "from backend":
- Add corresponding entries into .xml and save changes;
- Note: File doesn't accept wildcards (
**/*.yml) -> no way to specify pattern or file types; The entry should be either a path to an exact file nor a path to an exact folder.
This file can be committed to VCS, so every developer cloned the project will get the same file indexing configuration.
When a folder for indexing is specified, any file under that folder will be indexed and become available for search/navigation (unless the file type is listed in Settings | Editor | File Types | Ignored Files and Folders)
Comments
0 comments
Please sign in to leave a comment.