Skip to content

Enable Ruby LSP on-type formatting by default - #351

Draft
JacobNWolf wants to merge 1 commit into
zed-extensions:mainfrom
JacobNWolf:jacobwolf/enable-ontype-formatting-default
Draft

JacobNWolf wants to merge 1 commit into
zed-extensions:mainfrom
JacobNWolf:jacobwolf/enable-ontype-formatting-default

Conversation

@JacobNWolf

Copy link
Copy Markdown

Summary

Enable Ruby LSP on-type formatting by default by removing the extension's onTypeFormatting: false workaround for #38. Ruby LSP enables the feature by default; user-supplied initialization options, including an explicit opt-out, pass through unchanged.

Release prerequisites

Keep this PR in draft until both fixes have shipped:

Projects using a bundled or otherwise pinned Ruby LSP must update to a gem release containing the fix.

Validation

  • cargo test --locked --offline — 79 tests passed.
  • cargo check --locked --offline --target wasm32-wasip2 — passed.
  • cargo fmt --check and git diff --check — passed.

Manual verification with released fixes is pending:

  • With no on-type formatting override, pressing Enter after def foo or do |x| inserts an indented body and closing end, keeping the cursor in the body.
  • Heredoc terminators, block parameter pipes, and string interpolation complete with correct cursor placement.
  • Pressing Enter after # hello continues the comment with one # prefix.
  • An explicit lsp.ruby-lsp.initialization_options.enabledFeatures.onTypeFormatting: false still disables the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant