This sample shows how to install Cadl locally to a project and have the VS Code extension use its locally installed language server.
See cadl.cadl-server.path
in .vscode/settings.json and
@cadl-lang/compiler
dev dependency in package.json.
npm install --save-dev @cadl-lang/compiler
-
File -> Preferences
-
Search for Cadl
-
Click on Workspace tab
-
Set
cadl.cadl-server.path
to${workspaceFolder}/node_modules/@cadl-lang/compiler
(NOTE: If the Cadl project is not at the root of the workspace, adjust the path accordingly. For example,
${workspaceFolder}/path/from/workspace/to/project/node_modules/@cadl-lang/compiler
)