Bug 442029 - [Feature request] Add file exclude options for quick open
Summary: [Feature request] Add file exclude options for quick open
Status: RESOLVED NOT A BUG
Alias: None
Product: kdevelop
Classification: Applications
Component: UI: QuickOpen (show other bugs)
Version: 5.6.2
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-05 11:24 UTC by geisserml
Modified: 2021-09-05 18:05 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description geisserml 2021-09-05 11:24:34 UTC
SUMMARY
Quick open is a useful feature. However, I am missing an option to exclude certain directories or file extensions.
For example, my repository contains Sphinx documentation, and quick open also shows all documentation build artifacts. This can be quite problematic: If I have a file named `api.rst`, building the docs would also generate an artifact named `api.rst.txt`. Now it could happen that you accidentally open and edit the `.txt` file which has the same content as the `.rst` equivalent, but it will be overwritten with the next build cycle and all changes are lost.
So it would be quite helpful to be able to exclude the build directory from quick open, not only to prevent inadvertently opening the wrong file, but also to get a cleaner overview. My quick open panel is often spammed with compiled objects.

STEPS TO REPRODUCE
1. Clone a repository that contains Sphinx documentation
2. Import it into KDevelop
3. Build the documentation (`make html`)
4. Trigger quick open

OBSERVED RESULT
All documentation build artifacts will show up.

EXPECTED RESULT
Only relevant project files should be displayed. Therefore, an option in the settings would be required to exclude certain file types or directories. (Alternatively, though more complex, it could also be possible to read the .gitignore file and not show objects that aren't part of the revision control, but as KDevelop also supports versioning systems other than git this might not be a straightforward solution.)

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.22
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.3
Kernel Version: 5.11.0-27-generic (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Since KDevelop is a large application, the option I am requesting might already exist at some hidden place. If so, please point me at it and forgive the false issue :)
Comment 1 Sven Brauch 2021-09-05 11:54:23 UTC
Hi,

unless you want files to be excluded from QuickOpen but still part of the project, this already exists: Right-click your project, click "Open configuration", and go to "Project filter".

Greetings!
Comment 2 geisserml 2021-09-05 11:57:19 UTC
Aha, thank you!
I only searched the settings and the plugin, but overlooked the project configuration.
Comment 3 Francis Herne 2021-09-05 12:09:51 UTC
Note: you can also quickly exclude a single file or directory from the Projects toolview: right-click -> "Exclude Item from Project".

The filter dialog is better if you want to exclude many files matching some pattern.
Comment 4 geisserml 2021-09-05 18:05:32 UTC
Thanks for the help! I'm rather new to KDevelop and haven't unraveled its full capabilities yet.