VS Code extension (Marketplace + Open VSX)#54
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
editors/vscode/: a TextMate grammar for standalone syntax highlighting, plus a thin LSP client that launches thegmat-script-lspserver 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..vsixpackaging — and release publishing to the VS Code Marketplace + Open VSX (idempotent, gated on user-provided tokens).Design decisions
pip install "gmat-script[lsp]"; no bundled interpreter (keeps the lean-install guarantee). Configurable viagmatScript.server.path/gmatScript.server.pythonPath.[gmat]viaconfigurationDefaults(fully overridable).astro-tools. Version0.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.
astro-tools(Azure DevOps org) + a PAT → repo secretVSCE_PAT.astro-toolsnamespace + an access token → repo secretOVSX_PAT.editors/vscode/images/demo.gifand uncomment the reference in the extension README.Test plan
vscodejob green: lint + type-check + headless activation test +.vsixpackaging..vsixand confirm highlighting, hover, diagnostics, go-to-definition, completion, and format-on-save on a stock GMAT sample.Notes
vsce packageand the Electron activation test were not run locally (local Node is 18 — belowvsce's Node-20 floor — and there is noxvfb); both run in CI on Node 22.Closes #23