This commit adds TOML configuration language support to Geany. It uses the recently merged Scintilla TOML lexer; for ctags parsing it uses the conf file parser which works reasonably well for TOML as well.
See https://github.com/ScintillaOrg/lexilla/pull/261
Fixes #1268 You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3934
-- Commit Summary --
* Add TOML support
-- File Changes --
M data/Makefile.am (1) A data/filedefs/filetypes.toml (57) M data/filetype_extensions.conf (1) M meson.build (1) M scintilla/Makefile.am (1) M scintilla/lexilla/include/SciLexer.h (16) A scintilla/lexilla/lexers/LexTOML.cxx (486) M scintilla/lexilla/src/Lexilla.cxx (2) M scintilla/scintilla_changes.patch (1) M src/filetypes.c (1) M src/filetypes.h (1) M src/highlighting.c (11) M src/highlightingmappings.h (27)
-- Patch Links --
https://github.com/geany/geany/pull/3934.patch https://github.com/geany/geany/pull/3934.diff
@techee: There is a TOML parser in ctags, it was merged last week: https://github.com/universal-ctags/ctags/pull/3509 It should be possible to use it after next ctags update (it is not officially released yet).
@dolik-rce Thanks for the info. For now at least I think we'll stick with the ini parser - see my reply in https://github.com/universal-ctags/ctags/pull/4052
For now at least I think we'll stick with the ini parser
Probably good idea nearing a release, import the ctags parser (and peg infrastructure) with the next ctags update after release.
On the topic of speed, given the usual size of TOML files its probably not greatly important.
Probably good idea nearing a release, import the ctags parser (and peg infrastructure) with the next ctags update after release.
I think there's no peg infrastructure - the peg parser generator generates a completely self-contained and standard ctags parser.
Maybe it's completely irrational but I'm kind of worried about the unreviewable and undebuggable code we'd have to include to Geany for PEG parsers. For TOML it's about 5000 LOC C blob.
@techee pushed 1 commit.
39a9f53314d628eeab413b1fd5d6c8a96d86e030 Modify iniconv parser to allow . and - in keys
@techee pushed 1 commit.
cb86e33b60c38cd3a6301f27b34278ad8d623471 Fix spaces between dots incorrectly marked as errors
I think there's no peg infrastructure - the peg parser generator generates a completely self-contained and standard ctags parser.
Its a build time thing IIUC, don't we have to include and build packcc since it doesn't seem to be packaged by debuntumint at least.
@techee pushed 2 commits.
704c6c232fe278a1f7782a272c5de3bc85337db2 Add TOML support 9eacd84381c1e8efcf4b3bb4a67b1c44c77d4818 Modify iniconv parser to allow . and - in keys
@techee pushed 3 commits.
812bd50c3cfc86e6c138b27c49685756d4278d84 Add TOML support a931f141f9606afbf44e21258fd1c10f5141a931 Modify iniconv parser to allow . and - in keys a6bdde030459aa29a369b8f8f93b007d1708c813 Fix scintilla_changes.patch
@techee pushed 1 commit.
b1fbd7e43fd93828cec434df19bfc799a957a030 Use the latest SciLexer.h from lexilla
@techee pushed 2 commits.
5d0c388a71ca865572d4a6ab94ec4b7fce6462c2 TOML: Don't treat keys without values as errors 94cd13e2c774220697471f6f32cf7b0ff66e7bac iniconf: some more adjustments for parsing TOML
@techee pushed 2 commits.
e61e6ca961a7c5921eaa291f2b93d4b1b5dce6dc Add TOML support 0586c16031391594c2fb6e8b94114a7be5cec6ce iniconf: some adjustments for parsing TOML
@b4n Have you had a chance to look at the TOML PR? (Since you added the 2.1 milestone, I suppose you are eager to have it in Geany :-P).
I've just rebased it on top of the master so there are no conflicts and squashed the commits a little.
@techee no I didn't and actually don't have a clue about TOML. I'll try to give it a test but it'll be worth little 🙂
Not sure why I added the milestone, possibly either by mistake or because I thought it was about to get merged -- I add those to merged PRs to ease tracking and making release notes.
github-comments@lists.geany.org