refactor: rename keybind inherit setting
This commit is contained in:
parent
264c6ca54b
commit
71a821aad6
2 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
||||||
"settings": {
|
"settings": {
|
||||||
"init_command": ["enter_helix_mode"],
|
"init_command": ["enter_helix_mode"],
|
||||||
"deinit_command": ["exit_helix_mode"],
|
"deinit_command": ["exit_helix_mode"],
|
||||||
"fallback": "vim"
|
"inherit": "vim"
|
||||||
},
|
},
|
||||||
"normal": {
|
"normal": {
|
||||||
"syntax": "vim",
|
"syntax": "vim",
|
||||||
|
|
|
@ -206,13 +206,13 @@ const Namespace = struct {
|
||||||
const JsonSettings = struct {
|
const JsonSettings = struct {
|
||||||
init_command: ?[]const std.json.Value = null,
|
init_command: ?[]const std.json.Value = null,
|
||||||
deinit_command: ?[]const std.json.Value = null,
|
deinit_command: ?[]const std.json.Value = null,
|
||||||
fallback: ?[]const u8 = null,
|
inherit: ?[]const u8 = null,
|
||||||
};
|
};
|
||||||
const parsed = try std.json.parseFromValue(JsonSettings, allocator, settings_value, .{
|
const parsed = try std.json.parseFromValue(JsonSettings, allocator, settings_value, .{
|
||||||
.ignore_unknown_fields = true,
|
.ignore_unknown_fields = true,
|
||||||
});
|
});
|
||||||
defer parsed.deinit();
|
defer parsed.deinit();
|
||||||
self.fallback = if (parsed.value.fallback) |fallback| try get_or_load_namespace(fallback) else null;
|
self.fallback = if (parsed.value.inherit) |fallback| try get_or_load_namespace(fallback) else null;
|
||||||
if (parsed.value.init_command) |cmd| self.init_command = try Command.load(allocator, cmd);
|
if (parsed.value.init_command) |cmd| self.init_command = try Command.load(allocator, cmd);
|
||||||
if (parsed.value.deinit_command) |cmd| self.deinit_command = try Command.load(allocator, cmd);
|
if (parsed.value.deinit_command) |cmd| self.deinit_command = try Command.load(allocator, cmd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue