Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/SemanticWebLanguageServer/swls-vscode/llms.txt

Use this file to discover all available pages before exploring further.

SWLS (Semantic Web Language Server) is a VS Code extension that gives you full IDE support when working with Semantic Web formats. Whether you are building ontologies in Turtle, querying graphs with SPARQL, or describing linked data in JSON-LD, SWLS provides the editor features you rely on in other languages: instant diagnostics, smart autocompletion, hover documentation, formatting, and semantic highlighting — all powered by a native language server with a WASM fallback so it works everywhere VS Code runs.

Installation

Install from the VS Code Marketplace or Open VSX Registry in seconds.

Quickstart

Open a Turtle file and see SWLS in action within minutes.

Configuration

Tune every aspect of the language server with the swls.* settings.

Features

Explore diagnostics, completion, hover, rename, formatting, and more.

What SWLS supports

SWLS activates automatically for these file types:
LanguageExtensionsEnabled by default
Turtle.ttl
TriG.trig
JSON-LD.jsonld, .json
SPARQL.sq, .rq⚠️ Experimental

Get up and running

1

Install the extension

Search for Semantic Web LSP in the VS Code Extensions panel, or install directly from the Visual Studio Marketplace.
2

Open a Turtle file

Open any .ttl file. SWLS activates automatically and starts the language server — no extra configuration needed.
3

See completions and diagnostics

Start typing a prefix like foaf: to see class and property completions. Syntax errors and undefined prefixes are underlined in real time.
4

Customize as needed

Add extra ontologies, configure SHACL shapes, or tune completion strictness via the swls.* settings in your VS Code preferences.

Key features

Diagnostics

Syntax errors, undefined prefixes, and SHACL shape violations surfaced inline as you type.

Smart Completion

Context-aware suggestions for prefixes, properties, and classes with domain-based ordering.

Hover & Rename

Hover any IRI for labels and descriptions. Rename local terms across the file.

Semantic Highlighting

Full semantic token highlighting for all four supported languages.
SWLS works entirely offline after installation. It bundles a WASM build of the language server so it runs in VS Code for the Web and in remote/container environments without any additional dependencies.

Build docs developers (and LLMs) love