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 = { programs.astroid = {
enable = true; enable = true;
externalEditor = "terminal -e kak %1"; externalEditor = "terminal -e $EDITOR %1";
pollScript = downloadEmails; pollScript = downloadEmails;
extraConfig = { }; extraConfig = { };
}; };

View file

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

View file

@ -1,13 +1,15 @@
{ config, pkgs, lib, font, ... }: { config, pkgs, lib, font, ... }:
let inherit (pkgs.uservars) key theme color accent font; let inherit (pkgs.uservars) key theme color accent font editor;
in { in {
config = { config = {
programs.helix = { programs.helix = {
enable = true; enable = true;
package = pkgs.unstable.helix; package = pkgs.unstable.helix;
settings = { settings = {
theme = "gruvbox"; theme = "my-theme";
editor = { editor = {
cursorline = true;
auto-save = true;
whitespace.render = "all"; whitespace.render = "all";
whitespace.characters = { whitespace.characters = {
space = "·"; space = "·";
@ -61,7 +63,23 @@ in {
}; };
keys.insert = { "A-k" = "normal_mode"; }; 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.packages = with pkgs; [ pkgs.unstable.helix ];
home.sessionVariables = lib.mkIf (editor == "helix") {
EDITOR = "hx";
};
}; };
} }

View file

@ -1,5 +1,5 @@
{ config, pkgs, lib, font, ... }: { 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 { in {
config = { config = {
programs.kakoune = { programs.kakoune = {
@ -146,7 +146,7 @@ in {
$DRY_RUN_CMD kak -l | xargs -r -n1 kak -e "config-source;quit" -ui dummy -c $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"; EDITOR = "kak";
# Some plugins(kak_ansi) like to compile stuff # Some plugins(kak_ansi) like to compile stuff
CC = "cc"; CC = "cc";

View file

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