[gnome-builder/gnome-builder-43] libide/code: add icons for more completion types
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-43] libide/code: add icons for more completion types
- Date: Thu, 22 Sep 2022 02:51:02 +0000 (UTC)
commit 224037b189832de9897ab9e56b2a8758f919a0b0
Author: Christian Hergert <chergert redhat com>
Date: Wed Sep 21 19:48:30 2022 -0700
libide/code: add icons for more completion types
Having something is better than nothing, so try to fill these out a bit
more until we can create icons for them.
src/libide/code/ide-symbol.c | 23 +++++++++++++----------
src/libide/lsp/ide-lsp-util.c | 2 +-
2 files changed, 14 insertions(+), 11 deletions(-)
---
diff --git a/src/libide/code/ide-symbol.c b/src/libide/code/ide-symbol.c
index 56ecaa7cc..bdf9b4ee7 100644
--- a/src/libide/code/ide-symbol.c
+++ b/src/libide/code/ide-symbol.c
@@ -261,9 +261,12 @@ ide_symbol_kind_get_icon_name (IdeSymbolKind kind)
switch (kind)
{
case IDE_SYMBOL_KIND_ALIAS:
+ case IDE_SYMBOL_KIND_TYPE_PARAM:
icon_name = "lang-typedef-symbolic";
break;
+ case IDE_SYMBOL_KIND_INTERFACE:
+ case IDE_SYMBOL_KIND_OBJECT:
case IDE_SYMBOL_KIND_CLASS:
icon_name = "lang-class-symbolic";
break;
@@ -276,11 +279,15 @@ ide_symbol_kind_get_icon_name (IdeSymbolKind kind)
icon_name = "lang-enum-value-symbolic";
break;
+ case IDE_SYMBOL_KIND_CONSTRUCTOR:
case IDE_SYMBOL_KIND_FUNCTION:
icon_name = "lang-function-symbolic";
break;
+ case IDE_SYMBOL_KIND_MODULE:
case IDE_SYMBOL_KIND_PACKAGE:
+ case IDE_SYMBOL_KIND_HEADER:
+ case IDE_SYMBOL_KIND_FILE:
icon_name = "lang-include-symbolic";
break;
@@ -300,6 +307,7 @@ ide_symbol_kind_get_icon_name (IdeSymbolKind kind)
icon_name = "lang-struct-symbolic";
break;
+ case IDE_SYMBOL_KIND_PROPERTY:
case IDE_SYMBOL_KIND_FIELD:
icon_name = "lang-struct-field-symbolic";
break;
@@ -313,23 +321,18 @@ ide_symbol_kind_get_icon_name (IdeSymbolKind kind)
icon_name = "lang-union-symbolic";
break;
- case IDE_SYMBOL_KIND_OBJECT:
+ case IDE_SYMBOL_KIND_TEMPLATE:
+ case IDE_SYMBOL_KIND_STRING:
+ icon_name = "completion-snippet-symbolic";
+ break;
+
case IDE_SYMBOL_KIND_EVENT:
case IDE_SYMBOL_KIND_OPERATOR:
- case IDE_SYMBOL_KIND_TYPE_PARAM:
case IDE_SYMBOL_KIND_ARRAY:
case IDE_SYMBOL_KIND_BOOLEAN:
case IDE_SYMBOL_KIND_CONSTANT:
- case IDE_SYMBOL_KIND_CONSTRUCTOR:
- case IDE_SYMBOL_KIND_FILE:
- case IDE_SYMBOL_KIND_HEADER:
- case IDE_SYMBOL_KIND_INTERFACE:
- case IDE_SYMBOL_KIND_MODULE:
case IDE_SYMBOL_KIND_NUMBER:
case IDE_SYMBOL_KIND_NONE:
- case IDE_SYMBOL_KIND_PROPERTY:
- case IDE_SYMBOL_KIND_STRING:
- case IDE_SYMBOL_KIND_TEMPLATE:
case IDE_SYMBOL_KIND_KEYWORD:
case IDE_SYMBOL_KIND_LAST:
icon_name = NULL;
diff --git a/src/libide/lsp/ide-lsp-util.c b/src/libide/lsp/ide-lsp-util.c
index 1e3425587..8b20ebe11 100644
--- a/src/libide/lsp/ide-lsp-util.c
+++ b/src/libide/lsp/ide-lsp-util.c
@@ -41,7 +41,7 @@ ide_lsp_decode_symbol_kind (guint kind)
case 12: kind = IDE_SYMBOL_KIND_FUNCTION; break;
case 13: kind = IDE_SYMBOL_KIND_VARIABLE; break;
case 14: kind = IDE_SYMBOL_KIND_CONSTANT; break;
- case 15: kind = IDE_SYMBOL_KIND_STRING; break;
+ case 15: kind = IDE_SYMBOL_KIND_STRING; break; /* Snippet */
case 16: kind = IDE_SYMBOL_KIND_NUMBER; break;
case 17: kind = IDE_SYMBOL_KIND_BOOLEAN; break;
case 18: kind = IDE_SYMBOL_KIND_ARRAY; break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]