Hi Bob,
Lets just summarise the steps for you to check:
1. You are using Geany 0.21 or 1.22 (older may work but no guarantee) 2. You followed Colomban's advice to menu->tools->configuration files->filetype_extensions.conf and added the two lines from the wiki, note one is in the [extensions] section and one in the [groups] section. 3. You followed Colomban's advice to copy the filetypes.JSON.conf from the wiki to your ~/.config/geany/filedefs directory
These steps are all you need to have the filetype recognised for files with the .json extension, check in the status bar for filetype:JSON when you open such a file. If it doesn't work, check your use of case, thats the most common error, *everything* is case sensitive including filenames and file contents and extensions.
4. You put the check_json script somewhere that is in your PATH list 5. You edited the build commands and the error exception
This should now give you a "check" item in the build menu when you have a JSON file open and error messages in the compiler window should point to the line in the source where it occurs.
Cheers Lex
On 22 February 2013 12:14, Bob Furber burnsmicro@gmail.com wrote:
Ok, I named the top line of the Build Command dialog "check".
I entered /usr/local/bin/check_json %f in the Command field beside it.
I left the Working Directory field blank.
I entered ([^:]+):([0-9]+) in the Error Regular Expression field at the bottom of the top block.
Then I clicked Ok and nothing happened. There is no syntax highlighting of my Json files ..even after restarting Geany.
I am missing something obvious, but I do not see it.
What is it?
Thanks for all your help,
RF
On 13-02-20 02:55 PM, Lex Trotman wrote:
On 21 February 2013 09:41, Bob Furber burnsmicro@gmail.com wrote:
Some progress, thanks to you, Colomban.
But, still some questions:
What is meant in the wiki by:
- "use /usr/local/bin/check_json %f as the compile command"? Under "Set
Build Commands" I have many choices where to place the command, but I do not see a Compile command.
You don't see one because you havn't added it yet :) Just use the top line of the dialog, thats traditionally the compile command. Note, since you have to give it the name as well, you might want to call it "check" instead of "compile" since thats what it runs.
I do see a "Make" and "Make Custom Target" commands.
- "..and ([^:]+):([0-9]+) as the Error Regular Expression" is pasted in
the "Error regular expression" field immediately below wherever I paste the compile command?
Yes.
Finally, if I am successful, I would be pleased to rewrite this wiki page to make it clearer for dummies like me.
All contributions welcome.
Cheers Lex
Thanks,
RF
On 13-02-20 12:49 PM, Colomban Wendling wrote:
Hi,
Le 20/02/2013 20:46, Bob Furber a écrit :
The Geany wiki provides instructions on how to add json support.
But I have run into problems:
- I cannot find |filetypes_extensions.conf|, the file I need to
modify on my Linux Ubuntu system.
It may not already exist in your user config, but it's supposed to be in ~/.config/geany/. You can also open it for editing using Tools->Configuration files->filetype_extensions.conf from inside Geany.
- I assume I deed to add the new filetypes.JSON.conf to the
/usr/share/geany folder
No, this is the system path, to add a filetype for your user, add it in ~/.config/geany/filedefs/
Regards, Colomban
Can anyone help me add json support to an otherwise outstanding code editor?
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users