Commit 4a75488

HPCesia <me@hpcesia.com>
2025-10-24 15:59:58
feat: update zed config
1 parent baeb7e0
Changed files (4)
modules
dev
modules/dev/helix/languages/lua.nix
@@ -12,15 +12,13 @@
           formatter = {
             command = "stylua";
             args = [
-              "--indent-type"
-              "Spaces"
               "--indent-width"
               "2"
-              "--column-width"
-              "80"
-              "--call-parentheses"
-              "NoSingleTable"
+              "--syntax=Lua54"
+              "--respect-ignores"
               "--sort-requires"
+              "--stdin-filepath"
+              "%{buffer_name}"
               "-" # From stdin
             ];
           };
modules/dev/zed/languages/astro.nix
@@ -0,0 +1,20 @@
+{
+  flake.modules.homeManager.dev-zed = _: {
+    programs.zed-editor.extensions = ["astro"];
+
+    programs.zed-editor.userSettings = {
+      languages.Astro = {
+        format_on_save = "on";
+        formatter.external = {
+          command = "prettier";
+          arguments = [
+            "--parser"
+            "astro"
+            "--stdin-filepath"
+            "{buffer_path}"
+          ];
+        };
+      };
+    };
+  };
+}
modules/dev/zed/languages/lua.nix
@@ -0,0 +1,24 @@
+{
+  flake.modules.homeManager.dev-zed = _: {
+    programs.zed-editor.extensions = ["lua"];
+
+    programs.zed-editor.userSettings = {
+      languages.Lua = {
+        format_on_save = "on";
+        formatter.external = {
+          command = "stylua";
+          arguments = [
+            "--indent-width"
+            "2"
+            "--syntax=Lua54"
+            "--respect-ignores"
+            "--sort-requires"
+            "--stdin-filepath"
+            "{buffer_path}"
+            "-" # From stdin
+          ];
+        };
+      };
+    };
+  };
+}
modules/dev/zed/default.nix
@@ -13,9 +13,10 @@
         "material-icon-theme"
 
         # No specific config languages
+        "git-firefly" # Syntax highlighting for Git related files
         "just"
+        "just-ls"
         "latex"
-        "lua"
         "marksman"
         "mdx"
         "toml"