-
Notifications
You must be signed in to change notification settings - Fork 3
/
zed.nix
54 lines (54 loc) · 1.12 KB
/
zed.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
pkgs,
config,
lib,
...
}:
with lib;
let
cfg = config.my.programConfig.zed;
formatWithPrettier = {
format_on_save = "on";
formatter.external = {
command = pkgs.nodePackages_latest.prettier;
arguments = [
"--stdin-filepath"
"{buffer_path}"
];
};
};
in
{
imports = [
../modules/home/zed.nix
];
options = {
my.programConfig.zed.enable = mkEnableOption "my Zed config";
};
config = mkIf cfg.enable {
programConfig.zed.enable = true;
programConfig.zed.settings = {
ui_font_family = "Zed Sans";
theme = "Gruvbox Dark";
buffer_font_size = 12;
vim_mode = true;
cursor_blink = false;
remove_trailing_whitespace_on_save = true;
inlay_hints.enabled = true;
languages = {
Rust.format_on_save = "on";
JSON = formatWithPrettier;
JavaScript = formatWithPrettier;
};
confirm_quit = false;
terminal.option_as_meta = true;
hover_popover_enabled = true;
soft_wrap = "none";
};
programConfig.zed.keymap = [
{
bindings."cmd-," = null;
}
];
};
}