From 20f6439cc7399740d83a07d1ce1275e6cde1d368 Mon Sep 17 00:00:00 2001 From: Zhongheng Liu Date: Thu, 29 May 2025 19:03:57 +0300 Subject: [PATCH] feat: use helix editor alongside neovim --- home-manager/stvnliu/editors.nix | 28 ++++++++++++++------------ home-manager/stvnliu/helix-langs.nix | 30 ++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 13 deletions(-) create mode 100644 home-manager/stvnliu/helix-langs.nix diff --git a/home-manager/stvnliu/editors.nix b/home-manager/stvnliu/editors.nix index e03d2bb..febb37a 100644 --- a/home-manager/stvnliu/editors.nix +++ b/home-manager/stvnliu/editors.nix @@ -1,20 +1,22 @@ -{ pkgs -, ... -}: { - imports = [ - #./vscode.nix - #./intellij.nix - ]; +{ pkgs, ... }: { programs.nixvim = import ./nixvim; # dependencies for nixvim configuration home.packages = with pkgs; [ ripgrep fd ]; programs.helix = { enable = true; - }; - /* - programs.vscode = { - enable = true; - package = pkgs.vscode.fhs; + settings = { + editor.cursor-shape = { + normal = "block"; + insert = "bar"; + select = "underline"; + }; }; - */ + languages.language = import ./helix-langs.nix { inherit pkgs; }; + themes = { + autumn_night_transparent = { + "inherits" = "autumn_night"; + "ui.background" = { }; + }; + }; + }; } diff --git a/home-manager/stvnliu/helix-langs.nix b/home-manager/stvnliu/helix-langs.nix new file mode 100644 index 0000000..2adec8e --- /dev/null +++ b/home-manager/stvnliu/helix-langs.nix @@ -0,0 +1,30 @@ +{ pkgs }: [ + { + name = "nix"; + auto-format = true; + formatter.command = "${pkgs.nixfmt}/bin/nixfmt"; + } + { + name = "python"; + auto-format = true; + formatter.command = "${pkgs.black}/bin/black"; + } + { + name = "rust"; + auto-format = true; + formatter.command = "${pkgs.rustfmt}/bin/rustfmt"; + } + { + name = "java"; + auto-format = true; + formatter.command = "${pkgs.jdt-language-server}/bin/jdtls"; + } + { + name = "c"; + auto-format = true; + formatter.command = "${pkgs.astyle}/bin/astyle --squeeze-ws --style=c"; + } + # { } + # { } + # { } +]