From e4ea8ae3b9f40067e143941609042b132576f67d Mon Sep 17 00:00:00 2001 From: CJ Pokowitz <86695177+cjtheham@users.noreply.github.com> Date: Fri, 13 Feb 2026 02:54:44 -0600 Subject: [PATCH] docs: Add note about escaping `$` in snippets (#48710) In writing PHP snippets, I ran into this issue and only discovered this has to be done through reviewing examples of other PHP snippets. I think it would be useful to include some mention of this behavior in the documentation - although I'm not great at writing docs and not sure if this is the best place or way to write this out. Open to any feedback on this or perfectly okay if maintainers find this unnecessary. Release Notes: - N/A --------- Co-authored-by: Kunall Banerjee --- docs/src/snippets.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/snippets.md b/docs/src/snippets.md index b659269ba6f2ab38f38e99695588e1e4c8464dee..8d663372b8983801efb2405c17f2f580ebbf6e97 100644 --- a/docs/src/snippets.md +++ b/docs/src/snippets.md @@ -18,6 +18,7 @@ The snippets are located in `~/.config/zed/snippets` directory to which you can // Use placeholders like $1, $2 or ${1:defaultValue} to define tab stops. // The $0 determines the final cursor position. // Placeholders with the same value are linked. + // If the snippet contains the $ symbol outside of a placeholder, it must be escaped with two slashes (e.g. \\$var). "Log to console": { "prefix": "log", "body": ["console.info(\"Hello, ${1:World}!\")", "$0"],