programs/zed/settings.nix (view raw)
1{ pkgs, lib, ... }:
2
3let
4 isDarwin = lib.strings.hasSuffix "darwin" pkgs.stdenv.hostPlatform.system;
5 zedSettings = {
6 telemetry = {
7 diagnostics = false;
8 metrics = false;
9 };
10 base_keymap = "VSCode";
11 buffer_font_size = 15;
12 theme = "Icy Light";
13 buffer_font_family = if isDarwin then "SF Mono" else "Input";
14 buffer_font_weight = 500;
15 ui_font_family = if isDarwin then "System Font" else "Inter";
16 ui_font_size = 18;
17 vim_mode = true;
18 vim = {
19 use_system_clipboard = "never";
20 };
21 gutter = {
22 line_numbers = false;
23 };
24 terminal = {
25 working_directory = "current_project_directory";
26 option_as_meta = true;
27 env = {
28 EDITOR = "zed --wait";
29 };
30 shell = {
31 program = "fish";
32 };
33 };
34 project_panel = {
35 file_icons = false;
36 folder_icons = false;
37 indent_size = 10;
38 };
39 chat_panel = {
40 button = false;
41 };
42 collaboration_panel = {
43 button = false;
44 };
45 assistant = {
46 default_model = {
47 provider = "copilot_chat";
48 model = "gpt-4";
49 };
50 version = "2";
51 enabled = true;
52 button = true;
53 };
54 scrollbar = {
55 show = "auto";
56 };
57 toolbar = {
58 breadcrumbs = true;
59 quick_actions = true;
60 };
61 tab_bar = {
62 show = false;
63 };
64 };
65
66 zedSettingsFile = pkgs.writeText "settings.json" (builtins.toJSON zedSettings);
67in
68{
69 home.file.".config/zed/settings.json".source = zedSettingsFile;
70}