Not sure if I am using the correct terminology. I can select lexer type ok, for log files, only one shows: Log files ^
But clicking the lexer properties button works on other file types but does nothing for log files. How do I fix this?
Thanks.
Unable to edit log file lexer properties
Unable to edit log file lexer properties
Live for an ideal and leave no place in the mind for anything else.
-
main Alexey
- Posts: 3197
- Joined: 25.08.2021 18:15
Re: Unable to edit log file lexer properties
not a bug.
'Log files ^' means it is LITE lexer.
Wiki: https://wiki.freepascal.org/CudaText#Lite_lexers
LITE lexers do not have config-dialog for them, so app does nothing. from next update 1.236.x.y, app will show the error-msgbox about this fact, when you call 'Lexer properties' for lite lexer.
'Log files ^' means it is LITE lexer.
Wiki: https://wiki.freepascal.org/CudaText#Lite_lexers
LITE lexers do not have config-dialog for them, so app does nothing. from next update 1.236.x.y, app will show the error-msgbox about this fact, when you call 'Lexer properties' for lite lexer.
Re: Unable to edit log file lexer properties
oh ok. Is it possible to add a lexer properties for Log files? Thank you.
Live for an ideal and leave no place in the mind for anything else.
Re: Unable to edit log file lexer properties
I didnt mean for you to do so, I meant can I add a new one? How do i go about it? Do I put them in the lexlib folder and they are automatically read on startup? Do they persist on updates, ie do not get deleted?
Thanks for your help.
Thanks for your help.
Live for an ideal and leave no place in the mind for anything else.
-
main Alexey
- Posts: 3197
- Joined: 25.08.2021 18:15
Re: Unable to edit log file lexer properties
- you cannot add 'lexer props' dialog for _lite_ lexers. lite lexers don't have props which we need to change.
- lite lexers are in the data/lexliblite subfolder. yes they persist on updates. no, user cannot copy them to data/lexlib, because file format of usual lexers is different (usual lexers - .LCF ; lite lexers - .JSON).
- lite lexers are in the data/lexliblite subfolder. yes they persist on updates. no, user cannot copy them to data/lexlib, because file format of usual lexers is different (usual lexers - .LCF ; lite lexers - .JSON).
Re: Unable to edit log file lexer properties
ok, I understand, but I meant can they be created from scratch?
Live for an ideal and leave no place in the mind for anything else.
-
main Alexey
- Posts: 3197
- Joined: 25.08.2021 18:15
Re: Unable to edit log file lexer properties
of course, lite lexers can be / must be created from scratch. just make the similar JSON blocks, similar to existing lexers.
Re: Unable to edit log file lexer properties
lol, sorry for the confusion, I mean can I make new lexers that can be edited so I can edit their properties in the lexlib folder?
In other words, create two new files:
Log.cuda-lexmap
Log.lcf
So they can be used as a typical lexer and allow editing of their properties as normal. Can that be done?
Thanks.
In other words, create two new files:
Log.cuda-lexmap
Log.lcf
So they can be used as a typical lexer and allow editing of their properties as normal. Can that be done?
Thanks.
Live for an ideal and leave no place in the mind for anything else.
Re: Unable to edit log file lexer properties
Worked a treat! Thanks Alexey! 
Live for an ideal and leave no place in the mind for anything else.
-
main Alexey
- Posts: 3197
- Joined: 25.08.2021 18:15
Re: Unable to edit log file lexer properties
of course, you can make a new lexer in LCF format. for any format, for LOG too.
example existed here:
https://github.com/CudaText-addons/Cuda ... r/Logfiles
(it highlites special words in LOG files, in german lang too; author is German man)
but, if user opens a 500MB log-file with .LCF lexer, work will be very slow, even if user will change option "ui_max_size_lexer" to 501.
example existed here:
https://github.com/CudaText-addons/Cuda ... r/Logfiles
(it highlites special words in LOG files, in german lang too; author is German man)
but, if user opens a 500MB log-file with .LCF lexer, work will be very slow, even if user will change option "ui_max_size_lexer" to 501.