From 6914712d2099ac9d2138545073a98d14a329553e Mon Sep 17 00:00:00 2001 From: khodowany Date: Fri, 11 Sep 2026 00:02:05 -0500 Subject: [PATCH] Clangd --- .gitignore | 1 + modulus.py | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fe95204..93b1147 100755 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ build/ .clangd +.nvim.lua .clang-format pyrightconfig.json diff --git a/modulus.py b/modulus.py index 836b640..b27d44c 100755 --- a/modulus.py +++ b/modulus.py @@ -15,6 +15,7 @@ COMMANDS = ( "test", "package", "lsp", + "clangd", ) COMMON_DIR = pathlib.Path("build") / "build_common" TOOLS_DIR = pathlib.Path("build") / "build_tools" @@ -56,6 +57,7 @@ def runtime_ready(root): return ( (root / TOOLS_DIR / "configure.py").is_file() and (root / TOOLS_DIR / "lsp.py").is_file() + and (root / TOOLS_DIR / "clangd.py").is_file() and (root / RUNTIME_DIR / "modulus" / "cli.py").is_file() and (root / RUNTIME_DIR / "modulus" / "export.py").is_file() ) @@ -338,7 +340,12 @@ def ensure_runtime(root): def delegate(command, argv): root = repo_root() - ensure_runtime(root) + if command == "clangd": + if not runtime_ready(root): + print("Modulus clangd tooling is missing; run ./modulus.py configure first", file=sys.stderr) + return 1 + else: + ensure_runtime(root) sys.path.insert(0, str(root / RUNTIME_DIR)) import modulus.cli previous_argv = sys.argv