LuaDraw IntelliSense
English · 简体中文
LuaDraw 3.7 editing support for VS Code on Windows. Get completions, English hover documentation, signature help, and diagnostics inside luadraw and luadraw* environments in the current TeX document. The extension does not run Lua or TeX, scan other files, or insert package imports.

Try it
With Node.js 22, run npm ci and npm run build at the repository root. To try the extension without installing it, open an Extension Development Host from PowerShell:
code --new-window --extensionDevelopmentPath="$PWD" .\tests\fixtures\editor.tex
To install it instead, run npm run package:vsix, then choose Extensions: Install from VSIX… in VS Code and select the generated .vsix file.
Open a .tex file in LaTeX or TeX language mode:
\usepackage{luadraw}
\begin{luadraw*}{}
local g = luadraw.graph:new{window = {-2, 2, -2, 2}}
g:Dpolyline({0, 1, 2}, "red")
\end{luadraw*}
Type g: to list methods, accept a completion, and press Tab to move between required arguments. Hover over Dpolyline to see both calling forms. In supported option tables, completion suggests fields and values; hover shows field documentation and defaults. APIs that require another module are labeled rather than automatically imported.
Diagnostics distinguish Lua syntax errors, warnings about verified argument or option misuse (including ignored inputs), and information about members known not to exist. Search for luadrawLsp in Settings to configure completion, hover, signature help, and the three diagnostic categories independently.
Development
npm run release:check validates the catalog and runs type, lint, formatting, and unit checks.
npm run test:vscode runs editor tests in an isolated profile. Set VSCODE_EXECUTABLE to select a VS Code executable, LATEX_WORKSHOP_PATH to test alongside LaTeX Workshop, or LUADRAW_VSIX to test an installed package instead of the development extension.
- To update the API catalog, run
npm run catalog:extract, review catalog/curated/, then run npm run catalog:assemble and npm run catalog:validate. The inputs are archived for offline use; do not edit generated files by hand.
See the behavior specification and development guidelines (in Chinese).
License
The original extension code is MIT-licensed. Interface documentation derived from the LuaDraw sources and manual retains the LPPL 1.3c or later license. See NOTICE for third-party materials and their licenses.