Skip to content

VS Code extension (Marketplace + Open VSX)#54

Merged
djankov merged 4 commits into
mainfrom
issue-23-vscode-extension
Jun 8, 2026
Merged

VS Code extension (Marketplace + Open VSX)#54
djankov merged 4 commits into
mainfrom
issue-23-vscode-extension

Conversation

@djankov

@djankov djankov commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a VS Code extension under editors/vscode/: a TextMate grammar for standalone syntax highlighting, plus a thin LSP client that launches the gmat-script-lsp server over stdio for hover, diagnostics, go-to-definition, references, symbols, completion, and format-on-save. It degrades to highlighting-only (with a one-time install hint) when the server is absent.
  • Wires CI — lint, type-check, a headless activation smoke test, and .vsix packaging — and release publishing to the VS Code Marketplace + Open VSX (idempotent, gated on user-provided tokens).
  • Documents the extension on the language-server docs page.

Design decisions

  • Python LSP delivery → user-provided environment. pip install "gmat-script[lsp]"; no bundled interpreter (keeps the lean-install guarantee). Configurable via gmatScript.server.path / gmatScript.server.pythonPath.
  • Format-on-save enabled for [gmat] via configurationDefaults (fully overridable).
  • Publisher astro-tools. Version 0.2.0 (lockstep with the current repo version; the release-cut bumps it to 0.3.0 alongside the wheel and the npm grammar).

Manual setup required before publishing

These are user-only steps, like the PyPI pending publisher and npm bootstrap. Tracked in the v0.3.0 release-cut issue; CI and this PR go green without them.

  • Create the VS Code Marketplace publisher astro-tools (Azure DevOps org) + a PAT → repo secret VSCE_PAT.
  • Create the Open VSX astro-tools namespace + an access token → repo secret OVSX_PAT.
  • (Optional) Record the demo GIF at editors/vscode/images/demo.gif and uncomment the reference in the extension README.

Test plan

  • CI vscode job green: lint + type-check + headless activation test + .vsix packaging.
  • All existing CI jobs remain green.
  • (manual, post-publish) Install the packaged .vsix and confirm highlighting, hover, diagnostics, go-to-definition, completion, and format-on-save on a stock GMAT sample.

Notes

  • vsce package and the Electron activation test were not run locally (local Node is 18 — below vsce's Node-20 floor — and there is no xvfb); both run in CI on Node 22.
  • The repo README's editor/LSP section is deferred to the dedicated "Docs + README: v0.3" issue, matching the per-feature doc-lag convention. This PR updates the language-server doc page (the feature's own home).

Closes #23

djankov added 4 commits June 8, 2026 19:09
A thin LSP client over the gmat-script language server plus a bundled TextMate grammar so highlighting works standalone. Launches gmat-script-lsp over stdio (configurable via gmatScript.server.*), degrading to highlighting only when the server is absent, and enables format-on-save for GMAT files. esbuild-bundled and packaged with @vscode/vsce under the astro-tools publisher.
ci.yml gains a vscode job that lints, type-checks, runs the activation test in a headless VS Code (xvfb), and packages the .vsix so a broken manifest fails in CI rather than at release. release.yml gains a publish-vscode job that ships to the VS Code Marketplace (VSCE_PAT) and Open VSX (OVSX_PAT) on tag, each step gated on its token and idempotent on the published version. .gitignore covers the editor build artifacts and *.vsix.
Point the VS Code subsection at the Marketplace and Open VSX listings, the install step, and the server-discovery settings.
pretest compiled the test sources but not the esbuild bundle that main points at, so the headless activation test failed to load dist/extension.js in CI. Add compile to pretest.
@djankov djankov marked this pull request as ready for review June 8, 2026 23:26
@djankov djankov merged commit 4b003a7 into main Jun 8, 2026
26 checks passed
@djankov djankov deleted the issue-23-vscode-extension branch June 8, 2026 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS Code extension (Marketplace + Open VSX)

1 participant