This is an old revision of the document!


Squirrel files are not currently supported by Geany. However, you can setup these rules to add highlighting to your code.

First, modify filetypes_extensions.conf. On Linux systems, this file is located at ~/.config/geany/filedefs/filetypes_extensions.conf. If the file does not exist, then create it. Once the file has been opened, add the below code to the file.

NOTE: “…” represents existing data in the file.

[Extensions]
...
Squirrel=*.nut;
...
 
[Groups]
...
Programming=Squirrel;
...

Create filetypes.Squirrel.conf and place this file under ~/.config/geany/filedefs/. Next, placed the below code in the file.

filetypes.squirrel.conf.txt

filetypes.squirrel.conf
# Squirrel - http://www.squirrel-lang.org/doc/squirrel3.html
# Special thanks goes to Alberto Demichelis (the creator of Squirrel) for his help in adding Squirrel support to Geany
 
[styling=C]
 
[keywords]
# all items must be in one line
primary=base break case catch class clone constructor continue const default delete else enum extends false for foreach function if in instanceof local null resume return static switch this throw true try typeof while yield
secondary=
 
[lexer_properties]
styling.within.preprocessor=1
lexer.cpp.track.preprocessor=0
preprocessor.symbol.$(file.patterns.cpp)=#
preprocessor.start.$(file.patterns.cpp)=if ifdef ifndef
preprocessor.middle.$(file.patterns.cpp)=else elif
preprocessor.end.$(file.patterns.cpp)=endif
 
[settings]
lexer_filetype=C
tag_parser=C
extension=nut
comment_use_indent=true
 
mime_type=text/plain
 
comment_single=//
comment_single=#
# multiline comments
comment_open=/*
comment_close=*/
comment_use_indent=true
 
context_action_cmd=
 
[indentation]
width=4
# 0 is spaces, 1 is tabs, 2 is tab & spaces
type=1
 
[build-menu]
# %f will be replaced by the complete filename
# %e will be replaced by the filename without extension
# (use only one of it at one time)
FT_00_LB=Compile
FT_00_CM=sq -c "%f"
FT_00_WD=
Print/export