But for that, the user of geany has to know source code of lexilla :-( From the beginning of use of geany, I miss some function to let me show, what wordlists, sytles and porperties are available for configuration within config files.
I think the problem exists only for properties, right? For wordlists and styles users see what's available.
For all of this, user has to know, which properties are available, what means again he has to read source of Lexilla.
For properties I agree and I think it would be good to list all of them somewhere - we could e.g. put all of them in filetype config files, commented out, or, if I remember correctly, @eht16 made some script to list them in documentation in some PR that got long forgotten. Maybe good idea to revive it.
lexer CPP currently has defined 6 keyword lists. In highlightingmappings.h there is entry only for 0 primary 1 secondary and 2 docComment. The drawback extends deep into the source code. For example, here geany uses wordlist 3:
Basically I think nobody from Geany developers (or even users) needs 6 keyword groups so only 3 are defined. If there's a need, we may add more.
This let me fret about my needs. I've been working on some kind of universal lexer, supporting some dozen of styles and word lists. Did I miss soming? Your statement makes me hesitate to finish it for publication.
We were talking about the C lexer which defines more wordlists than Geany uses and where I don't see much need to add more. (But of course if there's such a need, more can be added, I just haven't seen any user's requests in this regard.)
If you have a lexer where there's a legitimate need for 100 keywordlists, those can be added. I'm just wondering, if that is a good approach.
Assuming you are creating some universal lexer that uses e.g. some grammars for lexing. Then, instead of having tons of keywords from different languages in a single (fake) filetype for this lexer, it would be better to use this lexer for one filetype only, and define all other filetypes as external, similarly to what Geany does e.g. for JSON which reuses the Javascript lexer:
https://github.com/geany/geany/blob/master/data/filedefs/filetypes.JSON.conf
You can inherit stuff from the parent lexer, but you can also completely redefine styles, properties, or wordlists in such filetype definitions. Then, you don't need a universal wordlist set containing keywords from all languages, but only a set of say 4 wordlists which each language redefines based on its needs.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.