Closed jansol closed 3 months ago
I was thinking about creating a similar bug report, but found this one. By default the ~/.config/zed/keymap.json
file is not created. This or empty file results with a:
[2024-04-28T02:05:27+03:00 ERROR util] crates/zed/src/zed.rs:637: EOF while parsing a value at line 1 column 0
The error is located in pub fn handle_keymap_file_changes(mut user_keymap_file_rx: mpsc::UnboundedReceiver<String>, cx: &mut AppContext,)
in file src/zed.rs
in zed
crate.
The &user_keymap_content
is empty ""
causing a parsing error.
This could be fixed by:
KeymapFile::parse(&user_keymap_content)
which should handle empty values properlyif
condition checking if &user_keymap_content
is empty[]
contentsZed now does add the following when opening the settings view for the first time:
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run the `zed: Open Default Settings` command
// from the command palette
{
"ui_font_size": 16,
"buffer_font_size": 16,
"theme": {
"mode": "system",
"light": "One Light",
"dark": "One Dark"
}
}
It doesn't add a lot, but it explains how to find more options, so I think this issue can be closed.
Check for existing issues
Describe the feature
Currently creating custom keybindings requires a bit of inferring the file structure from the default bindings if there is no keymap.json yet. This could be improved easily by having zed fill out the buffer for a new keymap.json with the basic file structure and some helpful comments.
If applicable, add mockups / screenshots to help present your vision of the feature