Bug 360094

Summary: Follow Tools -> Highlighting to select parser, when set by user.
Product: [Applications] kdevelop Reporter: Francis Herne <mail>
Component: generalAssignee: kdevelop-bugs-null
Status: REPORTED ---    
Severity: wishlist    
Priority: NOR    
Version First Reported In: 4.90.91   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Francis Herne 2016-03-04 22:43:10 UTC
At present, the parser to use for a given file is chosen using only KDE's mimetype database. 
This can fail to detect a filetype, or select an incorrect one, and there's no way for the user to override this.

The Tools -> Highlighting menu selects the language for KTextEditor's own highlighting; it's set initially based on the autodetected mimetype but can be overridden by the user.

If KDevelop followed this setting when choosing, it would provide the same behaviour as now (I think?) except where the user explicitly set a different mimetype which would presumably be more-correct.

Reproducible: Always

Steps to Reproduce:
1. Open something with the wrong file-type autodetected.
(e.g. NML files as per https://bugs.kde.org/show_bug.cgi?id=360081)

2. Watch KDevelop use the wrong parser on it, with no means to override.
3. Set Tools -> Highlighting to the correct file-type.

Actual Results:  
KDevelop ignores the setting and continues to use the wrong parser.

Expected Results:  
KDevelop follows the setting, and uses a different (correct) parser or none at all.