repl: Support kernel language aliases in REPL#49762
Merged
miguelraz merged 1 commit intozed-industries:mainfrom Mar 4, 2026
Merged
repl: Support kernel language aliases in REPL#49762miguelraz merged 1 commit intozed-industries:mainfrom
miguelraz merged 1 commit intozed-industries:mainfrom
Conversation
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"]` 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).
a32991c to
f2f2c77
Compare
ian-h-chamberlain
added a commit
to ian-h-chamberlain/nu
that referenced
this pull request
Mar 23, 2026
See zed-industries/zed#49762 for details, this enables out-of-the-box support for nu-juypter-kernel (which registers itself with the language name `nushell`).
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.
Add a
kernel_language_namesfield toLanguageConfigthat 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).Release Notes:
kernel_language_namesfield for extensions to self identify REPL mappings