mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-30 12:30:10 +01:00
74e747a6c7
Add a `kernel_language_names` field to `LanguageConfig` that allows languages to declare alternative names that Jupyter kernels may use. This fixes REPL matching for cases where a kernel reports a different language identifier than Zed's language name. For example, the Nu extension would set `kernel_language_names = ["nushell", "nu"]` in its config.toml, enabling REPL support for nu-jupyter-kernel which reports `"language": "nushell"` in its kernelspec. The change consolidates kernel language matching logic into a single `Language::matches_kernel_language()` method that checks the code fence block name, language name, and the new aliases list (all case-insensitive). - [x] Done a self-review taking into account security and performance aspects Release Notes: - Added `kernel_language_names` field for extensions to self identify REPL mappings