Clangd
publish / publish (push) Successful in 16m24s

This commit is contained in:
khodowany
2026-09-11 00:02:08 -05:00
parent 544080a427
commit 16c37ab1c5
2 changed files with 9 additions and 1 deletions
+1
View File
@@ -1,5 +1,6 @@
build/ build/
.clangd .clangd
.nvim.lua
.clang-format .clang-format
pyrightconfig.json pyrightconfig.json
+7
View File
@@ -15,6 +15,7 @@ COMMANDS = (
"test", "test",
"package", "package",
"lsp", "lsp",
"clangd",
) )
COMMON_DIR = pathlib.Path("build") / "build_common" COMMON_DIR = pathlib.Path("build") / "build_common"
TOOLS_DIR = pathlib.Path("build") / "build_tools" TOOLS_DIR = pathlib.Path("build") / "build_tools"
@@ -56,6 +57,7 @@ def runtime_ready(root):
return ( return (
(root / TOOLS_DIR / "configure.py").is_file() (root / TOOLS_DIR / "configure.py").is_file()
and (root / TOOLS_DIR / "lsp.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" / "cli.py").is_file()
and (root / RUNTIME_DIR / "modulus" / "export.py").is_file() and (root / RUNTIME_DIR / "modulus" / "export.py").is_file()
) )
@@ -338,6 +340,11 @@ def ensure_runtime(root):
def delegate(command, argv): def delegate(command, argv):
root = repo_root() root = repo_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) ensure_runtime(root)
sys.path.insert(0, str(root / RUNTIME_DIR)) sys.path.insert(0, str(root / RUNTIME_DIR))
import modulus.cli import modulus.cli