[gnome-builder/wip/chergert/completion] html: add : and ; to css property completion
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/completion] html: add : and ; to css property completion
- Date: Wed, 6 Jun 2018 03:54:17 +0000 (UTC)
commit e9ded04452efb7fd05d7aa4d55ef5f80f6cdff03
Author: Christian Hergert <chergert redhat com>
Date: Tue Jun 5 20:53:45 2018 -0700
html: add : and ; to css property completion
.../html-completion/ide-html-completion-provider.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
---
diff --git a/src/plugins/html-completion/ide-html-completion-provider.c
b/src/plugins/html-completion/ide-html-completion-provider.c
index 1354078cc..d3bc98b81 100644
--- a/src/plugins/html-completion/ide-html-completion-provider.c
+++ b/src/plugins/html-completion/ide-html-completion-provider.c
@@ -385,6 +385,21 @@ ide_html_completion_provider_activate_proposal (IdeCompletionProvider *provider,
ide_snippet_add_chunk (snippet, chunk2);
}
+ if (kind == IDE_HTML_PROPOSAL_CSS_PROPERTY)
+ {
+ g_autoptr(IdeSnippetChunk) chunk1 = ide_snippet_chunk_new ();
+ g_autoptr(IdeSnippetChunk) chunk2 = ide_snippet_chunk_new ();
+ g_autoptr(IdeSnippetChunk) chunk3 = ide_snippet_chunk_new ();
+
+ ide_snippet_chunk_set_spec (chunk1, ": ");
+ ide_snippet_chunk_set_tab_stop (chunk2, 0);
+ ide_snippet_chunk_set_spec (chunk3, ";");
+
+ ide_snippet_add_chunk (snippet, chunk1);
+ ide_snippet_add_chunk (snippet, chunk2);
+ ide_snippet_add_chunk (snippet, chunk3);
+ }
+
ide_source_view_push_snippet (IDE_SOURCE_VIEW (view), snippet, &begin);
gtk_text_buffer_end_user_action (buffer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]