Someone else wrote a gedit GTKSourceview syntax highlighter definition file (with a .lang extension) for a rare high-level language used for creating text adventure games. I've been trying to install the file, but I can't get syntax coloring to appear or make gedit recognize the source file type.
The wiki for the text adventure language says that the .lang file needs to be moved to either /usr/share/gtksourceview-3.0/language-specs or /usr/share/gtksourceview-2.0/language-specs. I have copied the file into both directories, with no result.
Having searched the Internet fairly extensively, it looks like some people say that gedit syntax highlighters should go in /.local/share/gtksourceview-2.0/language-specs. That directory did not exist on my Linux Mint system, but I created it anyways and copied the .lang file there just to try it. I also created a parallel /.local/share/gtksourceview-3.0/language-specs and put another copy of the file there. Still, nothing.
I've been using Linux for about a year, but I still don't understand the file system. Help would greatly appreciated.
I'm using Linux Mint 15 Cinnamon with gedit 2.30.4.
gedit - Can't install custom syntax highlighter file
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
gedit - Can't install custom syntax highlighter file
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: gedit - Can't install custom syntax highlighter file
Have you validated the file? Go to /usr/share/gtksourceview-2.0/language-specs:
Run the validator:
If you get an error about xmllint not being found, install the package libxml2-utils first:
Anyway, by moving one of the .lang files out of the /usr/share/gtksourceview-2.0/language-specs directory and then starting Gedit 2.30.4 again I've confirmed that this is the right directory to place .lang files. Gedit no longer showed this language is the syntax selection box at the bottom of the window. It showed it again once I moved the .lang file back into this directory and restarting Gedit.
Do you have a download link for the syntax file?
Code: Select all
cd /usr/share/gtksourceview-2.0/language-specs
Code: Select all
bash check.sh
Code: Select all
apt install libxml2-utils
Do you have a download link for the syntax file?
Re: gedit - Can't install custom syntax highlighter file
Thank you.
When I log in as root with the su command, hugo.lang appears to validate normally with all the other syntax files, but I get this warning:
I do not get an error about xmllint. When I'm not logged in as root, I get a warning about the syntax file I'm interested in as well as two identical I/O "Permission denied" errors:xenopeek wrote:Run the validator:Code: Select all
bash check.sh
Code: Select all
warning: failed to load external entity "hugo.lang"
Code: Select all
warning: failed to load external entity "*.xml"
http://roody.gerynarsabode.org/hbe/synt ... /hugo.langxenopeek wrote:Do you have a download link for the syntax file?
That's very valuable information. Thanks!xenopeek wrote: Anyway, by moving one of the .lang files out of the /usr/share/gtksourceview-2.0/language-specs directory and then starting Gedit 2.30.4 again I've confirmed that this is the right directory to place .lang files. Gedit no longer showed this language is the syntax selection box at the bottom of the window. It showed it again once I moved the .lang file back into this directory and restarting Gedit.
Re: gedit - Can't install custom syntax highlighter file
I don't have Linux Mint 15 here any longer, but Linux Mint 16 works just fine. I put your file in the /usr/share/gtksourceview-2.0/language-specs directory, ran the validator and then ran Gedit. I could select it easily. I think you are doing something wrong/different than what I am doing. Perhaps learn to use sudo as logging in to your system as root is just asking to run into problems
Obligatory proof (click to enlarge):
Obligatory proof (click to enlarge):