diff --git a/nixd/tools/nixd/nixd.cpp b/nixd/tools/nixd/nixd.cpp index 4c356ad4e..02a8c625d 100644 --- a/nixd/tools/nixd/nixd.cpp +++ b/nixd/tools/nixd/nixd.cpp @@ -121,6 +121,15 @@ opt Role{"role", desc("The role of this process, worker, controller, ..."), int main(int argc, char *argv[]) { using namespace lspserver; + SetVersionPrinter([](llvm::raw_ostream &OS) { + OS << "nixd, version: "; +#ifdef NIXD_VCS_TAG + OS << NIXD_VCS_TAG; +#else + OS << NIXD_VERSION; +#endif + OS << "\n"; + }); nixd::registerSigHanlder(); const char *FlagsEnvVar = "NIXD_FLAGS"; HideUnrelatedOptions(NixdCatogories);