OGS Inspect
Language support, navigation, completion, and diagnostics for OpenGeoSys project files,
powered by Rust-based ogs-inspect.
OGS Inspect is under active development. APIs, diagnostics, and behavior may change between releases.
Highlights
Context-aware completions and diagnostics
OGS documentation on hover
Navigate to definitions
Rename across declared includes
Getting Started
- Install the extension.
- Open an
OpenGeoSys .prj file.
- Select the target OGS version with OGS Inspect: Select OGS Version, if needed.
- Diagnostics, navigation, hover, references, and completion are provided automatically.
If OGS Inspect does not activate, make sure the file is opened in VS Code's XML language mode.
Features
- Diagnostics for OpenGeoSys project files
- Go to definition
- Find references
- Rename symbols
- Schema and symbol information on hover
- Support for OpenGeoSys includes
- Document symbols / Outline view
- Context-aware completion for project structure, configuration values, and references
- Searchable, version-specific OpenGeoSys documentation
Diagnostics
OGS Inspect performs static analysis without running OpenGeoSys.
The bundled language server uses ogs-inspect to parse project files,
validate their structure against metadata for the selected OGS version,
resolve references across includes, and provide editor diagnostics and navigation.
Where schema metadata is available, structural diagnostics identify unexpected, missing, or duplicate
elements and attributes, as well as invalid cardinality and dependency constraints.
Suppressing diagnostics
A lint rule can be suppressed using an XML comment:
To suppress a rule for the following XML element:
<!-- ogs-inspect-disable OGS001 -->
To suppress a rule for the entire file:
<!-- ogs-inspect-disable-file OGS001 -->
To disable ogs-inspect entirely for a file:
<!-- ogs-inspect-disable-file -->
Navigation
Symbol-aware navigation is available for supported OGS elements:
- Go to definition
- Find references
- Rename symbols
- Hover information
Navigation works across supported OpenGeoSys include files.
Completion
OGS Inspect provides context-aware completion for OpenGeoSys elements, supported
configuration values, and symbol references. Structural suggestions follow the schema for the
selected OGS version and include snippets for required attributes and child elements,
along with valid values for configuration selector elements, where available.
Completion support is still expanding and does not yet cover every configuration context.
Documentation
Hovering over a recognized element or attribute shows available schema details such as its type,
whether it is required or repeatable, its default value, and a link to the corresponding OpenGeoSys documentation.
Use OGS Inspect: Open OGS Documentation to search the documentation available for
the selected OGS version and open a page in your browser.
Document symbols
The Outline view exposes selected elements of the project structure.
Document-symbol support is currently incomplete.
OGS Version
OGS Inspect can analyze projects using metadata for different OpenGeoSys versions:
master - latest development metadata
stable - latest supported stable release
6.5.9 - OpenGeoSys 6.5.9
6.5.8 - OpenGeoSys 6.5.8
The active version can be changed using OGS Inspect: Select OGS Version or the OGSInspect.OGSVersion setting.
Diagnostics, completion, and structural information use metadata for the selected version.
For development against the latest OpenGeoSys sources, use master.
For projects targeting a released OGS version, select the matching version, such as 6.5.9.
Project Files and Includes
OGS Inspect treats a .prj file and its referenced .include files as a single project.
Definitions and references can therefore be resolved across file boundaries.
Changes to included files automatically trigger re-analysis of dependent project files.
An include reused in multiple locations is analyzed in each of its structural contexts.
Supported files
OGS project files must be opened in VS Code's XML language mode.
.prj - OpenGeoSys project files
.include - included project fragments
Requirements
The language server is bundled with the extension.
Separate installation for ogs-inspect or OGS is not required.
Known Limitations
- Not all OGS configuration elements are understood yet.
- Completion does not yet cover every OGS configuration context.
- Document symbols cover only part of the project structure.
- Schema metadata and structural validation remain incomplete for some processes.
- Support may differ between OGS versions.
Issues
Report issues on GitLab.