SWLS provides context-aware autocompletion at three levels: namespace prefixes (including automatic declaration insertion), RDF properties filtered and ranked by domain relevance, and OWL classes suggested when the predicate indicates a type assertion. All completion candidates come from loaded ontologies and the built-in prefix registry at prefix.cc.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.
Prefix completion
Typing the start of a known prefix triggers a completion item that expands to the full prefixed name and inserts the corresponding@prefix declaration at the top of the file if it is not already present. You never have to write the declaration by hand.
You can hide prefixes you never use from completion suggestions with
swls.prefixDisabled. For example, "swls.prefixDisabled": ["og", "schema"] removes those two prefixes from the list.Property completion
After a subject, SWLS suggests properties to use as predicates. Candidates are drawn from loaded ontologies and ranked by how closely the property’srdfs:domain matches the known type of the current subject. Properties with an exact domain match appear first; properties with no domain restriction follow.
swls.completion.mode:
| Mode | Behaviour |
|---|---|
none | Server default (same as loose) |
loose | All properties suggested; domain-matched ones ranked first |
strict | Only properties whose domain matches the subject type are shown |
Fine-tune the mode per namespace using
swls.completion.strict (force strict for specific prefixes even in loose mode) and swls.completion.except (always show specific prefixes even in strict mode). See Completion Modes for details.Class completion
When the predicate isa (shorthand for rdf:type) or rdf:type, SWLS switches the completion context to suggest OWL classes instead of properties. Only classes from loaded ontologies are offered, keeping the list focused.
Class and property completions are only as rich as the ontologies you have loaded. Add extra ontology URLs via
swls.ontologies to broaden the suggestion set. See Ontologies and Shapes.