New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project Organizer: Add option/ability to set filetype of header files? #1121
Comments
Yeah, I think (1) should be doable quite easily. There would always be a problem if there is both I don't remember the Geany API exactly and implementing this feature would require that Geany allows plugins to specify the filetype that should be used to open the files but I believe there is such a function. I'll have a look at this when I have time - should be quite easy to implement. |
|
@techee Thanks for your response. I opened a PR that implements this feature. #1122 It first looks for files in the same directory. It should be rare for there to be a |
@techee
I opened a similar issue at geany/#2946. I was informed that the feature might be a better fit with one of the project-related plugins. Since the Project Organizer already has some file extension-related settings, setting filetype for ambiguous header files may be within its scope.
The issue is that
.h
files are ambiguous with respect to C and C++. Identifying the right type most visibly affects syntax highlighting. But it may also affect whether class structures and other symbols are correctly identified.Many header files have corresponding source files. When a pair is found, the header type can be changed if needed.
Projects may have sufficient information about file locations to find related files in separate directories?
If pairing files is too troublesome, or wasteful of cpu cycles, whichever language predominates the project could be used.
The project organizer could have a setting that identifies the main project language. Ambiguous header files could then be set accordingly.
What do you think? Any other ideas?
The text was updated successfully, but these errors were encountered: