Skip to content

Publish the grammars so install is one command #22

Description

@DerekCorniello

Follow-up to #18, which is now closed. #18 covered two different things - a grammar that did not work, and an install that was not easy. The first is fixed (muxlang/tree-sitter-mux#16, muxlang/mux-syntax-highlighting#13/#14, muxlang/mux-website#30): the grammar parses all 76 compiler test scripts, every operator highlights, and the float pattern matches the lexer in every consumer.

What is left is narrow and concrete: nothing is published anywhere.

nvim-treesitter registry            0 matches
VSCode Marketplace (mux-lang.*)     HTTP 404
Helix upstream languages.toml       0 matches

Where install actually stands

Editor Today One command?
Emacs treesit-install-language-grammar yes
Helix hx --grammar fetch && hx --grammar build + copy queries works, two steps
Neovim config block + :TSInstall mux works, needs config
VSCode build a .vsix locally no
Sublime / JetBrains copy a file no

Emacs and Helix went from failing outright to working once the parser was committed (muxlang/tree-sitter-mux#15). The remaining gap is distribution, not correctness.

The work

  1. nvim-treesitter registry - a PR to their repo adding Mux. Gets :TSInstall mux with no user config. The committed parser was the precondition and now exists.
  2. VSCode Marketplace / OpenVSX - publish textmate-mux/vscode-language-mux. Worth resolving the two-extension duplication first: editor-support/vscode (mux-syntax@0.1.0) and textmate-mux/vscode-language-mux (language-mux@0.5.0) overlap, and only the second is maintained.
  3. Helix upstream - submit the language + grammar entry so it ships in Helix itself.

The LSP question from #18 is answered: no, do not wait

#18 asked whether this should wait for an LSP (#16) so the two could be bundled. It should not:

  • The tree-sitter half never needed an LSP. It needed a committed parser. Registry submission is unblocked today.
  • The VSCode half does not either. The extension works now, and Marketplace extensions version independently - publish it and ship the LSP as a later version bump. Waiting keeps a working extension unpublished for however long LSP support (senior project topic) #16 takes.

Note

Submitting to the nvim-treesitter registry is close to one-way reputationally - it publishes a grammar under the language's name. Doing it before muxlang/tree-sitter-mux#16 would have shipped a parser that failed on a third of real Mux. It is safe now, and the CI drift check keeps the committed parser honest.

Metadata

Metadata

Labels

enhancementImprovement to existing behavior or UX

Projects

Status
Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions