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> --- tools/slangd/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools/slangd/main.cpp') diff --git a/tools/slangd/main.cpp b/tools/slangd/main.cpp index 240992273..f2b962253 100644 --- a/tools/slangd/main.cpp +++ b/tools/slangd/main.cpp @@ -16,6 +16,14 @@ int main(int argc, const char* const* argv) { isDebug = true; } + else if (Slang::UnownedStringSlice(argv[i]) == "--print-builtin-module" && i < argc - 1) + { + Slang::UnownedStringSlice moduleName = Slang::UnownedStringSlice(argv[++i]); + Slang::ComPtr code; + Slang::getBuiltinModuleSource(moduleName, code.writeRef()); + printf("%s\n", (const char*)code->getBufferPointer()); + return 0; + } } if (isDebug) { -- cgit v1.2.3