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. 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.
Fulvio
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
Il giorno ven, 12/04/2024 alle 16.49 +1000, Lex Trotman via Users ha scritto:
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?
It's not recognized and I have to force it to have some highlighting. But definitely it is behaving the FreeBasic one.
8<----------8<----------8<----------
Without visibility of your filetypes file its not possible to advise further.
Ok, I tought it was somehow necessary, but I didn't know which preferred mode was permitted.
The file are here https://drive.google.com/file/d/1u5k7hJYZC3VAhiGbz0tM4JRl64FxPeLj/view?usp=s... to inspect. Including a sample file. I presume it won't be a problem if the archive is a 7zip file.
Cheers Fulvio
On Fri, 12 Apr 2024 at 17:44, Fulvio via Users users@lists.geany.org wrote:
Il giorno ven, 12/04/2024 alle 16.49 +1000, Lex Trotman via Users ha scritto:
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?
It's not recognized and I have to force it to have some highlighting. But definitely it is behaving the FreeBasic one.
Since keyword lists are loaded from the filetype, if the filetype is not correct clearly the word lists will not be correct.
8<----------8<----------8<----------
Without visibility of your filetypes file its not possible to advise further.
Ok, I tought it was somehow necessary, but I didn't know which preferred mode was permitted.
The file are here https://drive.google.com/file/d/1u5k7hJYZC3VAhiGbz0tM4JRl64FxPeLj/view?usp=s... to inspect. Including a sample file. I presume it won't be a problem if the archive is a 7zip file.
This is not accessible, please place the files online, preferably individually via Github Gist https://gist.github.com/ as requested, not as a zip.
Cheers Lex
Cheers Fulvio _______________________________________________ Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
Il giorno ven, 12/04/2024 alle 18.03 +1000, Lex Trotman via Users ha scritto:
This is not accessible, please place the files online, preferably individually via Github Gist https://gist.github.com/%C2%A0as requested, not as a zip.
Currently I'm unaware to use the github, so It would take some time to learn how to handle the file in github.
So for the moment the file is available as zipped one. https://github.com/Fulvio57/DataShare/blob/main/geany-PBasic_file.7z
If such condition doesn't fullfil the specification, I'll try soon to post the files in a plain text.
Cheers
Fulvio