Editor-time diagnostics, hover docs, and completion for Triton
GPU kernels — the first language server for the Triton DSL.
Triton kernels are Python syntax, but they are not Python: tl.constexpr values, block shapes,
mask broadcasting, and a restricted language subset form a real, statically checkable type system
that generic Python tooling (Pyright, Ruff) cannot see. triton-lsp runs alongside your normal
Python language server and contributes only Triton-specific intelligence.
Features (v1)
Static lint diagnostics inside @triton.jit kernels: non-power-of-two tl.arange,
tl.dot shape mismatches, unsupported Python constructs, deprecated / version-gated
tl.* APIs, and more — instantly, with no GPU and no Triton installation required.
Hover, completion, and signature help for the triton.language API, generated from the
real Triton package per supported version (3.5 / 3.6 / 3.7).
Embedded CUDA C++ support: syntax highlighting and diagnostics for CUDA source strings
passed to torch.cuda._compile_kernel, cupy.RawKernel, and friends.
Inline PTX validation for tl.inline_asm_elementwise: constraint-string checking plus
a PTX parser/validator.
Works on macOS, Linux, and over VS Code Remote-SSH (where Triton actually lives).