LSL LSPLSL language support for Visual Studio Code. Get completion, documentation, diagnostics, formatting, and navigation while writing scripts for Second Life. Start writingInstall LSL LSP by Sekkmer, then open an Hover over Requires VS Code 1.90 or newer. Working with includes and macrosThe extension understands Quoted includes search the current file's directory first, followed by configured include paths and workspace folders. A project's
Dynamic macros remain in generated output with an unknown value and a known type. Use them for values that a viewer or another build step supplies later. Optional dialect extensions are disabled by default. Enable them in settings, or in source with a directive such as
Optimized output converts these extensions to standard LSL before upload. Preprocessed output expands includes and macros but preserves dialect syntax. Inspect generated scriptsOpen the command palette or right-click an LSL editor:
These commands open read-only tabs and keep the source file editable. Optimization requires valid source; fix preprocessing, parsing, and semantic errors first. Set All optimizer features are enabled by default. Individual features can be disabled through
Diagnostics and memory hintsDiagnostics check types, function arguments and returns, declarations, state changes, unreachable code, and common LSL mistakes. Hovers also show definition metadata such as deprecated functions, required privileges, and built-in delays when available. Documentation comments immediately above your own functions appear in their hovers. Suppress a diagnostic by its friendly name or
Memory inlay hints compare estimated source and optimized Mono free memory and show a calibrated error band. They are estimates, not live script measurements. Runtime lists, temporary copies, call stacks, and garbage collection can change the actual margin. A root-source comment such as Definitions and troubleshootingThe extension uses bundled official Second Life definitions and checks for validated updates by default. Use LSL: Update Definitions, LSL: Show Active Definitions, or LSL: Use Bundled Definitions to inspect or change that choice. Set If results appear stale, try LSL: Clear Caches or LSL: Restart Language Server. LSL: Show Client Logs and LSL: Show Language Server Trace open the relevant output channels. Set Semantic highlighting depends on your theme and can be disabled with Limitations and feedbackThe analyzer does not replace the Second Life compiler or test viewer behavior. Rename changes identifiers rather than strings or comments; ambiguous include definitions and unindexed headers can limit cross-file renames. Preprocessor and dialect compatibility can also differ from a particular viewer's implementation. Report issues with a small script that reproduces the problem at Sekkmer/lsl-lsp. CLI and script integration testsThe project also provides tools outside the editor:
The simulator is imported by JavaScript/TypeScript tests, either from its standalone release or the source checkout. It is not an editor command or part of the CLI bundle, and it does not simulate viewer RLV behavior, physics, or heap/stack memory. Licensed under MIT. See release notes for changes. |