Skip to content

feat: add Kotlin/Scala glue file support and fix two bugs#140

Open
marton78 wants to merge 1 commit into
cucumber:mainfrom
marton78:kotlin-support
Open

feat: add Kotlin/Scala glue file support and fix two bugs#140
marton78 wants to merge 1 commit into
cucumber:mainfrom
marton78:kotlin-support

Conversation

@marton78

@marton78 marton78 commented Jun 24, 2026

Copy link
Copy Markdown

Summary

  • Adds kotlin (.kt/.kts) and scala (.scala) to glueExtByLanguageName so the server discovers step definitions in those files
  • Fix: reindex crash when DidChangeConfiguration sends null/malformed settings — params.settings was blindly cast to Settings, causing undefined.reduce() if features/glue were missing (observed with Zed)
  • Fix: wasmBasePath resolved incorrectly when npm hoists @cucumber/language-service; now uses require.resolve() instead of the hardcoded __dirname/../node_modules path

Dependency chain

This PR is a part of two, adding Kotlin support:

  1. cucumber/language-service #304 — Kotlin parsing (merge first)
  2. This PR — glue file discovery + two bug fixes

Note: the package.json currently points at marton78/language-service#kotlin-support for development; this should be updated to the official release once PR #304 merges.

Test plan

  • .kt and .kts files are indexed as glue files
  • .scala files are indexed as glue files
  • No crash when Zed sends DidChangeConfiguration with null/missing settings
  • wasmBasePath resolves correctly when @cucumber/language-service is hoisted by npm

- Add kotlin (.kt/.kts) and scala (.scala) to glueExtByLanguageName
- Fix: reindex crash when DidChangeConfiguration sends null/malformed
  settings (params.settings was blindly cast to Settings, causing
  undefined.reduce() if features/glue were missing — seen with Zed)
- Fix: wasmBasePath resolved incorrectly when npm hoists
  @cucumber/language-service; use require.resolve() instead of the
  hardcoded __dirname/../node_modules path
- Point @cucumber/language-service at marton78/language-service fork

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant