Skip to content
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

Geany does pick up the correct filetype extension for syntax highlighting. #1657

Open
rovf opened this issue Oct 23, 2017 · 2 comments
Open

Comments

@rovf
Copy link

rovf commented Oct 23, 2017

Using Geany 1.30.1 on Windows 7:

In order to recognize files such as .irbrc or private_irbrc as a Ruby files when it comes to syntax highlighting, I have opened Tools/ConfigurationFiles/filetypes_configuration.conf and changed the line for the Ruby file extensions to

Ruby=*.rb;*.rhtml;*.ruby;*.gemspec;Gemfile;rakefile;Rakefile;*irbrc;.irbrc;

However, the file .irbrc is still not considered as Ruby-File, but as file of type "Conf". Looking up the definition of the "Conf" file type, I find the line

Conf=*.conf;*.ini;config;*rc;*.cfg;*.desktop;*.properties;

This doesn't make sense! The file name ".irbrc" obviously does not match any of the pattern in the "Conf" definition! Why is Geany picking up the wrong file type here?

@elextr
Copy link
Member

elextr commented Oct 23, 2017

Tools/ConfigurationFiles/filetypes_configuration.conf

No such thing, I presume you mean Tools/ConfigurationFiles/filetype_extensions.conf

The Conf pattern *rc (which is for the various types of rc files used during system startup) will also match .irbrc, since that is "some characters that end in rc". The patterns are intended to be distinct, if they overlap the first to match will win, which I think is the nearest to the top in the list (or it might be lowest alphabetical filetype name, havn't checked).

@elextr
Copy link
Member

elextr commented Oct 23, 2017

Just to add, if you don't want the Conf match just delete that pattern, you will have to set filetype manually if you ever edit those files, but your Ruby will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants