Skip to content

SemanticWebLanguageServer/swls-vscode

Repository files navigation

Semantic Web Language Server

CI Docs LICENSE Visual Studio Marketplace Last Updated

IDE support for Semantic Web languages — Turtle, TriG, JSON-LD, and SPARQL. Autocompletion, diagnostics, formatting, SHACL validation, and more.

Table of Contents

Features

Diagnostics

  • Syntax errors — immediate feedback on malformed documents
  • Undefined prefixes — flags uses of undeclared namespace prefixes
  • SHACL shape violations — validates data against loaded SHACL shapes

Completion

  • Prefix completion — typing foa expands to foaf: and inserts the prefix declaration
  • Property completion — suggests properties ordered by domain relevance
  • Class completion — when the predicate is a, suggests applicable classes

Hover

  • Shows labels, descriptions, and class information for IRIs

Rename

  • Rename terms local to the current file

Formatting

  • Format Turtle and JSON-LD documents

Semantic Highlighting

  • Full semantic token highlighting for all supported languages

Installation

VS Code

Install from the Visual Studio Marketplace or Open VSX Registry.

On startup the extension looks for a native swls binary — first in its own managed location, then in your PATH. If no binary is found it falls back to a bundled WASM worker so the LSP is available immediately without any extra setup.

In the background it checks GitHub releases for updates. When a newer version is available you will be prompted to install it; after the download completes a window reload switches to the native binary.

NeoVim

A NeoVim plugin is available at SemanticWebLanguageServer/swls.nvim.

Configuration

All settings live under the swls prefix.

Setting Type Default Description
swls.turtle boolean true Enable Turtle language support
swls.jsonld boolean true Enable JSON-LD language support
swls.sparql boolean false Enable SPARQL language support (experimental)
swls.checkUpdate boolean true Check GitHub for new releases on startup
swls.automaticUpdate boolean false Install updates without prompting
swls.log string "debug" Log level: error, warn, info, debug, trace
swls.ontologies string[] [] Extra ontology URLs to load
swls.shapes string[] [] Extra SHACL shape URLs to load
swls.disabled string[] [] Features to disable (e.g. "shapes")
swls.prefixDisabled string[] [] Prefixes from prefix.cc to hide from completions
swls.completion.mode string "none" Property completion mode: none (server default), loose (all properties), strict (domain-matched only)
swls.completion.strict string[] [] Namespace prefixes that require a matching domain even in loose mode
swls.completion.except string[] [] Namespace prefixes always suggested regardless of domain, even in strict mode

Documentation

Screenshots

Undefined prefix Shape violation
Undefined Prefixes Shape violations
Class completion Property completion
Complete Class Complete Property

About

VSCode plugin for the semantic web language server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors