NWScript: EE Language Server provides language features for NWScript through a Visual Studio Code extension or an installable standalone LSP server.
- Enhanced syntax highlighting
- Completion
- Auto-import
- Hover information
- Goto definition
- Formatting
- Range formatting
- Signature help
- Diagnostics
- Document Symbols
The extension requires VS Code 1.138 or newer. Other editors can use the standalone server with Node.js 24 or newer.
{
"editor.formatOnSave": true,
"files.associations": {
"*.nss": "nwscript"
},
"[nwscript]": {
"editor.defaultFormatter": "PhilippeChab.nwscript-ee-language-server"
},
"nwscript-ee-lsp.formatter": {
"enabled": true,
"executable": "clang-format",
"ignoredGlobs": ["/folder/to/ignore/*.nss", "file/to/ignore/filename.nss"],
"style": {
"BasedOnStyle": "Google",
"AlignTrailingComments": true,
"AlignConsecutiveAssignments": true,
"ColumnLimit": 250,
"BreakBeforeBraces": "Allman",
"AlignEscapedNewlinesLeft": true,
"AlwaysBreakBeforeMultilineStrings": true,
"MaxEmptyLinesToKeep": 1,
"TabWidth": 4,
"IndentWidth": 4,
"UseTab": "Always"
}
}
}
Notes:
- The executable setting must either bet set to your path executable's identifier, or its absolute path.
- The style object must respect clang-format rules.
Neverwinter Nights home and installation folders.
{
"nwscript-ee-lsp.compiler": {
"enabled": true,
"verbose": false,
"nwnHome": "C:\\Users\\YOUR_USERNAME\\Documents\\Neverwinter Nights",
"nwnInstallation": "D:\\Program Files (x86)\\Steam\\steamapps\\common\\Neverwinter Nights"
}
}
Notes:
- Diagnostics are provided by compiling the file with the nwn_script_comp compiled executable.
- The compiler executable is provided for Windows, Darwin and Linux operating systems.
- Diagnostics are currently published when opening or saving a file.
- You can set the
verbosesetting totrueif you wish to see detailed logs of the compilation process.
- Install Node.js 24 (the version in
.nvmrc). With nvm, runnvm installandnvm usein the project root. - Invoke
npm install -g yarn@1.22.22 @vscode/vsceto install yarn and the vscode packaging tool. - In the project root directory, invoke
yarn install --frozen-lockfile. The postinstall script also installs the client and server dependencies using their committed lockfiles. - Install
clang-formatand make it available on PATH (or setCLANG_FORMATto its absolute path) for the packaged-server integration tests. - Run
yarn compile,yarn lint,yarn test, andyarn buildto type-check, test, and bundle the extension. CI uses the same Node and Yarn versions. - In the project root directory, invoke
vsce packagewhich will produce a .vsix file. - To install, in VS Code on the extension pane, click on the three dots at the top right then select
Install From VSIXand navigate to the package you just produced.
Check for the latest Beamdog release and automatically update the bundled standard library:
yarn --cwd server update-standard-libThe TypeScript updater discovers the latest release, verifies its archive, regenerates definitions, and records the new version and checksums. Use --pinned to reproduce the recorded version, or check-standard-lib to verify local definitions without network access. See standard library update instructions for details and offline use.
To regenerate the bundled include indexes from the recorded game archive, run yarn --cwd server generate-lib-defs --archive /absolute/path/to/recorded-release.zip. Add --check to verify them without writing.
Please report any issues on the github repository.
Copyright (c) 2022-2026 Philippe Chabot and contributors.
The language server is licensed under the GNU General Public License, version 3 only (GPL-3.0-only). Distributed modified versions must comply with its corresponding-source and licensing requirements.
Third-party dependencies, bundled tools, and game-derived assets retain their respective licensing terms; the project's GPL license does not relicense them. See the bundled compiler documentation for its license and source provenance.