Commit 32c1d80

HPCesia <me@hpcesia.com>
2025-05-31 11:20:12
feat(app): tui editors config
1 parent 2d7ad08
Changed files (6)
home/base/core/editors/helix/default.nix
@@ -1,4 +1,4 @@
-{pkgs, ...}: {
+{...}: {
   programs.helix = {
     enable = true;
   };
home/base/core/editors/micro/default.nix
@@ -1,4 +1,4 @@
-{pkgs, ...}: {
+{...}: {
   programs.micro = {
     enable = true;
   };
home/base/tui/editors/helix/default.nix
@@ -0,0 +1,12 @@
+{...}: {
+  imports = [./languages.nix];
+
+  programs.helix = {
+    editor = {
+      cursorline = true;
+      color-modes = true;
+      lsp.display-messages = true;
+      indent-guides.render = true;
+    };
+  };
+}
home/base/tui/editors/helix/languages.nix
@@ -0,0 +1,24 @@
+{...}: {
+  programs.helix.languages = {
+    language = [
+      {
+        name = "nix";
+        auto-format = true;
+        indent = {
+          tab-width = 2;
+          unit = "  ";
+        };
+        formatter = {command = "alejandra";};
+      }
+      {
+        name = "typst";
+        auto-format = true;
+        indent = {
+          tab-width = 2;
+          unit = "  ";
+        };
+        formatter = {command = "typstyle";};
+      }
+    ];
+  };
+}
home/base/tui/editors/default.nix
@@ -0,0 +1,7 @@
+{
+  mylib,
+  config,
+  ...
+}: {
+  imports = mylib.scanPaths ./.;
+}
home/base/tui/editors/packages.nix
@@ -0,0 +1,13 @@
+{pkgs, ...}: {
+  home.packages = with pkgs; [
+    # === Data & Configuration Languages === #
+    # -- Nix
+    nil # Nix LSP
+    alejandra # Nix Code Formatter
+
+    # -- Documents
+    marksman # Markdown LSP
+    tinymist # Typst LSP
+    typstyle # Typst Formatter
+  ];
+}