Kaydet (Commit) b1f93c29 authored tarafından Colomban Wendling's avatar Colomban Wendling

Add Zephir filetype

üst f6068d0e
......@@ -67,7 +67,8 @@ filetypes = \
filetypes.verilog \
filetypes.vhdl \
filetypes.xml \
filetypes.yaml
filetypes.yaml \
filetypes.zephir
tagfiles = \
c99.tags \
......
......@@ -65,6 +65,7 @@ Verilog=*.v;
VHDL=*.vhd;*.vhdl;
XML=*.xml;*.sgml;*.xsl;*.xslt;*.xsd;*.xhtml;*.xul;*.dtd;
YAML=*.yaml;*.yml;
Zephir=*.zep;
None=*;
# Note: restarting is required after editing groups
......
# For complete documentation of this file, please see Geany's main documentation
[styling=HTML]
[keywords=HTML]
# all items must be in one line
# these are Zephir instructions, overriding PHP list
php=abstract bool break case catch class const continue default empty else false fetch finally fixed float for foreach function if int integer interface isset let long namespace new null private protected public return static string switch this throw true try typeof uint ulong unlikely var void while
[lexer_properties=PHP]
[settings=PHP]
# default extension used when saving files
extension=zep
[indentation]
#width=4
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=1
[build_settings]
# %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)
compiler=zephir build
......@@ -189,6 +189,7 @@ static void init_builtin_filetypes(void)
FT_INIT( BATCH, NONE, "Batch", NULL, SCRIPT, SCRIPT );
FT_INIT( POWERSHELL, NONE, "PowerShell", NULL, SOURCE_FILE, SCRIPT );
FT_INIT( RUST, RUST, "Rust", NULL, SOURCE_FILE, COMPILED );
FT_INIT( ZEPHIR, ZEPHIR, "Zephir", NULL, SOURCE_FILE, COMPILED );
}
......
......@@ -95,6 +95,7 @@ typedef enum
GEANY_FILETYPES_BATCH,
GEANY_FILETYPES_POWERSHELL,
GEANY_FILETYPES_RUST,
GEANY_FILETYPES_ZEPHIR,
/* ^ append items here */
GEANY_MAX_BUILT_IN_FILETYPES /* Don't use this, use filetypes_array->len instead */
}
......
......@@ -1058,6 +1058,7 @@ void highlighting_init_styles(guint filetype_idx, GKeyFile *config, GKeyFile *co
init_styleset_case(VERILOG);
init_styleset_case(XML);
init_styleset_case(YAML);
init_styleset_case(ZEPHIR);
default:
if (ft->lexer_filetype)
geany_debug("Filetype %s has a recursive lexer_filetype %s set!",
......@@ -1141,6 +1142,7 @@ void highlighting_set_styles(ScintillaObject *sci, GeanyFiletype *ft)
styleset_case(VERILOG);
styleset_case(XML);
styleset_case(YAML);
styleset_case(ZEPHIR);
case GEANY_FILETYPES_NONE:
default:
styleset_default(sci, ft->id);
......
......@@ -1559,4 +1559,11 @@ static const HLKeyword highlighting_keywords_YAML[] =
#define highlighting_properties_YAML EMPTY_PROPERTIES
/* Zephir */
#define highlighting_lexer_ZEPHIR SCLEX_PHPSCRIPT
#define highlighting_styles_ZEPHIR highlighting_styles_PHP
#define highlighting_keywords_ZEPHIR highlighting_keywords_PHP
#define highlighting_properties_ZEPHIR highlighting_properties_PHP
#endif /* guard */
......@@ -301,6 +301,7 @@ const gchar *symbols_get_context_separator(gint ft_id)
/*case GEANY_FILETYPES_RUBY:*/ /* not sure what to use atm*/
case GEANY_FILETYPES_PHP:
case GEANY_FILETYPES_RUST:
case GEANY_FILETYPES_ZEPHIR:
return "::";
/* avoid confusion with other possible separators in group/section name */
......@@ -767,6 +768,7 @@ static void add_top_level_items(GeanyDocument *doc)
break;
}
case GEANY_FILETYPES_PHP:
case GEANY_FILETYPES_ZEPHIR:
{
tag_list_add_groups(tag_store,
&(tv_iters.tag_namespace), _("Namespaces"), "classviewer-namespace",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment