Language Server Protocol (LSP) support for Duso in Sublime Text.
⚠️ Requires Duso InstallationThe LSP features (error diagnostics, hover documentation, go to definition, find references) require the
dusobinary to be installed on your system. Visit duso.rocks for installation instructions.
- Syntax Highlighting - Color coded syntax for Duso scripts
- Error Diagnostics - Real-time parse error detection
- Hover Documentation - View built-in function documentation
- Go to Definition - Jump to function and variable definitions
- Find References - Find all usages of variables and functions
- Install the LSP package from Package Control (if not already installed)
- Install this package via Package Control:
Duso - Restart Sublime Text
Ensure the duso binary is in your PATH:
which duso
duso --versionIf duso is not found, the extension will fail to start. Make sure you've run ./build.sh in the project root.
-
Create a file
test.du:print("Hello, Duso!") function greet(name) do print("Hello, " + name) end greet("World") -
Open the file in Sublime - you should see syntax highlighting
-
Hover over
printandgreetto see documentation -
Create a syntax error to see diagnostics:
print(1 2) # Missing comma
- Syntax errors shown in real-time with red squiggles
- Error details in the Problems panel
- Hover over built-in functions (print, len, map, etc.) to see docs
- Shows function signatures and descriptions
- Click on a function/variable to jump to its definition
- Works for same-file definitions
- Right-click → Find All References to find all usages
- Highlights all matching identifiers
The package launches duso -lsp which:
- Reads LSP messages from Sublime over stdin
- Parses documents and analyzes them
- Sends diagnostics, hover info, and definitions back to Sublime
No separate server needed - it's built into the duso binary!
If the server doesn't start:
- Check View → Output Console for error messages
- Verify
dusois in PATH:which duso - Rebuild:
./build.shin project root - Restart Sublime: Cmd+Q then reopen