fix: enable comment toggle shortcut in env variable editor (#4402) (#4473)

This commit is contained in:
Mauricio Siu
2026-05-22 17:00:58 -06:00
committed by GitHub
parent f6e6e5cc00
commit 34d38cf90e
@@ -167,7 +167,13 @@ export const CodeEditor = ({
? css()
: language === "shell"
? StreamLanguage.define(shell)
: StreamLanguage.define(properties),
: StreamLanguage.define({
...properties,
// The legacy properties mode lacks comment metadata, so
// CodeMirror's toggle-comment shortcut (Mod-/) has no comment
// token to use. Declare `#` as the line comment for env editors.
languageData: { commentTokens: { line: "#" } },
}),
props.lineWrapping ? EditorView.lineWrapping : [],
language === "yaml"
? autocompletion({