reproducible with Gentoo config files in /etc/portage. If /etc/portage/package.* are directories the config files inside usually don't end with any of the keywords mentioned in the gentoo.nanorc. If you are inside e.g. /etc/portage/package.use and simply call "nano app-editors.conf" the fileregex does not match and syntax highlighting is not activated. Solution: nano should match the fileregexp against the absolute file name.
i've moved this to the upstream bug tracker as it's not something we can fix i the nanorc files themselves