On Fri, 12 Apr 2024 at 15:43, Fulvio via Users users@lists.geany.org wrote:
Hi folks, I'm trying to accomplish to have a particular highlight for a basic compiler. I could accomplish such option for Kate an Notepad++ (partially). I set geany up for Archlinux in Xfce4 desktop environment.
I've, then copied the freebasic and I tried to change the keyword list, for the four available items. Since I discovered that Scintilla lexer has only "Keywords", "Preprocessor", "User1" and "User2" items. Despite that the compiler has some more items (they are seven), but I will merge some of the extra items to the four ones.
So I copied the /usr/share/geany/filedefs/filetypes.freebasic in ~/.config/geany/filedefs/ with the new name. Then I substitute the freebasic keywords for keywords items, I dded lexer_filetype=FreeBasic. Added also the name in the filetype_extensions.conf, without ommenting.
I realised to make the new highlighter appear on the selection menu, but my source code doesn't show any keyword highlighted, just only the numbers and the single-line comments are visible.
If some lexical entities are highlighted that shows some lexing is happening, but just to confirm is the correct filetype shown on the Geany status bar?
I was trying to set the position near to the freebasic, as filetype selection menu, but I could only obtain to show on top of the menu.
I noted that the lines for the keywords exceed the 5760 columns for the line. So it seems that the keywords setting is not applied.
I am not aware of there being any limit on the length of the word lists in the filetypes file or in Geany or Scintilla.
Without visibility of your filetypes file its not possible to advise further. You can paste it to a Gist and post a link here rather than attaching it to an email (and do not include it in the email text, mailers may clip it or generate other artifacts).
Cheers Lex
Fulvio
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org