Is it possible to have something like that for Geany:
https://jamie.ideasasylum.com/2014/08/05/ansible-syntax-highlighting-sublime...
This would save a lot of time while being gorgeous but I don't know how to proceed to make it happen or if it has been done already
Syntax highlighting is provided by the Scintilla editing widget we use which is a separate [project](https://www.scintilla.org/). So you should add it there first.
Hmm I don't understand. Am i supposed to do something with that scintilla thing?
At a quick read of the link you posted it looked to me like Ansible is an extended version of YAML.
If thats right then any extended syntax needs to be recognised by the lexers to be highlighted, and the lexers are part of the Scintilla project. So in that case thats where to propose the addition first.
If thats not the case you need to explain what the difference is, and what you actually want to do, rather than expecting others to educate themselves on the language and/or on a different tool just to help you.
I supposed you guys would know about YAML (but I am new to this thing too).
Well, first of all I think that the YAML highlighting is very scarce. There is practically no highlighting (only the ":" I guess). And yes, ansible files are specific YAML files so they can be improved like on the link I gave but I have no idea how, I searched before and found nothing.
I don't know anything about lexer, scintilla, whatever, so maybe do you have a tutorial so I can do it alone ? That scintilla site makes me flee screaming
I guess it's not really that simple and will never happen tho
Well, lexers are in the "lexers" directory of the Scintilla code and the YAML one is `LexYAML.cxx`, but they are C++. So unless you are C++ literate you will probably be better off simply asking there. And anyway even if you can make the changes yourself you need to submit it to Scintilla to get it into Geany, so its best to check Scintilla will accept the changes before doing lots of work.
Too bad I don't have a sourceforge account then
I've opened a request upstream.
https://sourceforge.net/p/scintilla/feature-requests/1271/
https://github.com/geany/geany/pull/1838
https://github.com/geany/geany/pull/1838
any news?
@MikePryadko if you looked at the link above you would see that a PR was offered upstream, but it has not been merged by upstream Scintilla yet.
Are we sure this is a problem with Scintilla? I opened my yaml file in SciTE and saw that keys are being correctly highlighted.
![Screenshot from 2021-02-28](https://user-images.githubusercontent.com/38678140/109444842-2aba9800-7a0c-1...)
This made me think, maybe with the right config, I could have highlighted keys in Geany, too. I manually modified `filetypes.yaml` as suggested in this PR https://github.com/geany/geany/pull/1838 and found that it worked!
![Screenshot from 2021-02-28 filetypes](https://user-images.githubusercontent.com/38678140/109445018-9bfa4b00-7a0c-1...)
Could have saved me a bunch of research if Geany had this by default!
@wavepack3t this issue is about ansible specific YAML syntax not plain Yaml. The problems with #1838 should be discussed there.
github-comments@lists.geany.org