From b107a859476a510a2061e599443113b75a646eba Mon Sep 17 00:00:00 2001 From: James Westman Date: Sat, 19 Oct 2024 20:47:27 -0500 Subject: [PATCH] lsp: Add property docs on notify signal hover --- blueprintcompiler/language/gobject_signal.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/blueprintcompiler/language/gobject_signal.py b/blueprintcompiler/language/gobject_signal.py index 8da59a5..d2e4526 100644 --- a/blueprintcompiler/language/gobject_signal.py +++ b/blueprintcompiler/language/gobject_signal.py @@ -174,6 +174,16 @@ class Signal(AstNode): if self.gir_signal is not None: return self.gir_signal.doc + @docs("detail_name") + def detail_docs(self): + if self.name == "notify": + if self.gir_class is not None and not isinstance( + self.gir_class, ExternType + ): + prop = self.gir_class.properties.get(self.tokens["detail_name"]) + if prop is not None: + return prop.doc + @decompiler("signal") def decompile_signal(