Skip to content

nwn2dev/nwscript-lsp

Repository files navigation

NWScript LSP

Language Server Protocol implementation for NWScript development (Neverwinter Nights 2).

Author: Scott Munday (@ihatemundays)
Organization: nwn2dev

Features

  • 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

Requirements

  • Java 23+

Building

./gradlew build       # compile + test
./gradlew jar         # produce fat JAR

The output JAR is at build/libs/nwscript-lsp-0.2.0.jar.

Usage

The server communicates over stdin/stdout using the LSP protocol:

java -jar build/libs/nwscript-lsp-0.2.0.jar

Editor Integration

Configure 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" },
})

Documentation

License

Open source — free for community use.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors