Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,50 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.3.0] — 2026-06-08

gmat-script grows from a parser and formatter into a full editor toolchain: a GMAT field catalogue
reflected from R2026a, a linter that checks scripts against it, a Language Server Protocol server,
and a VS Code extension on the Marketplace and Open VSX. Everything still runs with no GMAT install —
the catalogue ships as data inside the wheel — and the grammar is unchanged, so every byte-for-byte
round-trip from earlier releases still holds.

### Added

- **Field catalogue (`gmat_script.catalog`)** — the semantics GMAT defines but the permissive grammar
deliberately ignores: every resource type, its fields, and each field's type, default, allowed
values, units, and reference target. Reflected from GMAT R2026a through `gmatpy` by a
`tools/gen_catalog.py` generator and shipped as a version-pinned, provenance-stamped data file
(`data/fields-R2026a.json`, 102 resource types and 2614 fields) inside the wheel, loaded by
`load_catalog()`. Adding another GMAT release is a new data file, not a code change, and nothing
downstream needs a GMAT install (#19).
- **Linter (`gmat-script lint`)** — a structural checker that reads the field catalogue: it flags
unknown resource fields, enum and type violations, references to undeclared resources, duplicate
names, and more, with inline suppression comments and `ruff`-style severities and exit codes. Each
diagnostic carries a rule id, a location, and a message, and the engine is shared verbatim with the
language server (#20).
- **Tree-sitter queries** — `highlights`, `locals`, and `tags` queries packaged with the
`tree-sitter-gmat` grammar, giving editors resource / command / field highlighting, scope-aware
local resolution, and a symbol index with no extra setup (#21).
- **Language server (`gmat-script[lsp]`)** — a `pygls` server, launched as `gmat-script-lsp` or
`python -m gmat_script.lsp`, that brings the catalogue and linter to any LSP-capable editor: hover
docs for a field's type, default, allowed values, and units; live diagnostics as you type;
completion of resource names, the fields valid for the resource under the cursor, and enum values;
go-to-definition and find-all-references; a document outline; and format-on-save via the canonical
formatter (#22).
- **VS Code extension** — **GMAT Script**, published to the Visual Studio Marketplace and Open VSX.
Bundled TextMate highlighting works the moment it installs; the richer language features come from
the language server (`pip install "gmat-script[lsp]"`). `.script` and `.gmf` files get a file icon,
comment / bracket configuration, and format-on-save on by default (#23).
- **Documentation** — new guide pages for the field catalogue, the linter, the language server, and
the VS Code extension, plus README sections on editor tooling and the GMAT-free catalogue (#25).

### Changed

- `gmat-script` (PyPI) and `tree-sitter-gmat` (npm) continue to release in version lockstep, now at
0.3.0. The grammar and generated parser are unchanged since 0.2.0; the npm package is republished
to carry the new editor queries — an expanded `highlights.scm` and a new `locals.scm` (#21).

## [0.2.0] — 2026-06-08

A typed AST overlay over the v0.1 parse tree, a lossless mutation API, a canonical formatter, and a
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ add the repo to your `.pre-commit-config.yaml`:
```yaml
repos:
- repo: https://github.com/astro-tools/gmat-script
rev: v0.2.0
rev: v0.3.0
hooks:
- id: gmat-script-format # auto-format on commit
# - id: gmat-script-format-check # or: check only, never write (CI)
Expand Down
1 change: 1 addition & 0 deletions editors/vscode/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ tsconfig.json
**/*.ts
.gitignore
.eslintrc*
images/README.md
3 changes: 1 addition & 2 deletions editors/vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Language support for [GMAT](https://gmat.atlassian.net/wiki/spaces/GW/overview)
`.script` and `.gmf` files — built on the [`gmat-script`](https://github.com/astro-tools/gmat-script)
tree-sitter grammar and language server.

<!-- A short highlighting + diagnostics demo lands here for the release.
![GMAT Script in VS Code](images/demo.gif) -->
![GMAT Script in VS Code](images/demo.gif)

## Features

Expand Down
17 changes: 11 additions & 6 deletions editors/vscode/icons/gmat-file.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified editors/vscode/icons/gmat-script.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added editors/vscode/images/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions editors/vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion editors/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "gmat-script",
"displayName": "GMAT Script",
"description": "Highlighting, hover docs, diagnostics, go-to-definition, completion, and format-on-save for GMAT mission scripts (.script / .gmf).",
"version": "0.2.0",
"version": "0.3.0",
"publisher": "astro-tools",
"license": "MIT",
"icon": "icons/gmat-script.png",
Expand Down
2 changes: 1 addition & 1 deletion src/gmat_script/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
"load_catalog",
"parse",
]
__version__ = "0.2.0"
__version__ = "0.3.0"
4 changes: 2 additions & 2 deletions tree-sitter-gmat/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tree-sitter-gmat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tree-sitter-gmat",
"version": "0.2.0",
"version": "0.3.0",
"description": "GMAT mission script grammar for tree-sitter",
"license": "MIT",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion tree-sitter-gmat/src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -9068,7 +9068,7 @@ TS_PUBLIC const TSLanguage *tree_sitter_gmat(void) {
.max_reserved_word_set_size = 0,
.metadata = {
.major_version = 0,
.minor_version = 2,
.minor_version = 3,
.patch_version = 0,
},
};
Expand Down
2 changes: 1 addition & 1 deletion tree-sitter-gmat/tree-sitter.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"metadata": {
"version": "0.2.0",
"version": "0.3.0",
"license": "MIT",
"description": "GMAT mission script grammar for tree-sitter",
"authors": [
Expand Down
Loading