Skip to content

Language server features

When an SPL file is open, the language server provides several features to improve reading and writing SPL code.

Syntax highlighting and errors

Syntax highlighting for SPL files is provided to help differentiate keywords, types, functions, stream names, attributes, and more.

Screenshot showing contents of an SPL file containing differently colored words depending on their usage and meaning in the code

Additionally, if an SPL file does not have correct syntax, an error is reported in the editor and viewable in the PROBLEMS panel.

Screenshot showing contents of an SPL file with a missing semi-colon. The output clause has a red squigly line underneath meaning an error is present. The PROBLEMS panel is also displayed with the file name and error.

Folding

Fold portions of code using folding icons of the left side of the editor.

Screenshot showing contents of an SPL file with partially collapsed blocks of code and arrows indicating what blocks can be expanded or collapsed.

Find references

To find out where a stream or operator is used within a file or workspace, right-click on it and select Go to References or Find All References.

IntelliSense

IntelliSense provides code hints, assistance, completions, and operator templates depending where your cursor is in the code. To trigger IntelliSense, enter Ctrl+Space (Windows/Linux) or Cmd+Space (macOS).

Screenshot showing IntelliSense suggestions in an SPL file. Screenshot showing IntelliSense operator template suggestions in an SPL file.

The language server is aware of types, functions, and operators provided by toolkits in the configured Streams install and toolkit paths.

View documentation

IntelliSense also provides quick info and documentation for parameters, functions, streams, and operators if available. Hover over an item to view its info or documentation.

Screenshot showing Custom operator documentation appears as a tooltip when user hovers over the Custom operator in their SPL application.

Formatting

Format a selection of code or a whole document by using the built-in Format Document or Format Selection commands. See the VS Code Formatting documentation for more info.