zed
zed copied to clipboard
failed to parse snippet: Caused by: expected an integer
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
I downloaded and installed the popular snippet collection https://github.com/rafamadriz/friendly-snippets.git, but Zed reported many errors while loading and parsing the snippet JSON files within it. I manually added log::info!() in snippets.rs to print out the string when errors occur, and the results are as follows:
2024-11-23T20:15:43.306771+08:00 [INFO] debug parse snippet: $TM_FILENAME_BASE}
${2:methods}
@end @implementation
2024-11-23T20:15:43.306805+08:00 [ERROR] failed to parse snippet
Caused by:
expected an integer
It appears that the parsing failed when trying to parse strings like $TM_FILENAME_BASE}.
This syntax is supported by simple-snippet-language-server. I'm not sure if this is by design or a bug.
Environment
Zed: v0.164.0 (Zed Dev 984bb192baa0d1f5cc27269c4929d8899cb07879) OS: macOS 15.1.0 Memory: 18 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
Zed.log