The idea is this: If a gnu / linux distribution that includes GEANY wants to include some customized snippets, just add the "snippets-distro.conf" file next to "snippets.info" of the system with a package. snippets will be added, to then load the user's personal in /home/user/.config/geany It is a way for those who distribute Geany to incorporate their own snippets. In the case of Huayra gnu / linux, we added a pair that are used with the PILAS-ENGINE framework, for game development. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1866
-- Commit Summary --
* extra-custom-distro snippets support #1859
-- File Changes --
M src/editor.c (61)
-- Patch Links --
https://github.com/geany/geany/pull/1866.patch https://github.com/geany/geany/pull/1866.diff
johndescs requested changes on this pull request.
I'm not a Geany dev, but I'm not sure why this behaviour would be desirable. Since Geany already has a mechanism for the users to override the default snippets, one would expect the packager to use the tools of their package-building system to change the file directly in-place (for example, Quilt, which would keep a patch and ensure that it applies correctly when upstream changes are made).
@@ -149,6 +149,39 @@ static void snippets_load(GKeyFile *sysconfig, GKeyFile *userconfig)
} g_strfreev(groups_sys);
+ /* now read defined completions in DISTRO's configuration directory and add / replace them */
This duplicates a lot of code.
@@ -4748,10 +4791,6 @@ on_editor_scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer user_d
{ GeanyEditor *editor = user_data;
- /* we only handle up and down, leave the rest to Scintilla */
What's the point of this? Maybe belongs to some other modification set?
In general if a distro has extra snippets it thinks are generally useful it would be better if it made them to the system `snippets.conf` _and contributed them upstream_ rather than keeping them to themselves.
If a distro has additions that are specific to its particular focus (such as this case would appear) as @johndescs commented, it can modify `snippets.conf` as part of its building Geany packages. Most distros make and track modifications to suit their particular requirements.
ok, tnks
Closed #1866.
github-comments@lists.geany.org