Language Server Protocol implementation for NWScript development (Neverwinter Nights 2).
Author: Scott Munday (@ihatemundays)
Organization: nwn2dev
- Code Completion — built-in functions with signatures, constants, file-local symbols, NWN2 installation index
- Hover Info — type and signature information on hover
- Signature Help — parameter types/names while typing function calls
- Diagnostics — real-time error detection (unmatched braces/parentheses, type checking)
- NWN2 Installation Detection — auto-finds and indexes your NWN2 install
- Java 23+
./gradlew build # compile + test
./gradlew jar # produce fat JARThe output JAR is at build/libs/nwscript-lsp-0.2.0.jar.
The server communicates over stdin/stdout using the LSP protocol:
java -jar build/libs/nwscript-lsp-0.2.0.jarConfigure your editor's LSP client to launch the server. For example, in VS Code (settings.json):
{
"nwscript.server.path": "java",
"nwscript.server.args": ["-jar", "/path/to/nwscript-lsp-0.2.0.jar"]
}Or in Neovim (via nvim-lspconfig):
vim.lsp.start({
name = "nwscript",
cmd = { "java", "-jar", "/path/to/nwscript-lsp-0.2.0.jar" },
filetypes = { "nss" },
})- NWSCRIPT_SPEC.md — NWScript language reference
- NWSCRIPT_FUNCTIONS.md — built-in function reference
- FEATURES.md — full feature list
- ERROR_DETECTION.md — error detection details
- IMPLEMENTATION.md — architecture and design notes
- QUICKSTART.md — getting started guide
- QUICK_REFERENCE.md — quick reference card
- FUTURE_SPEC.md — planned features
Open source — free for community use.