This commit is contained in:
Riley Apeldoorn 2022-03-08 06:56:23 +01:00
parent cff0a2cf5b
commit 048d5e012f
5 changed files with 75 additions and 20 deletions

View file

@ -57,7 +57,7 @@ let inherit (builtins) mapAttrs map; in rec {
red = {
normal = "ff6161";
bright = "ff3b3b";
pastel = "ff5369";
pastel = "ff7588";
};
green = {
@ -81,19 +81,19 @@ let inherit (builtins) mapAttrs map; in rec {
purple = {
normal = "bd78fa";
bright = "c97ffa";
pastel = "00e1ff";
pastel = "d9b5ff";
};
cyan = {
normal = "29f8ff";
bright = "26e3fc";
pastel = "";
pastel = "63e8ff";
};
pink = {
normal = "f74ddb";
bright = "ff63e5";
pastel = "";
pastel = "ff96e3";
};
orange = {

View file

@ -18,6 +18,7 @@
users.users."riley".packages = with pkgs; [
minecraft
cockatrice
];
devices = {

View file

@ -141,6 +141,47 @@ let named = submodule {
];
environment.shellAliases = {
# Born to VIM
":q" = "exit";
# Launch [A]lacritty
"a" = "alacritty";
# [D]isown
"d" = "disown";
# Install a [p]ackage in a nix-shell
"p" = "nix-shell -p";
};
programs.bash.interactiveShellInit = ''
# [G]o to the directory. Create the directory if it does not exist
# yet, and if the directory contains a shell.nix file, source it.
g () {
[ -d "$1" ] || mkdir -p "$1";
cd "$1";
[ -e "shell.nix" ] && nix-shell;
}
# [M]ake a directory and immediately enter it.
m () { mkdir -p "$1" && cd "$1"; }
# [R]eplace the current process with the given one.
r () { $1 & disown; exit; }
# [J]ump to the directory by means of fuzzy search. If the fuzzy finder
# is aborted, the jump is also aborted.
j () { t=`sk` && cd $t; }
# Enter a temporary [d]irectory.
d () { cd "$(mktemp -d)"; }
'';
boot = {
loader.systemd-boot = {
enable = true;

View file

@ -8,34 +8,35 @@
text = with theme; ''
# Types
face global variant rgb:${green.bright}+b
face global enum rgb:${green.bright}+b
face global struct rgb:${red.pastel}+b
face global alias rgb:${orange.normal}+b
face global primitive rgb:${misc.teal}+b
face global variant rgb:${blue.normal}+b
face global enum rgb:${blue.normal}+b
face global struct rgb:${blue.normal}+b
face global alias rgb:${blue.normal}+b
face global primitive rgb:${blue.normal}+b
face global union rgb:${blue.normal}+b
face global trait rgb:${purple.bright}+b
face global union rgb:${misc.lime}+b
# Other Rust-specific syntax elements
face global lifetime rgb:${cyan.bright}
face global format rgb:${orange.bright}+b
face global macro rgb:fc4cbf+b
face global macro rgb:${green.bright}+b
face global format macro
# Keywords
face global keyword rgb:${foreground.normal}+b
face global keyword rgb:${green.normal}
# Literals
face global literal rgb:${yellow.bright}
face global string rgb:${yellow.bright}
face global literal rgb:${misc.lime}
face global string literal
# Items
face global function rgb:${green.normal}
# face global function rgb:ff70cd
face global function rgb:fc7cf8
face global method function
face global module rgb:${misc.blueGrey}
# Other stuff
face global attribute comment
face global variable rgb:${foreground.normal}
face global variable rgb:f5f5f5
face global property rgb:${misc.lime}
face global operator rgb:${yellow.normal}
face global punctuation rgb:${foreground.normal}

View file

@ -58,10 +58,21 @@ let kakrc = pkgs.writeTextFile (rec {
colorscheme haskell
lsp-enable-window
lsp-inlay-diagnostics-enable global
lsp-inlay-diagnostics-enable window
map global <tab> ': lsp-code-actions<ret>'
map global <ret> ': lsp-hover<ret>'
map global normal <tab> ': lsp-code-actions<ret>'
map global normal <ret> ': lsp-hover<ret>'
hook window ModeChange .*:.*:insert %{
remove-highlighter window/lsp_diagnostics
}
hook window ModeChange .*:insert:normal %{
lsp-inlay-diagnostics-enable window
}
set global lsp_inlay_diagnostic_sign '>'
map global insert <tab> '<a-;><gt>'
}
@ -112,6 +123,7 @@ let kakrc = pkgs.writeTextFile (rec {
face global InlayDiagnosticWarning rgb:a39e31+f
face global InlayDiagnosticError rgb:ad494f+f
face global InlayDiagnosticHint rgb:4d965a+f
face global InlayDiagnosticInfo rgb:4d965a+f
'');
});