mirror of
				https://github.com/Jokiller230/puzzlevision.git
				synced 2025-10-31 22:00:05 +00:00 
			
		
		
		
	✨ (modules/home) Update default Zed module configuration
This commit is contained in:
		
							parent
							
								
									d32bad92f0
								
							
						
					
					
						commit
						76489651f1
					
				
					 1 changed files with 87 additions and 20 deletions
				
			
		|  | @ -5,7 +5,7 @@ | ||||||
|   config, |   config, | ||||||
|   ... |   ... | ||||||
| }: let | }: let | ||||||
|   inherit (lib) mkEnableOption mkIf; |   inherit (lib) mkEnableOption mkIf mkForce; | ||||||
|   inherit (self) namespace; |   inherit (self) namespace; | ||||||
| 
 | 
 | ||||||
|   cfg = config.${namespace}.apps.zed; |   cfg = config.${namespace}.apps.zed; | ||||||
|  | @ -15,51 +15,118 @@ in { | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   config = mkIf cfg.enable { |   config = mkIf cfg.enable { | ||||||
|     home.packages = with pkgs; [ |  | ||||||
|       alejandra |  | ||||||
|     ]; |  | ||||||
| 
 |  | ||||||
|     programs.zed-editor = { |     programs.zed-editor = { | ||||||
|       enable = true; |       enable = true; | ||||||
|       extensions = ["nix" "catppuccin" "wakatime" "discord_presence" "deno"]; |  | ||||||
| 
 | 
 | ||||||
|       userSettings = { |       userSettings = { | ||||||
|         icon_theme = "Catppuccin Macchiato"; |         ### Theme settings | ||||||
|         theme = { |         icon_theme = mkForce { | ||||||
|           dark = "Catppuccin Macchiato (blue)"; |           dark = mkIf config.catppuccin.enable "Catppuccin Macchiato"; | ||||||
|           light = "Catppuccin Macchiato (blue)"; |           light = mkIf config.catppuccin.enable "Catppuccin Latte"; | ||||||
|  |         }; | ||||||
|  | 
 | ||||||
|  |         theme = mkForce { | ||||||
|  |           dark = mkIf config.catppuccin.enable "Catppuccin Macchiato (blue)"; | ||||||
|  |           light = mkIf config.catppuccin.enable "Catppuccin Latte (blue)"; | ||||||
|         }; |         }; | ||||||
| 
 | 
 | ||||||
|         ### Disable telemetry |         ### Disable telemetry | ||||||
|         telemetry = { |         telemetry = { | ||||||
|  |           diagnostics = false; | ||||||
|           metrics = false; |           metrics = false; | ||||||
|         }; |         }; | ||||||
| 
 | 
 | ||||||
|         ### Disable certain AI features |         ### Remove useless features and stuff | ||||||
|  |         show_call_status_icon = false; | ||||||
|  |         agent.button = false; | ||||||
|  |         collaboration_panel.button = false; | ||||||
|  |         chat_panel.button = false; | ||||||
|  | 
 | ||||||
|         features = { |         features = { | ||||||
|  |           inline_completion_provider = "none"; | ||||||
|  |           edit_prediction_provider = "none"; | ||||||
|           copilot = false; |           copilot = false; | ||||||
|         }; |         }; | ||||||
| 
 | 
 | ||||||
|         formatter = { |         ### Formatting and saving settings | ||||||
|           external = { |         formatter = "language_server"; | ||||||
|             command = "alejandra"; |         format_on_save = "on"; | ||||||
|             arguments = ["--quiet"]; |         autosave.after_delay.milliseconds = 0; | ||||||
|             language = ["nix"]; | 
 | ||||||
|           }; |         diagnostics.inline.enable = true; | ||||||
|  | 
 | ||||||
|  |         indent_guides = { | ||||||
|  |           enable = true; | ||||||
|  |           coloring = "indent_aware"; | ||||||
|         }; |         }; | ||||||
| 
 | 
 | ||||||
|         format_on_save = "on"; |         hard_tabs = true; | ||||||
|  |         tab_size = 2; | ||||||
|  |         soft_wrap = "preferred_line_length"; | ||||||
| 
 | 
 | ||||||
|         ### Language specific configurations |         ### Language specific configurations | ||||||
|         languages = { |         languages = { | ||||||
|           ### Nix language |  | ||||||
|           Nix = { |           Nix = { | ||||||
|             language_servers = ["nixd" "!nil"]; |             language_servers = ["nixd" "!nil"]; | ||||||
|  |             formatter = { | ||||||
|  |               external = { | ||||||
|  |                 command = "alejandra"; | ||||||
|  |                 arguments = ["--quiet"]; | ||||||
|  |               }; | ||||||
|  |             }; | ||||||
|           }; |           }; | ||||||
|         }; |         }; | ||||||
|  | 
 | ||||||
|  |         ### Base editor configurations | ||||||
|  |         auto_update = false; | ||||||
|  |         auto_install_extension = { | ||||||
|  |           # Web dev | ||||||
|  |           html = true; | ||||||
|  |           svelte = true; | ||||||
|  |           ejs = true; | ||||||
|  |           scss = true; | ||||||
|  | 
 | ||||||
|  |           # Languages | ||||||
|  |           nix = true; | ||||||
|  |           php = true; | ||||||
|  |           sql = true; | ||||||
|  |           toml = true; | ||||||
|  |           pylsp = true; # Python | ||||||
|  |           fish = true; | ||||||
|  | 
 | ||||||
|  |           # Docker | ||||||
|  |           dockerfile = true; | ||||||
|  |           docker-compose = true; | ||||||
|  | 
 | ||||||
|  |           # Theming | ||||||
|  |           catppuccin = mkIf config.catppuccin.enable true; | ||||||
|  |           catppuccin-icons = mkIf config.catppuccin.enable true; | ||||||
|  | 
 | ||||||
|  |           # Other | ||||||
|  |           discord-presence = true; | ||||||
|  |           git-firefly = true; | ||||||
|  |           wakatime = true; | ||||||
|  |         }; | ||||||
|       }; |       }; | ||||||
| 
 | 
 | ||||||
|       extraPackages = with pkgs; [nixd]; |       userKeymaps = [ | ||||||
|  |         { | ||||||
|  |           context = "Editor"; | ||||||
|  |           bindings = { | ||||||
|  |             # This relies on autosave being active, as it overwrites the default file save keybinding | ||||||
|  |             ctrl-s = "editor::Format"; | ||||||
|  |           }; | ||||||
|  |         } | ||||||
|  |       ]; | ||||||
|  | 
 | ||||||
|  |       extraPackages = with pkgs; [ | ||||||
|  |         ### Nix | ||||||
|  |         nixd | ||||||
|  |         alejandra | ||||||
|  | 
 | ||||||
|  |         ### Python | ||||||
|  |         python3Packages.python-lsp-server | ||||||
|  |       ]; | ||||||
|     }; |     }; | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue