Skip to content

Commit 34d38cf

Browse files
authored
fix: enable comment toggle shortcut in env variable editor (Dokploy#4402) (Dokploy#4473)
1 parent f6e6e5c commit 34d38cf

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎apps/dokploy/components/shared/code-editor.tsx‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,13 @@ export const CodeEditor = ({
167167
? css()
168168
: language === "shell"
169169
? StreamLanguage.define(shell)
170-
: StreamLanguage.define(properties),
170+
: StreamLanguage.define({
171+
...properties,
172+
// The legacy properties mode lacks comment metadata, so
173+
// CodeMirror's toggle-comment shortcut (Mod-/) has no comment
174+
// token to use. Declare `#` as the line comment for env editors.
175+
languageData: { commentTokens: { line: "#" } },
176+
}),
171177
props.lineWrapping ? EditorView.lineWrapping : [],
172178
language === "yaml"
173179
? autocompletion({

0 commit comments

Comments
 (0)