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.
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
- Hover information
- Support for OpenGeoSys includes
- Document symbols / Outline view
- Completion for supported configuration values and references
Diagnostics
OGS Inspect performs static analysis without running OpenGeoSys. The bundled
language server uses ogs-inspect (CLI tool) to parse project files, resolve references
across includes and provide editor diagnostics and navigation.
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 completion for supported OpenGeoSys configuration values and symbol references.
Completion support is currently limited.
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.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 the 6.5.8 release, select 6.5.8.
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.
Supported files
OGS project files must be opened in VS Code's XML language mode.
.prj - OpenGeoSys project files
.include - included project fragments
.gml - referenced geometry files
Requirements
The language server is bundled with the extension.
Separate installation for ogs-inspect and/or OGS is not required.
Known Limitations
OGS Inspect is under active development.
- Not all OGS configuration elements are understood yet.
- Completion support currently focuses on symbol references.
- Document symbols cover only part of the project structure.
- Structural validation is incomplete.
- Support may differ between OGS versions.
Issues
Report issues on GitLab.