helix: update user interface

This commit is contained in:
Leonardo Eugênio 2023-01-24 10:07:04 -03:00
parent 8cd6e6bf87
commit c66409ee13
5 changed files with 25 additions and 6 deletions

View file

@ -77,7 +77,7 @@ in
programs.astroid = {
enable = true;
externalEditor = "terminal -e kak %1";
externalEditor = "terminal -e $EDITOR %1";
pollScript = downloadEmails;
extraConfig = { };
};

View file

@ -29,7 +29,7 @@ in {
};
shellAbbrs = {
off = "shutdown now";
v = "kak";
v = "hx";
ns = "nix develop --command $SHELL";
# system
sv = "sudo systemct";

View file

@ -1,13 +1,15 @@
{ config, pkgs, lib, font, ... }:
let inherit (pkgs.uservars) key theme color accent font;
let inherit (pkgs.uservars) key theme color accent font editor;
in {
config = {
programs.helix = {
enable = true;
package = pkgs.unstable.helix;
settings = {
theme = "gruvbox";
theme = "my-theme";
editor = {
cursorline = true;
auto-save = true;
whitespace.render = "all";
whitespace.characters = {
space = "·";
@ -61,7 +63,23 @@ in {
};
keys.insert = { "A-k" = "normal_mode"; };
};
languages = [
{ auto-format = true; formatter = { command = "nixpkgs-fmt"; }; name = "nix"; }
{ auto-format = true; name = "rust"; }
];
themes =
{
my-theme = {
"inherits" = "gruvbox";
"ui.menu" = "none";
"ui.background" = { bg = "none"; };
"ui.virtual.whitespace" = color.nontxt;
};
};
};
home.packages = with pkgs; [ pkgs.unstable.helix ];
home.sessionVariables = lib.mkIf (editor == "helix") {
EDITOR = "hx";
};
};
}

View file

@ -1,5 +1,5 @@
{ config, pkgs, lib, font, ... }:
let inherit (pkgs.uservars) key theme color accent font dmenu;
let inherit (pkgs.uservars) key theme color accent font dmenu editor;
in {
config = {
programs.kakoune = {
@ -146,7 +146,7 @@ in {
$DRY_RUN_CMD kak -l | xargs -r -n1 kak -e "config-source;quit" -ui dummy -c
'';
};
home.sessionVariables = {
home.sessionVariables = lib.mkIf (editor == "kakoune") {
EDITOR = "kak";
# Some plugins(kak_ansi) like to compile stuff
CC = "cc";

View file

@ -128,4 +128,5 @@ rec {
dmenu = "bmenu";
desktop = "sway";
browser = "qutebrowser";
editor = "helix";
}