1#include "nixd-config.h"
9#include <llvm/ADT/ArrayRef.h>
10#include <llvm/Support/CommandLine.h>
17using namespace llvm::cl;
26 desc(
"Input JSON stream encoding"),
28 clEnumValN(JSONStreamStyle::Standard,
"standard",
"usual LSP protocol"),
29 clEnumValN(JSONStreamStyle::Delimited,
"delimited",
30 "messages delimited by `// -----` lines, "
31 "with // comment support")),
32 init(JSONStreamStyle::Standard),
38 "log",
desc(
"Verbosity of log messages written to stderr"),
40 clEnumValN(Logger::Level::Error,
"error",
"Error messages only"),
41 clEnumValN(Logger::Level::Info,
"info",
"High level execution tracing"),
42 clEnumValN(Logger::Level::Debug,
"debug",
"Debugging details"),
43 clEnumValN(Logger::Level::Verbose,
"verbose",
"Low level details")),
44 init(Logger::Level::Info),
cat(Misc)};
52 OS <<
"nixd, version: ";
67 LogLevel = Logger::Level::Verbose;
76 auto Out = std::make_unique<lspserver::OutboundPort>(
PrettyPrint);
79 std::make_unique<nixd::Controller>(std::move(In), std::move(Out));
Interface to allow custom logging in clangd.
Only one LoggingSession can be active at a time.
Whether current platform treats paths case insensitively.
bool fromJSON(const llvm::json::Value &Params, Configuration::Diagnostic &R, llvm::json::Path P)
llvm::cl::OptionCategory NixdCategory
llvm::cl::opt< bool > LitTest
Indicating that we are in lit-test mode.
int main(int argc, char *argv[])