Commit ba940b8a authored by Christian Hergert's avatar Christian Hergert

editorconfig: support max_line_length

The vim editorconfig plugin supports this "emerging" property name. I'm
going to go ahead and implement it as well to map to our
"right-margin-position".
parent 008dd91b
......@@ -7,6 +7,7 @@ tab_width = 2
indent_size = 2
insert_trailing_newline = true
indent_style = space
max_line_length = 100
[*.py]
indent_size = 4
......
......@@ -99,6 +99,7 @@ editorconfig_glib_read (GFile *file,
editorconfig_handle_get_name_value (handle, i, &key, &valuestr);
if ((g_strcmp0 (key, "tab_width") == 0) ||
(g_strcmp0 (key, "max_line_length") == 0) ||
(g_strcmp0 (key, "indent_size") == 0))
{
g_value_init (value, G_TYPE_INT);
......
......@@ -87,6 +87,8 @@ ide_editorconfig_file_settings_init_worker (GTask *task,
g_object_set_property (source_object, "insert_trailing_newline", value);
else if (g_str_equal (key, "charset"))
g_object_set_property (source_object, "encoding", value);
else if (g_str_equal (key, "max_line_length"))
g_object_set_property (source_object, "right-margin-position", value);
else if (g_str_equal (key, "end_of_line"))
{
GtkSourceNewlineType newline_type = GTK_SOURCE_NEWLINE_TYPE_LF;
......
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