BjAlvestad / vscode-simatic-scl

VS Code extensions for the SCL language used in TIA Portal
4 stars 0 forks source link

SCL extension with LSP for VS Code

This is an extension that provides an LSP for the SCL language. It is still in early development, and not ready for use, but cross reference support for local variables, UDTs and FBs is already implemented.

Since this extension is providing a language server, which has not been optimized yet, you should expect a performance impact.
If you are only interested in the syntax highlighting, which would give no performance impact, then use the extension Gunders89.vscode-scl instead. His extension also provides snippets, which this extension currently does not (although this extension will give scoped auto-complete, at a performance cost, which his does not).

The following major things have not been implemented yet:

It is also limited to using 4GB RAM in VS Code, so it is not able to open extremely large projects, unless you choose to filter what is included.

Any document with a linking error will get all its references recalculated on an update to any file. And will therefore have a major effect on performance, since it essentially gains no benefit from the caching. Due to not supporting all built-in functions yet, and not parsing tags yet, multiple linking errors are expected.

Changelog

v0.0.6

v0.0.5

Note on how filter works:

As of now, this gets defined via a file named includeFoldersFilter.scl-lsp and which is placed in root of workspace you open. If this is missing all files gets loaded. Note that this only limits what is loaded initially. So if you open any other files, then they will also get loaded into the Language Server. It is possible to utilize the built in file.exclude to exclude these folders from VS Code explorer and quick open. Future plans for this is to instead rely on json files that define which folders to be included, and based on those limit both what is initially loaded to Langauge Server, and which folders are visible in VS Code.

v0.0.4

v0.0.3

Fix grammar ambiguity for CaseLabel, FeatureCall and initializations.

Fix several parser errors (i.e. errors saying Expect...), like:

And several other minor fixes.

Parsing of nested multiline blocks is not yet handled. Otherwise handled all parser errors (i.e. errors starting with "Expect") from partial test project.

v0.0.2

v0.0.1

First version with cross reference support for local variables, UDTs and structs.