#902 secondary keyword does not work for Golang

None
closed-invalid
nobody
Filetypes (68)
Unknown
3
2013-07-23
2012-10-17
Anonymous
No

I added golang syntax highlighting according to this: http://go-lang.cat-v.org/text-editors/geany/

It worked very well in geany 0.21, after I upgraded to Ubuntu 12.10, and geany to v1.22, secondary keywords does not get highlighted anymore. The debug info from geany is:

09:38:18: Geany INFO : Geany 1.22, zh_CN.UTF-8
09:38:18: Geany INFO : GTK 2.24.13, GLib 2.34.0
09:38:18: Geany INFO : System data dir: /usr/share/geany
09:38:18: Geany INFO : User config dir: /home/xrfang/.config/geany
09:38:20: Geany INFO : System plugin path: /usr/lib/x86_64-linux-gnu/geany
09:38:20: Geany INFO : Added filetype Scala (53).
09:38:20: Geany INFO : Added filetype Cython (54).
09:38:20: Geany INFO : Added filetype Genie (55).
09:38:20: Geany INFO : Added filetype Go (56).
09:38:22: Geany INFO : /home/xrfang/github/mailing_list_daemon/src/smtp/session.go : Go (UTF-8)
09:38:22: Geany INFO : Bad color 'commentdoc'
09:38:22: Geany INFO : Bad color 'keyword2'
09:38:22: Geany INFO : Bad color 'extra'
09:38:22: Geany INFO : Bad color 'stringeol'
09:38:22: Geany INFO : Bad color 'extra'
09:38:22: Geany INFO : Bad color 'extra'
09:38:22: Geany INFO : Bad color 'extra'
09:38:22: Geany INFO : Unknown named style 'commentdoc'
09:38:22: Geany INFO : Unknown named style 'commentdoc'
09:38:22: Geany INFO : Bad color 'commentdoc'
09:38:22: Geany INFO : /home/xrfang/github/mailing_list_daemon/src/mld.go : Go (UTF-8)
09:38:22: Geany INFO : /home/xrfang/github/mailing_list_daemon/src/smtp/settings.go : Go (UTF-8)
09:38:22: Geany INFO : /home/xrfang/github/mailing_list_daemon/src/log4g/syslog.go : Go (UTF-8)
09:38:23: LIBDBUSMENU-GTK CRITICAL : watch_submenu: assertion `GTK_IS_MENU_SHELL(menu)' failed

geany -V outputs:

geany 1.22 (生成于 Jun 21 2012,库版本 GTK 2.24.10, GLib 2.33.2)

Discussion

  • Matthew Brush
    Matthew Brush
    2012-10-17

    It looks like from your debug messages you're using some old-style custom color scheme maybe. Did you try other filetypes or just your Go one? If it's a color scheme issue, you could remove any old-style color schemes/filetypes from your ~/.config/geany directory and try using the defaults that come with Geany and then add your custom Go filetype the way you did before. Color schemes and filetypes changed a lot in 1.22 so stuff from 0.22 in your ~/.config/geany directory may no longer be compatible.

     
  • As you pointed, Go filetype isn't distributed with Geany, so we can't really know how yours is actually defined. As codebrainz pointed colorscheme changed quite a bit in 1.22, and maybe your custom filetype is using an old version of it.

    You can probably get this fixed by re-creating the Go filetype as your link describes. However, for better compatibility, you could replace the whole [styling] section with [styling=C]; which will make your filetype inherit the styling from the C filetype, which is wanted if using the C lexer.

    If this doesn't help, please attach your filetypes.Go.conf file so we can see what's wrong.

    PS: and please, read the banner on the ticket submission page telling you not to touch the Group field, thanks.

     
    • milestone: 3508874 -->
    • priority: 5 --> 3
    • status: open --> pending
     
    • status: pending --> closed-invalid
    • Found in: --> Unknown
    • Fixed in: --> None