From b4fc380af5e390ca11892f9e657e653f6869c21b Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 3 Jul 2025 15:20:23 -0700 Subject: Language Server Enhancements (#7604) * Language Server: auto-select the best candidate in signature help. * Fix constructor call highlighting + goto definition. * Add test. * format code * Improve ctor signature help. * Add tests. * Fix decl path printing for extension children. * Allow goto definition to show core module source. * c++ compile fix. --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --- tests/language-server/ctor-hover.slang | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/language-server/ctor-hover.slang (limited to 'tests/language-server/ctor-hover.slang') diff --git a/tests/language-server/ctor-hover.slang b/tests/language-server/ctor-hover.slang new file mode 100644 index 000000000..186d373cf --- /dev/null +++ b/tests/language-server/ctor-hover.slang @@ -0,0 +1,15 @@ +//TEST:LANG_SERVER(filecheck=CHECK): +struct MyType +{ + __init(int x) {} +} + +void test() +{ +//HOVER:10,18 + let obj = MyType(5); + // ^^^^^ + // Hover here should show info for the ctor, not the type. +} + +//CHECK: MyType.init -- cgit v1.2.3