zhgzhg / geany-json-prettifier Goto Github PK
View Code? Open in Web Editor NEWA JSON formatter prettifier, minifier and validator plugin for Geany editor
License: GNU General Public License v2.0
A JSON formatter prettifier, minifier and validator plugin for Geany editor
License: GNU General Public License v2.0
There is error in make localinstall command
rm -f /home/maktub/.config/geany/plugins/jsonprettifier.so
cp -f ./jsonprettifier.so /home/maktub/.config/geany/plugins
chmod 755 /home/maktub/.config/geany/plugins/jsonprettifier.so
chmod: cannot access '/home/maktub/.config/geany/plugins/jsonprettifier.so': Not a directory
make: *** [Makefile:42: localinstall] Error 1
With Geany 2.0, the plugin no longer works out of the box.
jsonprettifier_x86_64.dll is not binary compatible with this release of Geany - please recompile it.
If this requires more than renaming (Geany only supports 64 bit with v2 now), could you please release a new version intended for 2.x releases but still keep the older version available for 1.x releases as well?
I think the indent preference should be taken from filetype configuration or geany configuration if available. It would also be nice to have indent preference entry.
Hello!
Just wanted to document that after successfully building the plugin with "make", "make install" fails with the following output:
rm -f "/geany/jsonprettifier.so"
rm -f /geany/jsonprettifier.*
rm -f /geany/json_prettifier.*
cp -f ./jsonprettifier.so "/geany/jsonprettifier.so"
cp: cannot create regular file '/geany/jsonprettifier.so': No such file or directory
make: *** [Makefile:38: globalinstall] Error 1
I simply created the directory and copied the file
pi@raspberrypi:~ $ sudo mkdir /usr/lib/geany
pi@raspberrypi:~ $ sudo cp ./jsonprettifier.so /usr/lib
You might want to fix it or people could just use this workaround.
Thanks!
No error output on build
so how to use on geany GUI / menu as it's not found one, ie. just as if no effect on it ?
Package geany was not found in the pkg-config search path.
Perhaps you should add the directory containing `geany.pc'
to the PKG_CONFIG_PATH environment variable
No package 'geany' found
./geany_json_prettifier.c:33:10: fatal error: geanyplugin.h: No such file or directory
33 | #include <geanyplugin.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:29: build] Error 1
I installed cmke from CLI
Geany isn't installed from CLI
Hi. I installed the plugin using make, make install as the instructions say.
When I try to beautify valid JSON text I get the following error:
lexical error: invalid char in json text.
{'server.port': 10443, 'serv
(right here -----^
It seems like r is the invalid character, but if I move the json values around, the error is still the same. Seems like the 3rd character in the first json key is allways invalid.
I've been looking for such plugin for many years and it would be awesome to get it working.
Does this plugin support Geany in Windows? Is there a precompiled dll somewhere for it? I would love to use this plugin in Windows for Geany if possible!
Please let me know.
Couldn't install this plugin.
At first I had to install 'libgtk2.0-dev' in order to run command make
successfuly (this should be indicated in README)
So I installed it with command: sudo apt-get install libgtk2.0-dev
Then I had this issue when running sudo make install
:
rm -f /usr/lib64/geany/jsonprettifier.*
rm -f /usr/lib64/geany/json_prettifier.*
cp -f ./jsonprettifier.so /usr/lib64/geany
cp: cannot create regular file '/usr/lib64/geany': No such file or directory
Makefile:22: recipe for target 'startinstall' failed
make: *** [startinstall] Error 1
I have no idea what to do about that error and I have to give up.. :(
Currently, the Makefile
tends to prepare bundled yajl
and install into system which requires system access.
Maybe by default if not used by sudo
or root
:
$HOME/.config/geany/plugins
yajl
only when system yajl
is not available.Hello! Could anyone help me to install (or activate?) this plugin.
I successfully built it, ran make localinstall. jsonprettifier.so appeared in ~/.config/geany/plugins. But nothing appeared inside the Geany app. Then I manually added the path to the glugin to active_plugins setting in geany.conf. But still cannot see it in the app.
When running geany from command line no errors are displayed.
All other plugins work normally, so plugins support itself is enabled.
What else do I miss?
I got an error trying to compile this plugin on Ubuntu 22.04.
git clone https://github.com/zhgzhg/Geany-JSON-Prettifier.git
cd Geany-JSON-Prettifier/
make
...
...
...
make[3]: Leaving directory '/home/rmcdonal/projects/Geany-JSON-Prettifier/lloyd-yajl-66cb08c/build'
make[2]: Leaving directory '/home/rmcdonal/projects/Geany-JSON-Prettifier/lloyd-yajl-66cb08c/build'
make[1]: Leaving directory '/home/rmcdonal/projects/Geany-JSON-Prettifier/lloyd-yajl-66cb08c'
gcc -DLOCALEDIR=\"\" -DGETTEXT_PACKAGE=\"zhgzhg\" -c ./geany_json_prettifier.c -fPIC `pkg-config --cflags geany`
./geany_json_prettifier.c: In function ‘my_json_prettify’:
./geany_json_prettifier.c:345:5: warning: format not a string literal and no format arguments [-Wformat-security]
345 | (const gchar*) err_str);
| ^
gcc geany_json_prettifier.o -o jsonprettifier.so "./lloyd-yajl-66cb08c/build/yajl-2.1.0/lib/libyajl_s.a" -shared `pkg-config --libs geany`
I am not a "c" programmer, however was able to get it to compile by modifying line 345 in file "geany_json_prettifier.c".
I then did a "make localinstall" and it seem to be working fine.
diff --git a/geany_json_prettifier.c b/geany_json_prettifier.c
index 1c29353..5648ad4 100644
--- a/geany_json_prettifier.c
+++ b/geany_json_prettifier.c
@@ -342,7 +342,7 @@ Probably improper format or odd symbols! (%s)",
if (showErrorsInPopupWindow)
{
dialogs_show_msgbox(GTK_MESSAGE_ERROR,
- (const gchar*) err_str);
+ "%s",(const gchar*) err_str);
}
yajl_free_error(hand, err_str);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.