A more appropriate highlighting for keys in YAML files. The improvement can be noticed in any color scheme, particularly in the default one, where keys would have the same color and face than the ordinary text. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1838
-- Commit Summary --
* Better highlighting for YAML keys
-- File Changes --
M data/filedefs/filetypes.yaml (1)
-- Patch Links --
https://github.com/geany/geany/pull/1838.patch https://github.com/geany/geany/pull/1838.diff
b4n commented on this pull request.
@@ -11,6 +11,7 @@ document=preprocessor
text=string_1 error=error operator=operator +identifier=keyword
You should *replace* the existing value (L6), not add a new one to override it.
I'm not sure I like it, because it seems to remove some semantics of the styles. Also, it'd style keywords (true, false, …) the same way now. I agree that the fact most color schemes style identifiers the same as "no style" is sad in the case of YAML, but I'm not sure this is the best solution. Would `type`, `function` or `label` work better?
Ha! I didn't notice identifier in line 6, sorry.
`type` works well, the other two options look worse in my opinion, but at least they would also be different from plain text. Should I close this and submit a new pull request with these two modifications?
Should I close this and submit a new pull request with these two modifications?
Just add the changes to this PR please.
@FMuro pushed 1 commit.
f9f9cda highlighting keys
Change was made after @codebrainz 's comment. Is there something else todo here?
I guess waiting for the dissenter (@b4n) to look at it and see if they are happy with it.
https://github.com/geany/geany/issues/1853
https://github.com/geany/geany/issues/1853
Hi! Will be this PR merged..??? 21st century in the yard, but Geany can't highlight YAML... :neutral_face:
![geany_yaml](https://user-images.githubusercontent.com/31248040/86011212-19f0f700-ba25-11...)
My version is from Ubuntu's repo: 1.32 (built on or after 2018-08-01)
As @b4n said, this actually does the wrong thing, it would be better to wait for #1853 to do the right thing.
Note nothing stops you changing it in you own copy in the meantime, `Menu->Tools->Configuration files->Filetype Configuration->Miscellaneous->filetypes.yaml` will open the file, you make the one line change and save and it will be saved to your user configuration.
It doesn't do the wrong thing. That complain was fixed and there hasn't been more complains. As two people, apart from myself, have already said, this patch could be merged and it would be an improvement.
@FMuro sorry for the delay simply missed your comment above, just ping if you don't get responses in a few weeks and you are still interested, there is such a thing as being _too_ patient waiting 6 months :grin:
What I meant (and I presume @b4n meant) by "does the wrong thing" is that it mixes semantics by using "type" for "identifiers". The "proper" fix is for the Scintilla lexer to style keys as something else than "identifier", and the notebook++ lexer offered on the Scintilla issue from #1853 seems to do that, adding a new "key" semantic. But AFAICT that new lexer hasn't happened yet.
On the other hand YAML does not have the concept of "type" so if it suits YAML users I guess it can't hurt to use "type" highlighting for "identifiers" which means keys IIUC. @b4n any comment, or will merge in a week or two.
.. , or will merge in a week or two.
Uh yeah, that would be great :)
Looks like the offer of a better YAML lexer [here](https://sourceforge.net/p/scintilla/feature-requests/1271/) didn't get enough interest.
As there have been no objections, will merge.
Merged #1838 into master.
github-comments@lists.geany.org