Move stuff into /home

This commit is contained in:
Natsu Kagami 2021-10-27 12:35:53 -04:00
parent d9bf49b218
commit dc1b4e9371
26 changed files with 3 additions and 1 deletions

51
home/X11/alacritty.nix Normal file
View file

@ -0,0 +1,51 @@
{ pkgs, config, lib, ... } :
let
pkgsUnstable = import <nixpkgs-unstable> {};
in
{
home.packages = [
];
programs.alacritty = {
enable = true;
package = pkgsUnstable.alacritty;
settings = {
background_opacity = 0.95;
font = {
size = 14.0;
normal.family = "Fantasque Sans Mono Nerd Font";
};
shell = {
program = "/bin/sh";
args = [ "-ic" "fish" ];
};
colors = {
# Default colors
primary.background = "0xf1f1f1";
primary.foreground = "0x424242";
# Normal colors
normal.black = "0x212121";
normal.red = "0xc30771";
normal.green = "0x10a778";
normal.yellow = "0xa89c14";
normal.blue = "0x008ec4";
normal.magenta = "0x523c79";
normal.cyan = "0x20a5ba";
normal.white = "0xe0e0e0";
# Bright colors
bright.black = "0x212121";
bright.red = "0xfb007a";
bright.green = "0x5fd7af";
bright.yellow = "0xf3e430";
bright.blue = "0x20bbfc";
bright.magenta = "0x6855de";
bright.cyan = "0x4fb8cc";
bright.white = "0xf1f1f1";
};
};
};
}

37
home/X11/default.nix Normal file
View file

@ -0,0 +1,37 @@
{ pkgs, config, lib, ... } :
{
imports = [ ./packages.nix ];
home.sessionVariables = {
# Set up Java font style
_JAVA_OPTIONS = "-Dawt.useSystemAAFontSettings=lcd";
};
# X Session settings
xsession.enable = true;
# Wallpaper
home.file.wallpaper = {
source = ./. + "/wallpaper.jpg";
target = "wallpaper.jpg";
};
# Cursor
xsession.pointerCursor = {
package = pkgs.numix-cursor-theme;
name = "Numix-Cursor-Light";
size = 32;
};
# MIME set ups
xdg.enable = true;
xdg.mimeApps.enable = true;
xdg.mimeApps.defaultApplications = {
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
"x-scheme-handler/ftp" = [ "firefox.desktop" ];
"x-scheme-handler/ftps" = [ "firefox.desktop" ];
"x-scheme-handler/mailspring" = [ "Mailspring.desktop" ];
};
}

23
home/X11/hidpi.nix Normal file
View file

@ -0,0 +1,23 @@
{ pkgs, config, lib, ... } :
{
# X resources for 4k monitor
home.file."4k.Xresources" = {
target = ".config/X11/.Xresources";
text = ''
Xft.dpi: 192
! These might also be useful depending on your monitor and personal preference:
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
'';
};
# Load 4k Xresources
xsession.initExtra = ''
xrdb -merge ~/.config/X11/.Xresources
feh --bg-fill ~/wallpaper.jpg
'';
}

137
home/X11/i3.nix Normal file
View file

@ -0,0 +1,137 @@
{ pkgs, config, lib, ... } :
let
mod = "Mod4";
workspaces = [
"1: web"
"2: chat"
"3: code"
"4: music"
"5: extra"
"6: 6"
"7: 7"
"8: 8"
"9: 9"
"10: 10"
];
wsAttrs = builtins.listToAttrs (
map
(i: { name = toString (remainder i 10); value = builtins.elemAt workspaces (i - 1); })
(range 1 11)
);
remainder = x: y: x - (builtins.div x y) * y;
range = from: to:
let
f = cur: if cur == to then [] else [cur] ++ f (cur + 1);
in f from;
in
{
## i3 window manager
xsession.windowManager.i3 = {
enable = true;
config.assigns = {
"${wsAttrs."1"}" = [ { class = "^Firefox$"; } ];
"${wsAttrs."2"}" = [ { class = "^Discord$"; } ];
};
config.bars = [ {
command = "${pkgs.i3-gaps}/bin/i3bar -t";
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-default.toml";
position = "top";
colors = {
background = "#00000080";
statusline = "#ffffff";
separator = "#666666";
focusedWorkspace = { background = "#4c7899"; border = "#285577"; text = "#ffffff"; };
activeWorkspace = { background = "#333333"; border = "#5f676a"; text = "#ffffff"; };
inactiveWorkspace = { background = "#333333"; border = "#222222"; text = "#888888"; };
urgentWorkspace = { background = "#2f343a"; border = "#900000"; text = "#ffffff"; };
bindingMode = { background = "#2f343a"; border = "#900000"; text = "#ffffff"; };
};
} ];
config.fonts = { names = [ "FantasqueSansMono Nerd Font Mono" "monospace" ]; size = 11.0; };
config.gaps.outer = 5;
config.gaps.inner = 5;
config.gaps.smartGaps = true;
config.modifier = mod;
config.terminal = "alacritty";
config.window.titlebar = false;
# Keybindings
config.keybindings = lib.mkOptionDefault ({
## vim-style movements
"${mod}+h" = "focus left";
"${mod}+j" = "focus down";
"${mod}+k" = "focus up";
"${mod}+l" = "focus right";
"${mod}+Shift+h" = "move left";
"${mod}+Shift+j" = "move down";
"${mod}+Shift+k" = "move up";
"${mod}+Shift+l" = "move right";
## Splits
"${mod}+v" = "split v";
"${mod}+Shift+v" = "split h";
## Run
"${mod}+r" = "exec ${pkgs.dmenu}/bin/dmenu_run";
"${mod}+d" = "exec i3-dmenu-desktop --dmenu='${pkgs.dmenu}/bin/dmenu -i'";
} // (
builtins.listToAttrs (lib.flatten (map (key: [
{
name = "${mod}+${key}";
value = "workspace ${builtins.getAttr key wsAttrs}";
}
{
name = "${mod}+Shift+${key}";
value = "move to workspace ${builtins.getAttr key wsAttrs}";
}
]) (builtins.attrNames wsAttrs))
)));
# Workspace
config.defaultWorkspace = "workspace ${builtins.getAttr "1" wsAttrs}";
config.startup = [
{ command = "firefox"; }
{ command = "discord"; }
{ command = "dex -ae i3"; }
{ command = "ibus-daemon -drxR"; }
];
};
# i3status
programs.i3status-rust.enable = true;
programs.i3status-rust.bars.default = {
icons = "material-nf";
theme = "native";
settings = {
icons_format = " <span font_family='FantasqueSansMono Nerd Font'>{icon}</span> ";
};
blocks = [
{
block = "bluetooth";
mac = "5C:52:30:D8:E2:9D";
format = "Airpods Pro {percentage}";
format_unavailable = "Airpods Pro XX";
}
{
block = "cpu";
format = "{utilization}";
}
{
block = "hueshift";
}
{
block = "memory";
}
{
block = "net";
}
{
block = "sound";
}
{
block = "time";
}
];
};
}

39
home/X11/packages.nix Normal file
View file

@ -0,0 +1,39 @@
{ pkgs, config, lib, ... }:
let
pkgsUnstable = import <nixpkgs-unstable> {};
# Override nss to open links in Firefox (https://github.com/NixOS/nixpkgs/issues/78961)
discordPkg = pkgsUnstable.discord.override { nss = pkgs.nss_latest; };
in
{
imports = [ ./alacritty.nix ./i3.nix ];
home.packages = (with pkgs; [
## GUI stuff
gnome.cheese # Webcam check
evince # PDF reader
gparted
vscode
feh
deluge # Torrent client
mailspring
discordPkg
pavucontrol # PulseAudio control panel
# CLI stuff
xsel # Clipboard management
dex # .desktop file management, startup
sct # Display color temperature
]);
# Gnome-keyring
services.gnome-keyring.enable = true;
# Picom: X Compositor
services.picom = {
enable = true;
blur = true;
fade = true;
fadeDelta = 3;
shadow = true;
};
}

BIN
home/X11/wallpaper.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

121
home/common.nix Normal file
View file

@ -0,0 +1,121 @@
{ config, pkgs, ... }:
{
imports = [
./kakoune/kak.nix
./fish/fish.nix
];
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# Enable the manual so we don't have to load it
manual.html.enable = true;
# Packages that are not in programs section
home.packages = with pkgs; [
# Build Tools
## C++
autoconf
automake
## SQL
flyway
## Go
go # to be configured later
## Rust
rust-analyzer
## JavaScript
yarn
## Nix
cachix
# Fonts
fantasque-sans-mono
## Enable the FSM font with NF variant
(nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# CLI tools
fd
fossil
## Blog generator
hugo
## File Manager
nnn
## PDF Processors
poppler_utils
## htop replacement
bottom
# Databases
postgresql
];
home.sessionVariables = {
# Bat theme
BAT_THEME = "GitHub";
# Editor
EDITOR = "kak";
};
home.sessionPath = [
# Sometimes we want to install custom scripts here
"~/.local/bin"
];
# Programs
programs = {
bat = {
enable = true;
config = {
theme = "GitHub";
};
};
broot.enable = true;
direnv.enable = true;
direnv.nix-direnv.enable = true;
direnv.nix-direnv.enableFlakes = true;
exa = {
enable = true;
enableAliases = true;
};
# later
firefox = {};
fzf = {
enable = true;
enableFishIntegration = true;
};
gh = {
enable = true;
gitProtocol = "ssh";
};
git = {
enable = true;
delta = {
enable = true;
options = {
line-numbers = true;
};
};
signing.key = null;
signing.signByDefault = true;
userEmail = "nki@nkagami.me";
userName = "Natsu Kagami";
extraConfig = {
init.defaultBranch = "master";
};
};
gpg.enable = true;
jq.enable = true;
nushell.enable = true;
};
}

8
home/config.nix Normal file
View file

@ -0,0 +1,8 @@
{
allowUnfree = true;
packageOverrides = pkgs: {
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
inherit pkgs;
};
};
}

33
home/firefox.nix Normal file
View file

@ -0,0 +1,33 @@
{ pkgs, config, lib, ... } :
{
programs.firefox = {
enable = true;
package = pkgs.firefox.override {
cfg = {
# Tridactyl native connector
enableTridactylNative = true;
};
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
bitwarden
grammarly
https-everywhere
multi-account-containers
octotree
reddit-enhancement-suite
refined-github
simple-tab-groups
sponsorblock
tridactyl
ublock-origin
web-scrobbler
];
profiles.nki.id = 0;
profiles.nki.isDefault = true;
profiles.nki.settings = {
"browser.search.region" = "CA";
};
};
}

24
home/fish/change_cmd.fish Normal file
View file

@ -0,0 +1,24 @@
function __fish_change_cmd -d "Change the current command"
# If there is no commandline, insert the last item from history
# and *then* toggle
if not commandline | string length -q
commandline -r "$history[1]"
end
set -l cmd (commandline -po)
set -l cursor (commandline -C)
if test (count $cmd) = "1"
commandline -C 0
else if test "$cmd[1]" = ""
commandline -C 0
else
commandline -r (string sub --start=(math (string length "$cmd[1]") + 1) (commandline -p))
commandline -C 0
end
end
bind --preset -e -M insert \cs
bind -M insert \cs __fish_change_cmd
bind --preset -e -M default \cs
bind -M default \cs __fish_change_cmd

76
home/fish/fish.nix Normal file
View file

@ -0,0 +1,76 @@
{ config, pkgs, nixpkgs-unstable, ... }:
let
pkgsUnstable = import nixpkgs-unstable { system = pkgs.system; };
in
{
programs.fish = {
enable = true;
package = pkgsUnstable.fish;
functions = {
};
shellAliases = {
cat = "bat --theme=GitHub ";
l = "exa -l --color=always ";
htop = "btm --color nord-light -b --tree";
Htop = "btm --color nord-light --tree";
# My own commands for easy access
thisterm = "cd ~/Projects/uw/$CURRENT_TERM";
today = "date +%F";
};
interactiveShellInit = ''
set fish_greeting
# Set up an editor alias
if test -n "$EDITOR"
alias e="$EDITOR"
else
alias e="kak"
end
# Source iTerm2 integration
test -e ~/.iterm2_shell_integration.fish && source ~/.iterm2_shell_integration.fish
# Enable vi keybindings
fish_vi_key_bindings
## Set some kak-focused keybindings
bind -M default gi beginning-of-line
bind -M default gl end-of-line
'';
plugins = [
{
name = "tide";
src = pkgs.fetchFromGitHub {
owner = "IlanCosman";
repo = "tide";
rev = "3787c725f7f6a0253f59a2c0e9fde03202689c6c";
sha256 = "00zsib1q21bgxffjlyxf5rgcyq3h1ixwznwvid9k6mkkmwixv9lj";
};
}
{
name = "fzf";
src = pkgs.fetchFromGitHub {
owner = "jethrokuan";
repo = "fzf";
rev = "479fa67d7439b23095e01b64987ae79a91a4e283";
sha256 = "0k6l21j192hrhy95092dm8029p52aakvzis7jiw48wnbckyidi6v";
};
}
];
};
# Source files
home.file = {
"fish/change_cmd.fish" = {
source = ./. + "/change_cmd.fish";
target = ".config/fish/conf.d/change_cmd.fish";
};
"fish/pls.fish" = {
source = ./. + "/pls.fish";
target = ".config/fish/conf.d/pls.fish";
};
};
}

155
home/fish/pls.fish Normal file
View file

@ -0,0 +1,155 @@
alias sue="pls -e"
function pls
set -l cmd "`"(string join " " -- $argv)"`"
echo "I-It's not like I'm gonna run "$cmd" for you or a-anything! Baka >:C" >&2
# Send a notification on password prompt
if /usr/bin/sudo -vn 2>/dev/null
# nothing to do, user already authenticated
else
# throw a notification
# notify-send -t 3000 -u critical -i ~/Downloads/harukablush.jpg -h "STRING:command:"$cmd "A-a command requires your p-password" (printf "I-I need your p-password to r-run the following c-command: %s" $cmd)
end
/usr/bin/sudo $argv
end
function sudo
echo "Not polite enough."
end
function __fish_prepend_pls -d "Prepend 'pls ' to the beginning of the current commandline"
# If there is no commandline, insert the last item from history
# and *then* toggle
if not commandline | string length -q
commandline -r "$history[1]"
end
set -l cmd (commandline -po)
set -l cursor (commandline -C)
if test "$cmd[1]" = e
commandline -C 0
commandline -i "su"
commandline -C (math $cursor + 2)
else if test "$cmd[1]" = sue
commandline -r (string sub --start=3 (commandline -p))
commandline -C -- (math $cursor - 2)
else if test "$cmd[1]" != pls
commandline -C 0
commandline -i "pls "
commandline -C (math $cursor + 4)
else
commandline -r (string sub --start=5 (commandline -p))
commandline -C -- (math $cursor - 4)
end
end
bind --preset -e -M insert \es
bind -M insert \es __fish_prepend_pls
function __fish_man_page
# Get all commandline tokens not starting with "-"
set -l args (commandline -po | string match -rv '^-')
# If commandline is empty, exit.
if not set -q args[1]
printf \a
return
end
#Skip `pls` and display then manpage of following command
while set -q args[2]
and string match -qr -- '^(pls|.*=.*)$' $args[1]
set -e args[1]
end
# If there are at least two tokens not starting with "-", the second one might be a subcommand.
# Try "man first-second" and fall back to "man first" if that doesn't work out.
set -l maincmd (basename $args[1])
if set -q args[2]
# HACK: If stderr is not attached to a terminal `less` (the default pager)
# wouldn't use the alternate screen.
# But since we don't know what pager it is, and because `man` is totally underspecified,
# the best we can do is to *try* the man page, and assume that `man` will return false if it fails.
# See #7863.
if man "$maincmd-$args[2]" &>/dev/null
man "$maincmd-$args[2]"
else if man "$maincmd" &>/dev/null
man "$maincmd"
else
printf \a
end
else
if man "$maincmd" &>/dev/null
man "$maincmd"
else
printf \a
end
end
commandline -f repaint
end
#
# Completion for pls
#
function __fish_pls_print_remaining_args
set -l tokens (commandline -opc) (commandline -ct)
set -e tokens[1]
# These are all the options mentioned in the man page for Todd Miller's "pls.ws" pls (in that order).
# If any other implementation has different options, this should be harmless, since they shouldn't be used anyway.
set -l opts A/askpass b/background C/close-from= E/preserve-env='?'
# Note that "-h" is both "--host" (which takes an option) and "--help" (which doesn't).
# But `-h` as `--help` only counts when it's the only argument (`pls -h`),
# so any argument completion after that should take it as "--host".
set -a opts e/edit g/group= H/set-home h/host= 1-help
set -a opts i/login K/remove-timestamp k/reset-timestamp l/list n/non-interactive
set -a opts P/preserve-groups p/prompt= S/stdin s/shell U/other-user=
set -a opts u/user= T/command-timeout= V/version v/validate
argparse -s $opts -- $tokens 2>/dev/null
# The remaining argv is the subcommand with all its options, which is what
# we want.
if test -n "$argv"
and not string match -qr '^-' $argv[1]
string join0 -- $argv
return 0
else
return 1
end
end
function __fish_pls_no_subcommand
not __fish_pls_print_remaining_args >/dev/null
end
function __fish_complete_pls_subcommand
set -l args (__fish_pls_print_remaining_args | string split0)
set -lx -a PATH /usr/local/sbin /sbin /usr/sbin
__fish_complete_subcommand --commandline $args
end
# All these options should be valid for GNU and OSX pls
complete -c pls -n __fish_no_arguments -s h -d "Display help and exit"
complete -c pls -n __fish_no_arguments -s V -d "Display version information and exit"
complete -c pls -n __fish_pls_no_subcommand -s A -d "Ask for password via the askpass or \$SSH_ASKPASS program"
complete -c pls -n __fish_pls_no_subcommand -s C -d "Close all file descriptors greater or equal to the given number" -xa "0 1 2 255"
complete -c pls -n __fish_pls_no_subcommand -s E -d "Preserve environment"
complete -c pls -n __fish_pls_no_subcommand -s H -d "Set home"
complete -c pls -n __fish_pls_no_subcommand -s K -d "Remove the credential timestamp entirely"
complete -c pls -n __fish_pls_no_subcommand -s P -d "Preserve group vector"
complete -c pls -n __fish_pls_no_subcommand -s S -d "Read password from stdin"
complete -c pls -n __fish_pls_no_subcommand -s b -d "Run command in the background"
complete -c pls -n __fish_pls_no_subcommand -s e -rF -d Edit
complete -c pls -n __fish_pls_no_subcommand -s g -a "(__fish_complete_groups)" -x -d "Run command as group"
complete -c pls -n __fish_pls_no_subcommand -s i -d "Run a login shell"
complete -c pls -n __fish_pls_no_subcommand -s k -d "Reset or ignore the credential timestamp"
complete -c pls -n __fish_pls_no_subcommand -s l -d "List the allowed and forbidden commands for the given user"
complete -c pls -n __fish_pls_no_subcommand -s n -d "Do not prompt for a password - if one is needed, fail"
complete -c pls -n __fish_pls_no_subcommand -s p -d "Specify a custom password prompt"
complete -c pls -n __fish_pls_no_subcommand -s s -d "Run the given command in a shell"
complete -c pls -n __fish_pls_no_subcommand -s u -a "(__fish_complete_users)" -x -d "Run command as user"
complete -c pls -n __fish_pls_no_subcommand -s v -n __fish_no_arguments -d "Validate the credentials, extending timeout"
# Complete the command we are executed under pls
complete -c pls -x -n 'not __fish_seen_argument -s e' -a "(__fish_complete_pls_subcommand)"

44
home/kagami-pc-home.nix Normal file
View file

@ -0,0 +1,44 @@
{ pkgs, config, lib, ... } :
{
imports = [
# Common configuration
./common.nix
# Set up X11-specific common configuration
./X11/default.nix
./X11/hidpi.nix # Enable hiDPI
# We use our own firefox
./firefox.nix
# osu!
./osu.nix
];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "nki";
home.homeDirectory = "/home/nki";
# More packages
home.packages = (with pkgs; [
# CLI stuff
python
zip
# TeX
texlive.combined.scheme-full
# Java & sbt
openjdk11
sbt
]);
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "21.05";
}

View file

@ -0,0 +1,29 @@
hook global WinSetOption filetype=(markdown) %{
map buffer normal <c-b> ": enter-user-mode markdown-menu<ret>"
}
# A menu for common markdown actions
declare-user-mode markdown-menu
map -docstring "Toggle the checkboxes on the same line" global markdown-menu t ": markdown-toggle-checkbox<ret>"
define-command -hidden markdown-toggle-checkbox %{
try %{
execute-keys -draft "<a-x>s^\s*- \[( |x)\]<ret>h: markdown-toggle-checkbox-selections<ret>"
}
}
define-command -hidden markdown-toggle-checkbox-selections %{
try %{
execute-keys -draft -itersel ": markdown-toggle-checkbox-one<ret>"
}
}
define-command -hidden markdown-toggle-checkbox-one %{
try %{
execute-keys -draft "sx<ret>r "
} catch %{
execute-keys -draft "s <ret>rx"
}
}

36
home/kakoune/kak-lsp.nix Normal file
View file

@ -0,0 +1,36 @@
{ config, pkgs, lib, ... }:
let
rev = "3586feab17000f6ef526b2f9f6a11e008512b3e8";
version = "r${builtins.substring 0 6 rev}";
kak-lsp = pkgs.kak-lsp.overrideAttrs (drv: rec {
inherit rev version;
buildInputs = drv.buildInputs ++
(with pkgs; lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.SystemConfiguration);
src = pkgs.fetchFromGitHub {
owner = "kak-lsp";
repo = "kak-lsp";
rev = rev;
sha256 = "sha256-eSqqmlyD103AitHHbgdUAc1SzDpba7jRAokt1Kr1xhM=";
};
cargoDeps = drv.cargoDeps.overrideAttrs (lib.const {
inherit src;
outputHash = (
if pkgs.stdenv.isDarwin
then "sha256-BStdH1TunzVMOgI1UfhYSfgqPqgqdxpYHtt4DuNXOuY="
else "0ywb9489jrb5lsycxlxzrj2khkcjhvzxbb0ckbpwwvg11r4ds240"
);
});
});
in
{
home.packages = [ kak-lsp ];
# Configurations
home.file."kakoune/kak-lsp.toml" = {
source = ./. + "/kak-lsp.toml";
target = ".config/kak-lsp/kak-lsp.toml";
};
}

162
home/kakoune/kak-lsp.toml Normal file
View file

@ -0,0 +1,162 @@
snippet_support = false
verbosity = 255
[semantic_scopes]
# Map textmate scopes to kakoune faces for semantic highlighting
# the underscores are translated to dots, and indicate nesting.
# That is, if variable_other_field is omitted, it will try the face for
# variable_other and then variable
#
# To see a list of available scopes in the debug buffer, run lsp-semantic-available-scopes
variable="variable"
entity_name_function="function"
entity_name_type="type"
variable_other_enummember="variable"
entity_name_namespace="module"
[server]
# exit session if no requests were received during given period in seconds
# works only in unix sockets mode (-s/--session)
# set to 0 to disable
timeout = 1800 # seconds = 30 minutes
[language.rust]
filetypes = ["rust"]
roots = ["Cargo.toml"]
command = "rust-analyzer"
args = []
[language.crystal]
filetypes = ["crystal"]
roots = ["shard.yml"]
command = "scry"
[language.javascript]
filetypes = ["javascript"]
roots = [".flowconfig"]
command = "flow"
args = ["lsp"]
[language.json]
filetypes = ["json"]
roots = ["package.json"]
command = "json-languageserver"
args = ["--stdio"]
[language.css]
filetypes = ["css"]
roots = ["package.json"]
command = "css-languageserver"
args = ["--stdio"]
[language.html]
filetypes = ["html"]
roots = ["package.json"]
command = "html-languageserver"
args = ["--stdio"]
[language.ocaml]
filetypes = ["ocaml"]
roots = ["Makefile", "opam", "*.opam", "dune", ".merlin", ".ocamlformat"]
command = "ocamllsp"
args = []
[language.reason]
filetypes = ["reason"]
roots = ["package.json", "Makefile", ".git", ".hg"]
command = "ocaml-language-server"
args = ["--stdio"]
[language.ruby]
filetypes = ["ruby"]
roots = ["Gemfile"]
command = "solargraph"
args = ["stdio"]
[language.python]
filetypes = ["python"]
roots = ["requirements.txt", "setup.py", ".git", ".hg"]
command = "pyls"
offset_encoding = "utf-8"
[language.c_cpp]
filetypes = ["c", "cpp"]
roots = ["compile_commands.json", ".cquery", ".git"]
command = "ccls"
args = ["-v=2", "-log-file=/tmp/ccls.log"]
[language.haskell]
filetypes = ["haskell"]
roots = ["Setup.hs", "stack.yaml", "*.cabal"]
command = "haskell-language-server-wrapper"
args = ["--lsp"]
[language.go]
filetypes = ["go"]
roots = ["Gopkg.toml", "go.mod", ".git", ".hg"]
command = "gopls"
offset_encoding = "utf-8"
settings_section = "gopls"
[language.go.settings.gopls]
semanticTokens = true
hoverKind = "SynopsisDocumentation"
[language.bash]
filetypes = ["sh"]
roots = [".git", ".hg"]
command = "bash-language-server"
args = ["start"]
[language.dart]
filetypes = ["dart"]
roots = ["pubspec.yaml", ".git"]
command = "dart_language_server"
[language.d]
filetypes = ["d", "di"]
roots = [".git", "dub.sdl", "dub.json"]
command = "dls"
[language.php]
filetypes = ["php"]
roots = [".htaccess", "composer.json"]
command = "intelephense"
args = ["--stdio"]
[language.nim]
filetypes = ["nim"]
roots = ["*.nimble", ".git"]
command = "nimlsp"
[language.elm]
filetypes = ["elm"]
roots = ["elm.json"]
command = "elm-language-server"
args = ["--stdio"]
# [language.elm.initialization_options]
# runtime = "node"
# elmPath = "elm"
# elmFormatPath = "elm-format"
# elmTestPath = "elm-test"
[language.latex]
filetypes = ["latex"]
roots = [".git"]
command = "texlab"
[language.racket]
filetypes = ["racket"]
roots = [".git"]
command = "racket"
args = ["-l", "racket-langserver"]
[language.fsharp]
filetypes = ["fsharp"]
roots = [".git", "*.fsx"]
command = "FSharpLanguageServer"
# command = "dotnet"
# args = ["/home/natsukagami/Projects/FsAutoComplete/bin/release_netcore/fsautocomplete.dll", "--background-service-enabled"]

97
home/kakoune/kak.nix Normal file
View file

@ -0,0 +1,97 @@
{ config, pkgs, ... }:
let
kakounePkg =
let
rev = "689553c2e9b953a9d3822528d4ad858af95fb6a2";
in
pkgs.kakoune.override {
kakoune = pkgs.kakoune-unwrapped.overrideAttrs (oldAttrs : {
version = "r${builtins.substring 0 6 rev}";
src = pkgs.fetchFromGitHub {
repo = "kakoune";
owner = "mawww";
rev = rev;
sha256 = "sha256-L9/nTwL24YPJrlpI0eyLmqhu1xfbKoi1IwrIeiwVUaE=";
};
});
};
# record a file in the kakoune folder
kakouneFile = filename : {
name = "kakoune/${filename}";
value = {
source = ./. + "/${filename}";
target = ".config/kak/${filename}";
};
};
kakouneAutoload = { name, src } : {
name = "kakoune/autoload/${name}";
value = {
source = src;
target = ".config/kak/autoload/${name}";
};
};
in
{
imports = [ ./kak-lsp.nix ];
# Enable the kakoune package.
home.packages = [ kakounePkg ];
# Source the kakrc we have here.
home.file = builtins.listToAttrs (map kakouneFile [
"kakrc"
"latex.kak"
"racket.kak"
"source-pwd"
# autoload files
"autoload/markdown.kak"
] ++ map kakouneAutoload [
# include the original autoload files
{
name = "rc";
src = "${kakounePkg}/share/kak/autoload";
}
# Plugins
{
name = "fzf.kak";
src = pkgs.fetchFromGitHub {
owner = "andreyorst";
repo = "fzf.kak";
rev = "68f21eb78638e5a55027f11aa6cbbaebef90c6fb";
sha256 = "12zfvyxqgy18l96sg2xng20vfm6b9py6bxmx1rbpbpxr8szknyh6";
};
}
{
name = "01-cargo.kak";
src = pkgs.fetchFromGitHub {
owner = "krornus";
repo = "kakoune-cargo";
rev = "784e9d412a1331c6d2f2da61621a694d3e2c4281";
sha256 = "1as0jss2fjvx4cyi3d6b9wqknzcf4p4046i5lf0ds582zsa60nis";
};
}
{
name = "00-kakoune-mouvre"; # needs to load before cargo.kak
src = pkgs.fetchFromGitHub {
owner = "krornus";
repo = "kakoune-mouvre";
rev = "47e6f20027d16806097d0bbee72b54717bcebaca";
sha256 = "14fp3p1d0m98rgdjaaik5g44f0fabr6w39np3cqdaxq1i8skq6xv";
};
}
{
name = "kakoune-inc-dec";
src = pkgs.fetchFromGitLab {
owner = "Screwtapello";
repo = "kakoune-inc-dec";
rev = "7bfe9c51";
sha256 = "0f33wqxqbfygxypf348jf1fiscac161wf2xvnh8zwdd3rq5yybl0";
# leaveDotGit = true;
};
}
]);
}

189
home/kakoune/kakrc Normal file
View file

@ -0,0 +1,189 @@
# Color scheme
# colorscheme github
# face global Default rgb:121213,default
# face global BufferPadding rgb:A0A0A0,default
face global MenuForeground blue,white+bF
face global MenuBackground bright-blue,white+F
face global Information bright-blue,white
# Enable line numbers
addhl global/ number-lines
set global grepcmd "rg --line-number --no-column --no-heading --color=never ''"
# Floating terminal
# define-command floating-terminal -params 1 -docstring "Open a floating terminal running the given command" %{
# evaluate-commands -save-regs 'a' %{
# set-register a %arg{@}
# evaluate-commands %sh{
# alacritty \
# --class=alacritty,floating \
# -o window.dimensions.lines=24 \
# -o window.dimensions.columns=120 \
# -e sh -c "$kak_quoted_reg_a" < /dev/null > /dev/null 2>&1 &
# }
# }
# }
map global user t -docstring "Open a side terminal on the current directory" ' :iterm-terminal-horizontal fish<ret>'
# fzf.kak
require-module fzf
set global fzf_terminal_command 'iterm-terminal-horizontal kak -c %val{session} -e "%arg{@}"'
# set global fzf_grep_command 'rg'
set global fzf_highlight_command 'bat --style=plain --theme=GitHub --color=always {}'
map global user f -docstring "FZF mode" ': fzf-mode<ret>'
# Comment line and block
map global normal <#> ': comment-line<ret>'
map global normal <a-#> ': comment-block<ret>'
# Go to grep-jump
map global goto F -docstring "current grep-jump match" '<esc>: grep-jump<ret>'
# System clipboard interactions
hook global RegisterModified '"' %{ nop %sh{
printf "%s" "$kak_main_reg_dquote" | pbcopy
}}
map global user P -docstring "Paste before cursor from clipboard" '! pbpaste<ret>'
map global user p -docstring "Paste after cursor from clipboard" '<a-!> pbpaste<ret>'
map global user R -docstring "Replace selection with text from clipboard" '<a-d>! pbpaste<ret>'
define-command -params 0 -docstring "Copy line down" copyline %{
execute-keys -draft '<a-x>y'%val{count}'P'
}
map global normal <+> -docstring "Copy line down" ': copyline<ret>'
define-command -params 0 -docstring "Delete current character" delete-one %{
execute-keys 'm<a-:>'
execute-keys -draft '<a-S>d'
execute-keys 'H'
}
map global normal D ": delete-one<ret>"
# Disable write-to
# unalias global w
# define-command -params 0 -docstring "Writes the current file" w "write"
# Tab sizes
hook global InsertChar \t %{ exec -draft -itersel h@ }
set global tabstop 4
set global indentwidth 4
hook global WinSetOption filetype=(c|cpp|haskell|nix) %{
set global tabstop 2
set global indentwidth 2
}
# Ctrl + a in insert mode = esc
map global insert <c-a> '<esc>'
# Tab completion
hook global InsertCompletionShow .* %{
try %{
# this command temporarily removes cursors preceded by whitespace;
# if there are no cursors left, it raises an error, does not
# continue to execute the mapping commands, and the error is eaten
# by the `try` command so no warning appears.
execute-keys -draft 'h<a-K>\h<ret>'
map window insert <tab> <c-n>
map window insert <s-tab> <c-p>
}
}
hook global InsertCompletionHide .* %{
unmap window insert <tab> <c-n>
unmap window insert <s-tab> <c-p>
}
# Enable LSP
try %{
eval %sh{test -z "$WE_STARTED_KAK" && kak-lsp --kakoune -s $kak_session}
}
hook global WinSetOption filetype=(racket|rust|python|go|javascript|typescript|c|cpp|tex|latex|fsharp|ocaml|haskell) %{
lsp-enable-window
map global normal <c-l> ": enter-user-mode lsp<ret>"
lsp-auto-hover-enable
# lsp-auto-hover-insert-mode-enable
set buffer lsp_hover_anchor true
}
hook global WinSetOption filetype=(racket|rust|python|go|javascript|typescript|c|cpp|tex|latex|haskell) %{
# Format the document if possible
hook window BufWritePre .* %{ lsp-formatting }
}
hook global WinSetOption filetype=(rust|go) %{
hook window -group semantic-tokens BufReload .* lsp-semantic-tokens
hook window -group semantic-tokens NormalIdle .* lsp-semantic-tokens
hook window -group semantic-tokens InsertIdle .* lsp-semantic-tokens
hook -once -always window WinSetOption filetype=.* %{
remove-hooks window semantic-tokens
}
}
hook global WinSetOption filetype=rust %{
hook window -group rust-inlay-hints BufReload .* rust-analyzer-inlay-hints
hook window -group rust-inlay-hints NormalIdle .* rust-analyzer-inlay-hints
hook window -group rust-inlay-hints InsertIdle .* rust-analyzer-inlay-hints
hook -once -always window WinSetOption filetype=.* %{
remove-hooks window rust-inlay-hints
}
}
# <a-a> in Insert mode moves to end of line.
map global insert <a-a> '<esc>A'
hook global WinSetOption filetype=(fsharp) %{
set-option buffer comment_line "//"
}
hook global WinSetOption filetype=(ocaml) %{
unset-option buffer comment_line
set-option buffer comment_block_begin "(*"
set-option buffer comment_block_end "*)"
}
hook global WinSetOption filetype=(haskell) %{
set-option buffer makecmd "cabal build"
}
hook global WinSetOption filetype=(rust) %{
set-option buffer makecmd "cargo check"
}
def -hidden insert-c-n %{
try %{
lsp-snippets-select-next-placeholders
exec '<a-;>d'
} catch %{
exec -with-hooks '<c-n>'
}
}
map global insert <c-n> "<a-;>: insert-c-n<ret>"
# Use C++ for .h headers
hook global BufCreate .*[.](h) %{
set-option buffer filetype cpp
}
hook global BufCreate .*[.]kakrc %{
set-option buffer filetype kak
}
hook global BufCreate .*[.]md %{
add-highlighter buffer/ wrap
}
hook global BufOpenFile .* %{
modeline-parse
}
source "%val{config}/latex.kak"
require-module latex-kak
source "%val{config}/racket.kak"
# source "%val{config}/plugins/plug.kak/rc/plug.kak"
map global normal <a-[> ':inc-dec-modify-numbers + %val{count}<ret>'
map global normal <a-]> ':inc-dec-modify-numbers - %val{count}<ret>'
# Source any settings in the current working directory,
# recursive upwards
evaluate-commands %sh{
$kak_config/source-pwd
}

118
home/kakoune/latex.kak Normal file
View file

@ -0,0 +1,118 @@
## Author: @natsukagami (https://github.com/natsukagami)
##
## To activate, source the file into kakrc and add:
### require-module latex-kak
##
## NOTE: This overrides <a-o>, so if you don't like it, remove it.
provide-module latex-kak %{
# Create a simple begin block, put the cursors in and remove multi-cursor on exit.
define-command -hidden create-begin-block %{
execute-keys -with-hooks "<esc>i\begin{b0}<ret>\end{b0}<esc>"
execute-keys -with-hooks "<a-/>b0<ret><a-N>c"
hook -once buffer ModeChange .*:normal %{
execute-keys -with-hooks -with-maps "<space>gl"
}
}
# Create a begin block with the given parameter as block name.
define-command -params 1 create-begin-block-with %{
execute-keys "<esc>i\begin{b0}<ret>\end{b0}<esc>"
execute-keys -with-hooks "<a-/>b0<ret><a-N>c%arg{1}<esc><space>gl"
}
# Create a \param{} block and put the cursor in the middle.
define-command -params 2 -hidden create-delims %{
execute-keys -with-hooks "<esc>i%arg{1}<esc>hZa%arg{2}<esc>zli"
}
define-command -params 1 create-block-with %{
create-delims "\%arg{1}{" "}"
}
# The font-menu
declare-user-mode latex-font
## Semantics
map -docstring "Text" global latex-font t ": create-block-with text<ret>"
map -docstring "Emphasize (emph)" global latex-font e ": create-block-with emph<ret>"
## Shape
map -docstring "Italics (textit)" global latex-font i ": create-block-with textit<ret>"
map -docstring "Upright (textup)" global latex-font u ": create-block-with textup<ret>"
# map -docstring "Slanted (textsl)" global latex-font S ": create-block-with textsl<ret>"
# map -docstring "Swash font (textsw)" global latex-font W ": create-block-with textsw<ret>"
# map -docstring "Small caps (textsc)" global latex-font C ": create-block-with textsc<ret>"
# Weight
map -docstring "Bold text (textbf)" global latex-font b ": create-block-with textbf<ret>"
# map -docstring "Medium bold (textmd)" global latex-font M ": create-block-with textmd<ret>"
# map -docstring "Normal (textnormal)" global latex-font N ": create-block-with textnormal<ret>"
## Family
# map -docstring "Serif font (textsf)" global latex-font s ": create-block-with textsf<ret>"
# map -docstring "Roman text (textrm)" global latex-font r ": create-block-with textrm<ret>"
map -docstring "Monospace (texttt)" global latex-font m ": create-block-with texttt<ret>"
## Math styles
map -docstring "Math Calligraphic (mathcal)" global latex-font <a-c> ": create-block-with mathcal<ret>"
map -docstring "Math Blackboard (mathbb)" global latex-font <a-b> ": create-block-with mathbb<ret>"
# map -docstring "Math Fraktur (mathfr)" global latex-font <a-F> ": create-block-with mathfr<ret>"
# map -docstring "Math Roman (mathrm)" global latex-font <a-r> ": create-block-with mathrm<ret>"
# map -docstring "Math Italics (mathit)" global latex-font <a-i> ": create-block-with mathit<ret>"
# map -docstring "Math Bold (mathbf)" global latex-font <a-B> ": create-block-with mathbf<ret>"
# map -docstring "Serif font (mathsf)" global latex-font <a-s> ": create-block-with mathsf<ret>"
map -docstring "Math Monospace (mathtt)" global latex-font <a-m> ": create-block-with mathtt<ret>"
# "Insert block" menu
declare-user-mode latex-insert-block
## Common normal text blocks
map -docstring "Unordered list" global latex-insert-block u ": create-begin-block-with itemize<ret>"
map -docstring "Ordered list" global latex-insert-block o ": create-begin-block-with enumerate<ret>"
## Common math blocks
map -docstring "Theorem" global latex-insert-block t ": create-begin-block-with theorem<ret>"
map -docstring "Definition" global latex-insert-block d ": create-begin-block-with definition<ret>"
map -docstring "Lemma" global latex-insert-block l ": create-begin-block-with lemma<ret>"
map -docstring "Example" global latex-insert-block e ": create-begin-block-with example<ret>"
map -docstring "Proof" global latex-insert-block p ": create-begin-block-with proof<ret>"
## Common environments
map -docstring "align*" global latex-insert-block a ": create-begin-block-with align*<ret>"
map -docstring "Matrix" global latex-insert-block m ": create-begin-block-with bmatrix<ret>"
map -docstring "Cases" global latex-insert-block C ": create-begin-block-with cases<ret>"
map -docstring "Table" global latex-insert-block T ": create-begin-block-with tabular<ret>"
## Custom
map -docstring "Custom" global latex-insert-block c ": create-begin-block<ret>"
# Pairs of delimiters
declare-user-mode latex-insert-delims
map -docstring "Parentheses" global latex-insert-delims p ": create-delims ( )<ret>"
map -docstring "Large Parentheses" global latex-insert-delims P ": create-delims \left( \right)<ret>"
map -docstring "Brackets" global latex-insert-delims b ": create-delims \left[ \right]<ret>"
map -docstring "Sets" global latex-insert-delims s ": create-delims \{ \}<ret>"
map -docstring "Large Sets" global latex-insert-delims S ": create-delims \left\{ \right\}<ret>"
hook global WinSetOption filetype=(latex) %{
## Create inline and display math blocks
map buffer normal <a-3> "i\(\)<esc>hhi"
map buffer insert <a-3> "\(\)<a-;>2h"
map buffer normal <a-4> "i\[\]<esc>hhi"
map buffer insert <a-4> "\[\]<a-;>2h"
map buffer normal <a-5> ": enter-user-mode latex-insert-delims<ret>"
map buffer insert <a-5> "<esc>: enter-user-mode latex-insert-delims<ret>"
## Quickly create begin/end blocks
map buffer normal <c-n> ": create-begin-block<ret>"
map buffer insert <c-n> "<esc>: create-begin-block<ret>"
## Font menu
map buffer normal <c-b> ": enter-user-mode latex-font<ret>"
map buffer insert <c-b> "<esc>: enter-user-mode latex-font<ret>"
## Insert menu
map buffer normal <a-b> ": enter-user-mode latex-insert-block<ret>"
map buffer insert <a-b> "<esc>: enter-user-mode latex-insert-block<ret>"
## Select math equations and environment blocks
map buffer object e -docstring "Inline Math equation \( \)" "c\\\\\\(,\\\\\\)<ret>"
map buffer object E -docstring "Display Math equation \[ \]" "c\\\\\\[,\\\\\\]<ret>"
map buffer object v -docstring "Simple environment \env{}" "c\\\\\\w+\\{,\\}<ret>"
map buffer object V -docstring "Full environment \begin{env}\end{env}" "c\\\\begin\\{\\w+\\}(?:\\{[\\w\\s]*\\})*(?:\\[[\\w\\s]*\\])*,\\\\end\\{\\w+\\}<ret>"
## Quickly get a new item
map buffer normal <a-o> "o\item "
map buffer insert <a-ret> "<esc>o\item "
}
}

844
home/kakoune/racket.kak Normal file
View file

@ -0,0 +1,844 @@
# --------------------------------------------------------------------------------------------------- #
# racket source adapted from:
# https://github.com/soegaard/racket-highlight-for-github/blob/master/generate-keywords.rkt
# https://github.com/soegaard/racket-highlight-for-github/blob/master/generate-regular-expressions.rkt
# --------------------------------------------------------------------------------------------------- #
# modified template from: scheme.kak
# https://github.com/mawww/kakoune/blob/master/rc/filetype/scheme.kak
# --------------------------------------------------------------------------------------------------- #
# kak colour codes; value:red, type,operator:yellow, variable,module,attribute:green,
# function,string,comment:cyan, keyword:blue, meta:magenta, builtin:default
# --------------------------------------------------------------------------------------------------- #
# NOTE: authors first use of 'awk', refer to scheme.kak
# TODO: extflonum
# --------------------------------------------------------------------------------------------------- #
# Detection
# ‾‾‾‾‾‾‾‾‾
hook global BufCreate .*[.](rkt|rktd|rktl) %{
set-option buffer filetype racket
}
# Initialization
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
hook global WinSetOption filetype=racket %{
require-module racket
set-option window static_words %opt{racket_static_words}
set-option buffer extra_word_chars '_' '-' '!' '%' '?' '<' '>' '='
set-option buffer comment_line ';'
set-option buffer comment_block_begin '#|'
set-option buffer comment_block_end '|#'
hook window ModeChange pop:insert:.* -group racket-trim-indent lisp-trim-indent
hook window InsertChar \n -group racket-indent lisp-indent-on-new-line
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window racket-.+ }
}
hook -group racket-highlight global WinSetOption filetype=racket %{
add-highlighter window/racket ref racket
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/racket }
}
# --------------------------------------------------------------------------------------------------- #
provide-module racket %§
require-module lisp
# Highlighters
# ‾‾‾‾‾‾‾‾‾‾‾‾
add-highlighter shared/racket regions
add-highlighter shared/racket/code default-region group
add-highlighter shared/racket/string region '"' (?<!\\)(\\\\)*" fill string
add-highlighter shared/racket/comment region ';' '$' fill comment
add-highlighter shared/racket/comment-form region -recurse "\(" "#;\(" "\)" fill comment
add-highlighter shared/racket/comment-block region "#\|" "\|#" fill comment
add-highlighter shared/racket/quoted-form region -recurse "\(" "'\(" "\)" fill variable
add-highlighter shared/racket/code/ regex (#t|#f)\b 0:value
add-highlighter shared/racket/code/ regex \Q#%\E(app|datum|declare|expression|module-begin|plain-app|plain-lambda|plain-module-begin|printing-module-begin|provide|require|stratified-body|top|top-interaction|variable-reference)\b 0:keyword
# racket classes and objects
add-highlighter shared/racket/code/ regex \b(this|writable|printable|object|externalizable|equal)(\Q%\E|<\Q%\E>) 0:keyword
# --------------------------------------------------------------------------------------------------- #
# link to regular expression <https://regex101.com/r/PoJ7wS/2> as at 01/04/2019
# <https://github.com/codemirror/CodeMirror/blob/master/mode/scheme/scheme.js#L46>
# --------------------------------------------------------------------------------------------------- #
# binary
add-highlighter shared/racket/code/ regex %{(#b|#b#(e|i)|#(e|i)#b)(?:[-+]i|[-+][01]+#*(?:/[01]+#*)?i|[-+]?[01]+#*(?:/[01]+#*)?@[-+]?[01]+#*(?:/[01]+#*)?|[-+]?[01]+#*(?:/[01]+#*)?[-+](?:[01]+#*(?:/[01]+#*)?)?i|[-+]?[01]+#*(?:/[01]+#*)?)((?=[()\s;"])|$)} 0:rgb:e8b5ce
# octal
add-highlighter shared/racket/code/ regex %{(#o|#o#(e|i)|#(e|i)#o)(?:[-+]i|[-+][0-7]+#*(?:/[0-7]+#*)?i|[-+]?[0-7]+#*(?:/[0-7]+#*)?@[-+]?[0-7]+#*(?:/[0-7]+#*)?|[-+]?[0-7]+#*(?:/[0-7]+#*)?[-+](?:[0-7]+#*(?:/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:/[0-7]+#*)?)((?=[()\s;"])|$)} 0:rgb:e8b5ce
# hexadecimal
add-highlighter shared/racket/code/ regex %{(#x|#x#(e|i)|#(e|i)#x)(?:[-+]i|[-+][\da-f]+#*(?:/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:/[\da-f]+#*)?)((?=[()\s;"])|$)} 0:rgb:e8b5ce
# decimal
add-highlighter shared/racket/code/ regex %{(#d|#d#(e|i)|#(e|i)#d|\b)(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*/\d+#*))((?=[\s();"])|$)} 0:rgb:e8b5ce
# --------------------------------------------------------------------------------------------------- #
# If your neatness borders on obsessive at times head over to:
# <https://github.com/wlangstroth/vim-racket/blob/master/syntax/racket.vim>
# for some inspiration or a breath of fresh air....hold on tight and scroll.
evaluate-commands %sh{
exec awk -f - <<'EOF'
BEGIN{
split("* + - /", operators);
split( \
"-> ->* ->*m ->d ->dm ->i ->m ... :do-in == => _ "\
"absent abstract all-defined-out all-from-out and any augment augment* "\
"augment-final augment-final* augride augride* begin begin-for-syntax "\
"begin0 case case-> case->m case-lambda class class* "\
"class-field-accessor class-field-mutator class/c class/derived "\
"combine-in combine-out command-line compound-unit compound-unit/infer "\
"cond cons/dc contract contract-out contract-pos/neg-doubling "\
"contract-struct contracted define define-compound-unit "\
"define-compound-unit/infer define-contract-struct "\
"define-custom-hash-types define-custom-set-types define-for-syntax "\
"define-local-member-name define-logger define-match-expander "\
"define-member-name define-module-boundary-contract "\
"define-namespace-anchor define-opt/c define-sequence-syntax "\
"define-serializable-class define-serializable-class* define-signature "\
"define-signature-form define-struct define-struct/contract "\
"define-struct/derived define-syntax define-syntax-rule define-syntaxes "\
"define-unit define-unit-binding define-unit-from-context "\
"define-unit/contract define-unit/new-import-export define-unit/s "\
"define-values define-values-for-export define-values-for-syntax "\
"define-values/invoke-unit define-values/invoke-unit/infer "\
"define/augment define/augment-final define/augride define/contract "\
"define/final-prop define/match define/overment define/override "\
"define/override-final define/private define/public define/public-final "\
"define/pubment define/subexpression-pos-prop "\
"define/subexpression-pos-prop/name delay delay/idle delay/name "\
"delay/strict delay/sync delay/thread do else except except-in "\
"except-out export extends failure-cont false false/c field "\
"file flat-murec-contract flat-rec-contract for for* "\
"for*/and for*/async for*/first for*/fold for*/fold/derived for*/hash "\
"for*/hasheq for*/hasheqv for*/last for*/list for*/lists "\
"for*/mutable-set for*/mutable-seteq for*/mutable-seteqv for*/or "\
"for*/product for*/set for*/seteq for*/seteqv for*/stream for*/sum "\
"for*/vector for*/weak-set for*/weak-seteq for*/weak-seteqv for-label "\
"for-meta for-syntax for-template for/and for/async for/first for/fold "\
"for/fold/derived for/hash for/hasheq for/hasheqv for/last for/list "\
"for/lists for/mutable-set for/mutable-seteq for/mutable-seteqv for/or "\
"for/product for/set for/seteq for/seteqv for/stream for/sum for/vector "\
"for/weak-set for/weak-seteq for/weak-seteqv gen:custom-write gen:dict "\
"gen:equal+hash gen:set gen:stream generic get-field hash/dc if implies "\
"import include include-at/relative-to include-at/relative-to/reader "\
"include/reader inherit inherit-field inherit/inner inherit/super init "\
"init-depend init-field init-rest inner inspect instantiate interface "\
"interface* invariant-assertion invoke-unit invoke-unit/infer lambda "\
"lazy let let* let*-values let-syntax let-syntaxes let-values let/cc "\
"let/ec letrec letrec-syntax letrec-syntaxes letrec-syntaxes+values "\
"letrec-values lib link local local-require log-debug log-error "\
"log-fatal log-info log-warning match match* match*/derived "\
"match-define match-define-values match-lambda match-lambda* "\
"match-lambda** match-let match-let* match-let*-values match-let-values "\
"match-letrec match-letrec-values match/derived match/values "\
"member-name-key mixin module module* module+ nand new nor "\
"object-contract object/c only only-in only-meta-in open opt/c or "\
"overment overment* override override* override-final override-final* "\
"parameterize parameterize* parameterize-break parametric->/c place "\
"place* place/context planet prefix prefix-in prefix-out private "\
"private* prompt-tag/c protect-out provide provide-signature-elements "\
"provide/contract public public* public-final public-final* pubment "\
"pubment* quasiquote quasisyntax quasisyntax/loc quote quote-syntax "\
"quote-syntax/prune recontract-out recursive-contract relative-in "\
"rename rename-in rename-inner rename-out rename-super require send "\
"send* send+ send-generic send/apply send/keyword-apply set! "\
"set!-values set-field! shared stream stream* stream-cons struct "\
"struct* struct-copy struct-field-index struct-out struct/c struct/ctc "\
"struct/dc submod super super-instantiate super-make-object super-new "\
"syntax syntax-case syntax-case* syntax-id-rules syntax-rules "\
"syntax/loc tag this thunk thunk* time unconstrained-domain-> "\
"unit unit-from-context unit/c unit/new-import-export unit/s unless "\
"unquote unquote-splicing unsyntax unsyntax-splicing values/drop when "\
"with-continuation-mark with-contract with-contract-continuation-mark "\
"with-handlers with-handlers* with-method with-syntax ~@ λ", keywords);
split( \
"*list/c </c <=/c =/c >/c >=/c "\
"abort-current-continuation abs acos add-between add1 "\
"alarm-evt always-evt and/c andmap angle any/c append append* "\
"append-map apply argmax argmin arithmetic-shift arity-at-least "\
"arity-at-least-value arity-checking-wrapper "\
"arrow-contract-info arrow-contract-info-accepts-arglist "\
"arrow-contract-info-chaperone-procedure "\
"arrow-contract-info-check-first-order asin assf "\
"assoc assq assv atan bad-number-of-results banner base->-doms/c "\
"base->-rngs/c between/c bitwise-and bitwise-bit-field "\
"bitwise-ior bitwise-not bitwise-xor "\
"blame-add-car-context blame-add-cdr-context blame-add-context "\
"blame-add-missing-party blame-add-nth-arg-context "\
"blame-add-range-context blame-add-unknown-context blame-context "\
"blame-contract blame-fmt->-string blame-negative "\
"blame-positive blame-replace-negative blame-source "\
"blame-swap blame-update blame-value box box-cas! box-immutable "\
"box-immutable/c box/c break-enabled break-thread "\
"build-chaperone-contract-property build-compound-type-name "\
"build-contract-property build-flat-contract-property build-list "\
"build-path build-path/convention-type build-string build-vector "\
"byte-pregexp byte-regexp bytes bytes->immutable-bytes bytes->list "\
"bytes->path bytes->path-element bytes->string/latin-1 "\
"bytes->string/locale bytes->string/utf-8 bytes-append bytes-append* "\
"bytes-close-converter bytes-convert bytes-convert-end bytes-copy "\
"bytes-copy! bytes-fill! bytes-join bytes-length bytes-open-converter "\
"bytes-ref bytes-set! bytes-utf-8-index bytes-utf-8-length "\
"bytes-utf-8-ref caaaar caaadr caaar caadar caaddr caadr caar cadaar "\
"cadadr cadar caddar cadddr caddr cadr call-in-nested-thread "\
"call-with-atomic-output-file call-with-break-parameterization "\
"call-with-composable-continuation call-with-continuation-barrier "\
"call-with-continuation-prompt call-with-current-continuation "\
"call-with-default-reading-parameterization "\
"call-with-escape-continuation call-with-exception-handler "\
"call-with-file-lock/timeout call-with-immediate-continuation-mark "\
"call-with-input-bytes call-with-input-file call-with-input-file* "\
"call-with-input-string call-with-output-bytes call-with-output-file "\
"call-with-output-file* call-with-output-string "\
"call-with-parameterization call-with-semaphore "\
"call-with-semaphore/enable-break call-with-values call/cc call/ec car "\
"cartesian-product cdaaar cdaadr cdaar cdadar cdaddr cdadr cdar cddaar "\
"cddadr cddar cdddar cddddr cdddr cddr cdr ceiling channel-get "\
"channel-put channel-put-evt channel-try-get channel/c "\
"chaperone-box chaperone-channel chaperone-continuation-mark-key "\
"chaperone-evt chaperone-hash chaperone-hash-set chaperone-procedure "\
"chaperone-procedure* chaperone-prompt-tag "\
"chaperone-struct chaperone-struct-type chaperone-vector "\
"chaperone-vector* char->integer char-downcase char-foldcase "\
"char-general-category char-in char-in/c char-titlecase char-upcase "\
"char-utf-8-length check-duplicate-identifier check-duplicates "\
"checked-procedure-check-and-extract choice-evt class->interface "\
"class-info class-seal class-unseal cleanse-path "\
"close-input-port close-output-port coerce-chaperone-contract "\
"coerce-chaperone-contracts coerce-contract coerce-contract/f "\
"coerce-contracts coerce-flat-contract coerce-flat-contracts "\
"collect-garbage collection-file-path collection-path combinations "\
"compile compile-allow-set!-undefined "\
"compile-context-preservation-enabled compile-enforce-module-constants "\
"compile-syntax compiled-expression-recompile "\
"compose compose1 conjoin conjugate cons cons/c const "\
"continuation-mark-key/c continuation-mark-set->context "\
"continuation-mark-set->list continuation-mark-set->list* "\
"continuation-mark-set-first continuation-marks "\
"contract-continuation-mark-key contract-custom-write-property-proc "\
"contract-exercise contract-first-order contract-late-neg-projection "\
"contract-name contract-proc contract-projection "\
"contract-random-generate contract-random-generate-fail "\
"contract-random-generate-get-current-environment "\
"contract-random-generate-stash contract-random-generate/choose "\
"contract-struct-exercise contract-struct-generate "\
"contract-struct-late-neg-projection contract-val-first-projection "\
"convert-stream copy-directory/files copy-file copy-port cos cosh count "\
"current-blame-format current-break-parameterization "\
"current-code-inspector current-command-line-arguments current-compile "\
"current-compile-target-machine current-compiled-file-roots "\
"current-continuation-marks current-contract-region current-custodian "\
"current-directory current-directory-for-user current-drive "\
"current-environment-variables current-error-port current-eval "\
"current-evt-pseudo-random-generator current-force-delete-permissions "\
"current-future current-gc-milliseconds "\
"current-get-interaction-input-port current-inexact-milliseconds "\
"current-input-port current-inspector current-library-collection-links "\
"current-library-collection-paths current-load current-load-extension "\
"current-load-relative-directory current-load/use-compiled "\
"current-locale current-logger current-memory-use current-milliseconds "\
"current-module-declare-name current-module-declare-source "\
"current-module-name-resolver current-module-path-for-load "\
"current-namespace current-output-port current-parameterization "\
"current-plumber current-preserved-thread-cell-values current-print "\
"current-process-milliseconds current-prompt-read "\
"current-pseudo-random-generator current-read-interaction "\
"current-reader-guard current-readtable current-seconds "\
"current-security-guard current-subprocess-custodian-mode "\
"current-thread current-thread-group current-thread-initial-stack-size "\
"current-write-relative-directory curry curryr custodian-box-value "\
"custodian-limit-memory custodian-managed-list custodian-require-memory "\
"custodian-shutdown-all custom-print-quotable-accessor "\
"custom-write-accessor custom-write-property-proc", builtins_one);
split( \
"date date* date*-nanosecond date*-time-zone-name date-day "\
"date-hour date-minute date-month date-second date-time-zone-offset "\
"date-week-day date-year date-year-day datum->syntax "\
"datum-intern-literal default-continuation-prompt-tag degrees->radians "\
"delete-directory delete-directory/files delete-file denominator "\
"dict->list dict-clear dict-clear! dict-copy dict-count dict-for-each "\
"dict-implements/c dict-iter-contract dict-iterate-first "\
"dict-iterate-key dict-iterate-next dict-iterate-value "\
"dict-key-contract dict-keys dict-map dict-ref dict-ref! "\
"dict-remove dict-remove! dict-set dict-set! dict-set* dict-set*! "\
"dict-update dict-update! dict-value-contract dict-values "\
"directory-list disjoin display display-lines display-lines-to-file "\
"display-to-file displayln drop drop-common-prefix drop-right dropf "\
"dropf-right dump-memory-stats dup-input-port dup-output-port "\
"dynamic->* dynamic-get-field dynamic-object/c dynamic-place "\
"dynamic-place* dynamic-require dynamic-require-for-syntax dynamic-send "\
"dynamic-set-field! dynamic-wind eighth empty empty-sequence "\
"empty-stream environment-variables-copy environment-variables-names "\
"environment-variables-ref environment-variables-set! eof eof-evt "\
"ephemeron-value eprintf eq-contract-val eq-hash-code eq? "\
"equal-contract-val equal-hash-code equal-secondary-hash-code recur "\
"eqv-hash-code error error-display-handler error-escape-handler "\
"error-print-context-length error-print-source-location "\
"error-print-width error-value->string-handler eval eval-jit-enabled "\
"eval-syntax evt/c exact->inexact exact-ceiling exact-floor "\
"exact-round exact-truncate executable-yield-handler exit "\
"exit-handler exn exn-continuation-marks exn-message exn:break "\
"exn:break-continuation exn:break:hang-up exn:break:terminate exn:fail "\
"exn:fail:contract exn:fail:contract:arity exn:fail:contract:blame "\
"exn:fail:contract:blame-object exn:fail:contract:continuation "\
"exn:fail:contract:divide-by-zero exn:fail:contract:non-fixnum-result "\
"exn:fail:contract:variable exn:fail:contract:variable-id "\
"exn:fail:filesystem exn:fail:filesystem:errno "\
"exn:fail:filesystem:errno-errno exn:fail:filesystem:exists "\
"exn:fail:filesystem:missing-module "\
"exn:fail:filesystem:missing-module-path exn:fail:filesystem:version "\
"exn:fail:network exn:fail:network:errno exn:fail:network:errno-errno "\
"exn:fail:object exn:fail:out-of-memory "\
"exn:fail:read exn:fail:read-srclocs exn:fail:read:eof "\
"exn:fail:read:non-char exn:fail:syntax exn:fail:syntax-exprs "\
"exn:fail:syntax:missing-module exn:fail:syntax:missing-module-path "\
"exn:fail:syntax:unbound exn:fail:unsupported exn:fail:user "\
"exn:missing-module-accessor exn:srclocs-accessor exp "\
"expand expand-once expand-syntax expand-syntax-once "\
"expand-syntax-to-top-form expand-to-top-form expand-user-path "\
"explode-path expt failure-result/c field-names fifth "\
"file->bytes file->bytes-lines file->lines file->list file->string "\
"file->value file-name-from-path file-or-directory-identity "\
"file-or-directory-modify-seconds file-or-directory-permissions "\
"file-position file-position* file-size file-stream-buffer-mode "\
"file-truncate filename-extension filesystem-change-evt "\
"filesystem-change-evt-cancel filesystem-root-list filter filter-map "\
"filter-not filter-read-input-port find-executable-path find-files "\
"find-library-collection-links find-library-collection-paths "\
"find-relative-path find-system-path findf first first-or/c "\
"flat-contract flat-contract-predicate "\
"flat-contract-with-explanation flat-named-contract "\
"flatten floating-point-bytes->real floor flush-output "\
"fold-files foldl foldr for-each force format fourth fprintf "\
"fsemaphore-count fsemaphore-post fsemaphore-wait future "\
"gcd generate-member-key generate-temporaries gensym get-output-bytes "\
"get-output-string get-preference get/build-late-neg-projection "\
"get/build-val-first-projection getenv global-port-print-handler "\
"group-by group-execute-bit group-read-bit group-write-bit guard-evt "\
"handle-evt hash hash->list hash-clear hash-clear! hash-copy "\
"hash-copy-clear hash-count hash-for-each hash-iterate-first "\
"hash-iterate-key hash-iterate-key+value hash-iterate-next "\
"hash-iterate-pair hash-iterate-value hash-keys hash-map hash-ref "\
"hash-ref! hash-remove hash-remove! hash-set hash-set! hash-set* "\
"hash-set*! hash-update hash-update! hash-values hash/c hasheq "\
"hasheqv identifier-binding identifier-binding-symbol "\
"identifier-label-binding identifier-prune-lexical-context "\
"identifier-prune-to-source-module "\
"identifier-remove-from-definition-context identifier-template-binding "\
"identifier-transformer-binding identity if/c imag-part "\
"impersonate-box impersonate-channel "\
"impersonate-continuation-mark-key impersonate-hash "\
"impersonate-hash-set impersonate-procedure impersonate-procedure* "\
"impersonate-prompt-tag impersonate-struct impersonate-vector "\
"impersonate-vector* impersonator-ephemeron "\
"impersonator-prop:application-mark "\
"impersonator-prop:blame impersonator-prop:contracted "\
"in-bytes in-bytes-lines in-combinations in-cycle in-dict in-dict-keys "\
"in-dict-pairs in-dict-values in-directory in-hash in-hash-keys "\
"in-hash-pairs in-hash-values in-immutable-hash in-immutable-hash-keys "\
"in-immutable-hash-pairs in-immutable-hash-values in-immutable-set "\
"in-indexed in-input-port-bytes in-input-port-chars in-lines in-list "\
"in-mlist in-mutable-hash in-mutable-hash-keys in-mutable-hash-pairs "\
"in-mutable-hash-values in-mutable-set in-naturals in-parallel "\
"in-permutations in-port in-producer in-range in-sequences in-set "\
"in-slice in-stream in-string in-syntax in-value in-values*-sequence "\
"in-values-sequence in-vector in-weak-hash in-weak-hash-keys "\
"in-weak-hash-pairs in-weak-hash-values in-weak-set index-of "\
"index-where indexes-of indexes-where inexact->exact "\
"input-port-append instanceof/c integer->char integer->integer-bytes "\
"integer-bytes->integer integer-in integer-length integer-sqrt "\
"integer-sqrt/remainder interface->method-names "\
"internal-definition-context-binding-identifiers "\
"internal-definition-context-introduce internal-definition-context-seal "\
"keyword->string keyword-apply keywords-match kill-thread last "\
"last-pair lcm length list list* list*of list->bytes list->mutable-set "\
"list->mutable-seteq list->mutable-seteqv list->set list->seteq "\
"list->seteqv list->string list->vector list->weak-set list->weak-seteq "\
"list->weak-seteqv list-ref list-set list-tail list-update "\
"list/c listof load load-extension "\
"load-on-demand-enabled load-relative load-relative-extension load/cd "\
"load/use-compiled local-expand local-expand/capture-lifts "\
"local-transformer-expand local-transformer-expand/capture-lifts "\
"locale-string-encoding log log-all-levels log-level-evt "\
"log-max-level log-message logger-name", builtins_two);
split( \
"magnitude make-arity-at-least make-base-empty-namespace "\
"make-base-namespace make-bytes make-channel make-chaperone-contract "\
"make-continuation-mark-key make-continuation-prompt-tag make-contract "\
"make-custodian make-custodian-box make-custom-hash "\
"make-custom-hash-types make-custom-set make-custom-set-types make-date "\
"make-date* make-derived-parameter make-directory make-directory* "\
"make-do-sequence make-empty-namespace make-environment-variables "\
"make-ephemeron make-exn make-exn:break make-exn:break:hang-up "\
"make-exn:break:terminate make-exn:fail make-exn:fail:contract "\
"make-exn:fail:contract:arity make-exn:fail:contract:blame "\
"make-exn:fail:contract:continuation "\
"make-exn:fail:contract:divide-by-zero "\
"make-exn:fail:contract:non-fixnum-result "\
"make-exn:fail:contract:variable make-exn:fail:filesystem "\
"make-exn:fail:filesystem:errno make-exn:fail:filesystem:exists "\
"make-exn:fail:filesystem:missing-module "\
"make-exn:fail:filesystem:version make-exn:fail:network "\
"make-exn:fail:network:errno make-exn:fail:object "\
"make-exn:fail:out-of-memory make-exn:fail:read make-exn:fail:read:eof "\
"make-exn:fail:read:non-char make-exn:fail:syntax "\
"make-exn:fail:syntax:missing-module make-exn:fail:syntax:unbound "\
"make-exn:fail:unsupported make-exn:fail:user "\
"make-file-or-directory-link make-flat-contract make-fsemaphore "\
"make-generic make-handle-get-preference-locked make-hash "\
"make-hash-placeholder make-hasheq make-hasheq-placeholder make-hasheqv "\
"make-hasheqv-placeholder make-immutable-custom-hash "\
"make-immutable-hash make-immutable-hasheq make-immutable-hasheqv "\
"make-impersonator-property make-input-port make-input-port/read-to-peek "\
"make-inspector make-interned-syntax-introducer make-keyword-procedure "\
"make-known-char-range-list make-limited-input-port make-list "\
"make-lock-file-name make-log-receiver make-logger make-mixin-contract "\
"make-mutable-custom-set make-none/c make-object make-output-port "\
"make-parameter make-parent-directory* make-phantom-bytes make-pipe "\
"make-pipe-with-specials make-placeholder make-plumber make-polar "\
"make-prefab-struct make-primitive-class make-proj-contract "\
"make-pseudo-random-generator make-reader-graph make-readtable "\
"make-rectangular make-rename-transformer make-resolved-module-path "\
"make-security-guard make-semaphore make-set!-transformer "\
"make-shared-bytes make-sibling-inspector make-special-comment "\
"make-srcloc make-string make-struct-field-accessor "\
"make-struct-field-mutator make-struct-type make-struct-type-property "\
"make-syntax-delta-introducer make-syntax-introducer "\
"make-temporary-file make-tentative-pretty-print-output-port "\
"make-thread-cell make-thread-group make-vector make-weak-box "\
"make-weak-custom-hash make-weak-custom-set make-weak-hash "\
"make-weak-hasheq make-weak-hasheqv make-will-executor map "\
"match-equality-test max mcar mcdr mcons member "\
"member-name-key-hash-code memf memq memv merge-input min "\
"mixin-contract module->exports module->imports "\
"module->indirect-exports module->language-info module->namespace "\
"module-compiled-exports module-compiled-imports "\
"module-compiled-indirect-exports module-compiled-language-info "\
"module-compiled-name module-compiled-submodules module-path-index-join "\
"module-path-index-resolve module-path-index-split "\
"module-path-index-submodule modulo mutable-set "\
"mutable-seteq mutable-seteqv n->th nack-guard-evt "\
"namespace-anchor->empty-namespace namespace-anchor->namespace "\
"namespace-attach-module namespace-attach-module-declaration "\
"namespace-base-phase namespace-mapped-symbols namespace-module-identifier "\
"namespace-module-registry namespace-require namespace-require/constant "\
"namespace-require/copy namespace-require/expansion-time "\
"namespace-set-variable-value! namespace-symbol->identifier "\
"namespace-syntax-introduce namespace-undefine-variable! "\
"namespace-unprotect-module namespace-variable-value "\
"natural-number/c negate never-evt new-∀/c new-∃/c newline ninth "\
"non-empty-listof none/c normal-case-path normalize-arity "\
"normalize-path not not/c null number->string numerator "\
"object->vector object-info object-interface object-name "\
"object=-hash-code one-of/c open-input-bytes open-input-file "\
"open-input-output-file open-input-string open-output-bytes "\
"open-output-file open-output-nowhere open-output-string or/c "\
"order-of-magnitude ormap other-execute-bit other-read-bit "\
"other-write-bit parameter/c parse-command-line partition path->bytes "\
"path->complete-path path->directory-path path->string "\
"path-add-extension path-add-suffix path-convention-type "\
"path-element->bytes path-element->string path-get-extension "\
"path-list-string->path-list path-only path-replace-extension "\
"path-replace-suffix pathlist-closure peek-byte peek-byte-or-special "\
"peek-bytes peek-bytes! peek-bytes!-evt peek-bytes-avail! "\
"peek-bytes-avail!* peek-bytes-avail!-evt "\
"peek-bytes-avail!/enable-break peek-bytes-evt "\
"peek-char peek-char-or-special peek-string peek-string! "\
"peek-string!-evt peek-string-evt peeking-input-port permutations "\
"pi pi.f pipe-content-length place-break place-channel "\
"place-channel-get place-channel-put place-channel-put/get "\
"place-dead-evt place-kill place-wait placeholder-get placeholder-set! "\
"plumber-add-flush! plumber-flush-all plumber-flush-handle-remove! "\
"poll-guard-evt port->bytes port->bytes-lines port->lines "\
"port->list port->string port-closed-evt port-commit-peeked "\
"port-count-lines! port-count-lines-enabled port-display-handler "\
"port-file-identity port-file-unlock port-next-location "\
"port-print-handler port-progress-evt port-read-handler "\
"port-write-handler predicate/c prefab-key->struct-type "\
"prefab-struct-key preferences-lock-file-mode pregexp pretty-display "\
"pretty-format pretty-print pretty-print-.-symbol-without-bars "\
"pretty-print-abbreviate-read-macros pretty-print-columns "\
"pretty-print-current-style-table pretty-print-depth "\
"pretty-print-exact-as-decimal pretty-print-extend-style-table "\
"pretty-print-handler pretty-print-newline pretty-print-post-print-hook "\
"pretty-print-pre-print-hook pretty-print-print-hook "\
"pretty-print-print-line pretty-print-remap-stylable "\
"pretty-print-show-inexactness pretty-print-size-hook "\
"pretty-printing pretty-write primitive-result-arity print "\
"print-as-expression print-boolean-long-form print-box print-graph "\
"print-hash-table print-mpair-curly-braces print-pair-curly-braces "\
"print-reader-abbreviations print-struct print-syntax-width "\
"print-unreadable print-vector-length printable/c printf "\
"println procedure->method procedure-arity procedure-arity-includes/c "\
"procedure-arity-mask procedure-extract-target "\
"procedure-keywords procedure-reduce-arity "\
"procedure-reduce-arity-mask procedure-reduce-keyword-arity "\
"procedure-reduce-keyword-arity-mask procedure-rename "\
"procedure-result-arity procedure-specialize "\
"process process* process*/ports process/ports "\
"processor-count promise/c prop:arity-string prop:arrow-contract "\
"prop:arrow-contract-get-info prop:authentic "\
"prop:blame prop:chaperone-contract prop:checked-procedure "\
"prop:contract prop:contracted prop:custom-print-quotable "\
"prop:custom-write prop:dict prop:dict/contract prop:equal+hash "\
"prop:evt prop:exn:missing-module prop:exn:srclocs "\
"prop:expansion-contexts prop:flat-contract prop:impersonator-of "\
"prop:input-port prop:liberal-define-context prop:object-name "\
"prop:orc-contract prop:orc-contract-get-subcontracts "\
"prop:output-port prop:place-location prop:procedure "\
"prop:recursive-contract prop:recursive-contract-unroll "\
"prop:rename-transformer prop:sequence prop:set!-transformer "\
"prop:stream pseudo-random-generator->vector put-preferences "\
"putenv quotient quotient/remainder", builtins_three);
split( \
"radians->degrees raise raise-argument-error "\
"raise-arguments-error raise-arity-error raise-arity-mask-error "\
"raise-blame-error raise-contract-error raise-mismatch-error "\
"raise-not-cons-blame-error raise-range-error raise-result-arity-error "\
"raise-result-error raise-syntax-error raise-type-error "\
"raise-user-error random random-seed range rationalize read "\
"read-accept-bar-quote read-accept-box read-accept-compiled "\
"read-accept-dot read-accept-graph read-accept-infix-dot "\
"read-accept-lang read-accept-quasiquote read-accept-reader read-byte "\
"read-byte-or-special read-bytes read-bytes! read-bytes!-evt "\
"read-bytes-avail! read-bytes-avail!* read-bytes-avail!-evt "\
"read-bytes-avail!/enable-break read-bytes-evt read-bytes-line "\
"read-bytes-line-evt read-case-sensitive read-cdot read-char "\
"read-char-or-special read-curly-brace-as-paren "\
"read-curly-brace-with-tag read-decimal-as-inexact read-eval-print-loop "\
"read-language read-line read-line-evt read-on-demand-source "\
"read-square-bracket-as-paren read-square-bracket-with-tag read-string "\
"read-string! read-string!-evt read-string-evt read-syntax "\
"read-syntax/recursive read/recursive readtable-mapping "\
"real->decimal-string real->double-flonum real->floating-point-bytes "\
"real->single-flonum real-in real-part reencode-input-port "\
"reencode-output-port regexp regexp-match regexp-match* "\
"regexp-match-evt regexp-match-peek "\
"regexp-match-peek-immediate regexp-match-peek-positions "\
"regexp-match-peek-positions* regexp-match-peek-positions-immediate "\
"regexp-match-peek-positions-immediate/end "\
"regexp-match-peek-positions/end regexp-match-positions "\
"regexp-match-positions* regexp-match-positions/end regexp-match/end "\
"regexp-max-lookbehind regexp-quote regexp-replace "\
"regexp-replace* regexp-replace-quote regexp-replaces regexp-split "\
"regexp-try-match relocate-input-port "\
"relocate-output-port remainder remf remf* remove remove* "\
"remove-duplicates remq remq* remv remv* rename-contract "\
"rename-file-or-directory rename-transformer-target "\
"replace-evt reroot-path resolve-path resolved-module-path-name "\
"rest reverse round second seconds->date semaphore-peek-evt semaphore-post "\
"semaphore-wait semaphore-wait/enable-break sequence->list "\
"sequence->stream sequence-add-between "\
"sequence-andmap sequence-append sequence-count sequence-filter "\
"sequence-fold sequence-for-each sequence-generate sequence-generate* "\
"sequence-length sequence-map sequence-ormap sequence-ref sequence-tail "\
"sequence/c set set!-transformer-procedure set->list set->stream "\
"set-add set-add! set-box! set-box*! set-clear set-clear! set-copy "\
"set-copy-clear set-count set-first set-for-each set-implements/c "\
"set-intersect set-intersect! set-map set-mcar! set-mcdr! "\
"set-phantom-bytes! set-port-next-location! set-remove set-remove! "\
"set-rest set-subtract set-subtract! set-symmetric-difference "\
"set-symmetric-difference! set-union set-union! set/c seteq seteqv seventh "\
"sgn sha1-bytes sha224-bytes sha256-bytes shared-bytes shell-execute "\
"shrink-path-wrt shuffle simple-form-path simplify-path sin "\
"sinh sixth sleep some-system-path->string sort special-comment-value "\
"special-filter-input-port split-at split-at-right split-common-prefix "\
"split-path splitf-at splitf-at-right sqr sqrt srcloc srcloc->string "\
"srcloc-column srcloc-line srcloc-position srcloc-source srcloc-span "\
"stop-after stop-before stream->list stream-add-between "\
"stream-andmap stream-append stream-count stream-filter "\
"stream-first stream-fold stream-for-each stream-length stream-map "\
"stream-ormap stream-ref stream-rest stream-tail stream-take stream/c "\
"string string->bytes/latin-1 string->bytes/locale "\
"string->bytes/utf-8 string->immutable-string string->keyword "\
"string->list string->number string->path string->path-element "\
"string->some-system-path string->symbol string->uninterned-symbol "\
"string->unreadable-symbol string-append string-append* "\
"string-copy string-copy! string-downcase string-fill! string-foldcase "\
"string-join string-len/c string-length string-locale-downcase "\
"string-locale-upcase string-normalize-nfc string-normalize-nfd "\
"string-normalize-nfkc string-normalize-nfkd string-normalize-spaces "\
"string-ref string-replace string-set! "\
"string-split string-titlecase string-trim string-upcase "\
"string-utf-8-length struct->vector struct-info struct-type-info "\
"struct-type-make-constructor struct-type-make-predicate "\
"struct-type-property/c struct:arity-at-least "\
"struct:arrow-contract-info struct:date struct:date* struct:exn "\
"struct:exn:break struct:exn:break:hang-up struct:exn:break:terminate "\
"struct:exn:fail struct:exn:fail:contract "\
"struct:exn:fail:contract:arity struct:exn:fail:contract:blame "\
"struct:exn:fail:contract:continuation "\
"struct:exn:fail:contract:divide-by-zero "\
"struct:exn:fail:contract:non-fixnum-result "\
"struct:exn:fail:contract:variable struct:exn:fail:filesystem "\
"struct:exn:fail:filesystem:errno struct:exn:fail:filesystem:exists "\
"struct:exn:fail:filesystem:missing-module "\
"struct:exn:fail:filesystem:version struct:exn:fail:network "\
"struct:exn:fail:network:errno struct:exn:fail:object "\
"struct:exn:fail:out-of-memory struct:exn:fail:read "\
"struct:exn:fail:read:eof struct:exn:fail:read:non-char "\
"struct:exn:fail:syntax struct:exn:fail:syntax:missing-module "\
"struct:exn:fail:syntax:unbound struct:exn:fail:unsupported "\
"struct:exn:fail:user struct:srcloc struct:wrapped-extra-arg-arrow "\
"sub1 subbytes subprocess subprocess-group-enabled subprocess-kill "\
"subprocess-pid subprocess-status subprocess-wait substring "\
"suggest/c symbol->string symbols sync sync/enable-break sync/timeout "\
"sync/timeout/enable-break syntax->datum syntax->list syntax-arm "\
"syntax-binding-set syntax-binding-set->syntax "\
"syntax-binding-set-extend syntax-column "\
"syntax-debug-info syntax-disarm syntax-e syntax-line "\
"syntax-local-bind-syntaxes syntax-local-certifier syntax-local-context "\
"syntax-local-expand-expression syntax-local-get-shadower "\
"syntax-local-identifier-as-binding syntax-local-introduce "\
"syntax-local-lift-context syntax-local-lift-expression "\
"syntax-local-lift-module syntax-local-lift-module-end-declaration "\
"syntax-local-lift-provide syntax-local-lift-require "\
"syntax-local-lift-values-expression "\
"syntax-local-make-definition-context "\
"syntax-local-make-delta-introducer "\
"syntax-local-module-defined-identifiers syntax-local-module-exports "\
"syntax-local-module-required-identifiers syntax-local-name "\
"syntax-local-phase-level syntax-local-submodules "\
"syntax-local-value syntax-local-value/immediate syntax-position "\
"syntax-property syntax-property-remove "\
"syntax-property-symbol-keys syntax-protect syntax-rearm "\
"syntax-recertify syntax-shift-phase-level syntax-source "\
"syntax-source-module syntax-span syntax-taint "\
"syntax-track-origin syntax/c "\
"system system* system*/exit-code system-idle-evt "\
"system-language+country system-library-subpath "\
"system-path-convention-type system-type system/exit-code "\
"take take-common-prefix take-right takef takef-right "\
"tan tanh tcp-abandon-port tcp-accept tcp-accept-evt "\
"tcp-accept/enable-break tcp-addresses tcp-close tcp-connect "\
"tcp-connect/enable-break tcp-listen "\
"tentative-pretty-print-port-cancel "\
"tentative-pretty-print-port-transfer tenth "\
"the-unsupplied-arg third thread thread-cell-ref thread-cell-set! "\
"thread-dead-evt thread-receive thread-receive-evt thread-resume "\
"thread-resume-evt thread-rewind-receive thread-send "\
"thread-suspend thread-suspend-evt thread-try-receive thread-wait "\
"thread/suspend-to-kill time-apply touch transplant-input-port "\
"transplant-output-port true truncate udp-addresses udp-bind! "\
"udp-close udp-connect! "\
"udp-multicast-interface udp-multicast-join-group! "\
"udp-multicast-leave-group! "\
"udp-multicast-set-interface! udp-multicast-set-loopback! "\
"udp-multicast-set-ttl! udp-multicast-ttl udp-open-socket udp-receive! "\
"udp-receive!* udp-receive!-evt udp-receive!/enable-break "\
"udp-receive-ready-evt udp-send udp-send* udp-send-evt "\
"udp-send-ready-evt udp-send-to udp-send-to* udp-send-to-evt "\
"udp-send-to/enable-break udp-send/enable-break "\
"udp-set-receive-buffer-size! unbox unbox* "\
"uncaught-exception-handler unquoted-printing-string "\
"unquoted-printing-string-value "\
"unspecified-dom use-collection-link-paths "\
"use-compiled-file-check use-compiled-file-paths "\
"use-user-specific-search-paths user-execute-bit user-read-bit "\
"user-write-bit", builtins_four);
split( \
"value-blame value-contract values variable-reference->empty-namespace "\
"variable-reference->module-base-phase "\
"variable-reference->module-declaration-inspector "\
"variable-reference->module-path-index "\
"variable-reference->module-source variable-reference->namespace "\
"variable-reference->phase variable-reference->resolved-module-path "\
"vector vector*-length vector*-ref vector*-set! "\
"vector->immutable-vector vector->list vector->pseudo-random-generator "\
"vector->pseudo-random-generator! vector->values vector-append "\
"vector-argmax vector-argmin vector-cas! vector-copy vector-copy! "\
"vector-count vector-drop vector-drop-right vector-fill! vector-filter "\
"vector-filter-not vector-immutable vector-immutable/c "\
"vector-immutableof vector-length vector-map vector-map! vector-member "\
"vector-memq vector-memv vector-ref vector-set! vector-set*! "\
"vector-set-performance-stats! vector-sort vector-sort! vector-split-at "\
"vector-split-at-right vector-take vector-take-right vector/c "\
"vectorof version void weak-box-value weak-set "\
"weak-seteq weak-seteqv will-execute will-register "\
"will-try-execute with-input-from-bytes with-input-from-file "\
"with-input-from-string with-output-to-bytes with-output-to-file "\
"with-output-to-string would-be-future wrap-evt wrapped-extra-arg-arrow "\
"wrapped-extra-arg-arrow-extra-neg-party-argument "\
"wrapped-extra-arg-arrow-real-func "\
"write write-byte write-bytes write-bytes-avail write-bytes-avail* "\
"write-bytes-avail-evt write-bytes-avail/enable-break write-char "\
"write-special write-special-avail* write-special-evt write-string "\
"write-to-file writeln xor ~.a ~.s ~.v ~a ~e ~r ~s ~v", builtins_five);
split("implementation?/c is-a?/c subclass?/c", builtins_six);
split( \
"< <= = > >= ~? zero? wrapped-extra-arg-arrow? will-executor? weak-box? "\
"void? vector? variable-reference? variable-reference-from-unsafe? "\
"variable-reference-constant? unsupplied-arg? unquoted-printing-string? "\
"unit? udp? udp-multicast-loopback? udp-connected? udp-bound? thread? "\
"thread-running? thread-group? thread-dead? thread-cell? "\
"thread-cell-values? terminal-port? tcp-port? tcp-listener? "\
"tcp-accept-ready? tail-marks-match? system-big-endian? syntax? "\
"syntax-transforming? syntax-transforming-with-lifts? "\
"syntax-transforming-module-expression? syntax-tainted? "\
"syntax-property-preserved? syntax-original? "\
"syntax-local-transforming-module-provides? syntax-binding-set? symbol? "\
"symbol=? symbol<? symbol-unreadable? symbol-interned? subset? "\
"subprocess? subclass? struct? struct-type? struct-type-property? "\
"struct-type-property-accessor-procedure? struct-predicate-procedure? "\
"struct-mutator-procedure? struct-constructor-procedure? "\
"struct-accessor-procedure? string? string>? string>=? string=? "\
"string<? string<=? string-suffix? string-prefix? string-port? "\
"string-no-nuls? string-locale>? string-locale=? string-locale<? "\
"string-locale-ci>? string-locale-ci=? string-locale-ci<? "\
"string-environment-variable-name? string-contains? string-ci>? "\
"string-ci>=? string-ci=? string-ci<? string-ci<=? stream? stream-empty? "\
"srcloc? special-comment? skip-projection-wrapper? single-flonum? set? "\
"set=? set-weak? set-mutable? set-member? set-implements? set-eqv? "\
"set-equal? set-eq? set-empty? set!-transformer? sequence? semaphore? "\
"semaphore-try-wait? semaphore-peek-evt? security-guard? "\
"resolved-module-path? rename-transformer? relative-path? regexp? "\
"regexp-match? regexp-match-exact? real? readtable? rational? "\
"pseudo-random-generator? pseudo-random-generator-vector? proper-subset? "\
"prop:recursive-contract? prop:orc-contract? prop:arrow-contract? promise? "\
"promise/name? promise-running? promise-forced? progress-evt? procedure? "\
"procedure-struct-type? procedure-impersonator*? "\
"procedure-closure-contents-eq? procedure-arity? procedure-arity-includes? "\
"primitive? primitive-closure? pretty-print-style-table? pregexp? "\
"prefab-key? positive? positive-integer? port? port-writes-special? "\
"port-writes-atomic? port-try-file-lock? port-provides-progress-evts? "\
"port-number? port-counts-lines? port-closed? plumber? "\
"plumber-flush-handle? placeholder? place? place-message-allowed? "\
"place-location? place-enabled? place-channel? phantom-bytes? path? "\
"path<? path-string? path-has-extension? path-for-some-system? "\
"path-element? parameterization? parameter? parameter-procedure=? pair? "\
"output-port? odd? object? object=? object-or-false=? "\
"object-method-arity-includes? number? null? normalized-arity? "\
"nonpositive-integer? nonnegative-integer? non-empty-string? negative? "\
"negative-integer? natural? nan? namespace? namespace-anchor? mpair? "\
"module-provide-protected? module-predefined? module-path? "\
"module-path-index? module-declared? "\
"module-compiled-cross-phase-persistent? method-in-interface? "\
"member-name-key? member-name-key=? matches-arity-exactly? logger? "\
"log-receiver? log-level? listen-port-number? list? list-prefix? "\
"list-contract? link-exists? liberal-define-context? keyword? keyword<? "\
"is-a? internal-definition-context? interface? interface-extension? "\
"integer? inspector? inspector-superior? input-port? infinite? inexact? "\
"inexact-real? implementation? impersonator? impersonator-property? "\
"impersonator-property-accessor-procedure? impersonator-of? "\
"impersonator-contract? immutable? identifier? hash? hash-weak? "\
"hash-placeholder? hash-keys-subset? hash-has-key? hash-eqv? "\
"hash-equal? hash-eq? hash-empty? has-contract? has-blame? handle-evt? "\
"generic? generic-set? futures-enabled? future? fsemaphore? "\
"fsemaphore-try-wait? free-transformer-identifier=? "\
"free-template-identifier=? free-label-identifier=? free-identifier=? "\
"flonum? flat-contract? flat-contract-property? fixnum? "\
"filesystem-change-evt? file-stream-port? file-exists? field-bound? "\
"false? exn? exn:srclocs? exn:missing-module? exn:misc:match? exn:fail? "\
"exn:fail:user? exn:fail:unsupported? exn:fail:syntax? "\
"exn:fail:syntax:unbound? exn:fail:syntax:missing-module? exn:fail:read? "\
"exn:fail:read:non-char? exn:fail:read:eof? exn:fail:out-of-memory? "\
"exn:fail:object? exn:fail:network? exn:fail:network:errno? "\
"exn:fail:filesystem? exn:fail:filesystem:version? "\
"exn:fail:filesystem:missing-module? exn:fail:filesystem:exists? "\
"exn:fail:filesystem:errno? exn:fail:contract? exn:fail:contract:variable? "\
"exn:fail:contract:non-fixnum-result? exn:fail:contract:divide-by-zero? "\
"exn:fail:contract:continuation? exn:fail:contract:blame? "\
"exn:fail:contract:arity? exn:break? exn:break:terminate? "\
"exn:break:hang-up? exact? exact-positive-integer? "\
"exact-nonnegative-integer? exact-integer? evt? even? eqv? equal?/equal? "\
"equal-contract? eq-contract? ephemeron? eof-object? environment-variables? "\
"empty? double-flonum? directory-exists? dict? dict-mutable? dict-implements? "\
"dict-has-key? dict-empty? dict-can-remove-keys? dict-can-functional-set? "\
"date? date-dst? date*? custom-write? custom-print-quotable? custodian? "\
"custodian-shut-down? custodian-memory-accounting-available? custodian-box? "\
"contract? contract-struct-list-contract? contract-stronger? "\
"contract-random-generate-fail? contract-random-generate-env? "\
"contract-property? contract-first-order-passes? contract-equivalent? "\
"continuation? continuation-prompt-tag? continuation-prompt-available? "\
"continuation-mark-set? continuation-mark-key? cons? complex? complete-path? "\
"compiled-module-expression? compiled-expression? compile-target-machine? "\
"class? char? char>? char>=? char=? char<? char<=? char-whitespace? "\
"char-upper-case? char-title-case? char-symbolic? char-ready? "\
"char-punctuation? char-numeric? char-lower-case? char-iso-control? "\
"char-graphic? char-ci>? char-ci>=? char-ci=? char-ci<? char-ci<=? "\
"char-blank? char-alphabetic? chaperone? chaperone-of? chaperone-contract? "\
"chaperone-contract-property? channel? channel-put-evt? bytes? bytes>? "\
"bytes=? bytes<? bytes-no-nuls? bytes-environment-variable-name? "\
"bytes-converter? byte? byte-regexp? byte-ready? byte-pregexp? "\
"break-parameterization? box? bound-identifier=? boolean? boolean=? "\
"blame? blame-swapped? blame-original? blame-missing-party? "\
"bitwise-bit-set? base->? arrow-contract-info? arity=? arity-includes? "\
"arity-at-least? absolute-path?", predicates);
non_word_chars="[\\s\\(\\)\\[\\]\\{\\};\\|]";
normal_identifiers="-!$%&\\*\\+\\./:<=>\\?\\^_~a-zA-Z0-9";
identifier_chars="[" normal_identifiers "][" normal_identifiers ",#]*";
}
function add_highlighter(regex, highlight) {
printf("add-highlighter shared/racket/code/ regex \"%s\" %s\n", regex, highlight);
}
function quoted_join(words, quoted, first) {
first=1
for (i in words) {
if (!first) { quoted=quoted "|"; }
quoted=quoted "\\Q" words[i] "\\E";
first=0;
}
return quoted;
}
function add_word_highlighter(words, face, regex) {
regex = non_word_chars "+(" quoted_join(words) ")" non_word_chars;
add_highlighter(regex, "1:" face);
}
function print_words(words) {
for (i in words) { printf(" %s", words[i]); }
}
BEGIN {
printf("declare-option str-list racket_static_words ");
print_words(operators);
print_words(keywords);
print_words(builtins_one);
print_words(builtins_two);
print_words(builtins_three);
print_words(builtins_four);
print_words(builtins_five);
print_words(builtins_six);
print_words(predicates);
printf("\n");
add_word_highlighter(operators, "operator");
add_word_highlighter(keywords, "keyword");
add_word_highlighter(builtins_one, "meta");
add_word_highlighter(builtins_two, "meta");
add_word_highlighter(builtins_three, "meta");
add_word_highlighter(builtins_four, "meta");
add_word_highlighter(builtins_five, "meta");
add_word_highlighter(builtins_six, "meta");
add_word_highlighter(predicates, "value");
add_highlighter(non_word_chars "+('" identifier_chars ")", "1:attribute");
add_highlighter("\\(define\\W+\\((" identifier_chars ")", "1:attribute");
add_highlighter("\\(define\\W+(" identifier_chars ")\\W+\\(lambda", "1:attribute");
}
EOF
}
# --------------------------------------------------------------------------------------------------- #
§

16
home/kakoune/source-pwd Executable file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env fish
if test (pwd) = "/home/natsukagami/.config/kak"
exit 0
end
while true
set kakrc (pwd)/.kakrc
if test -f $kakrc
echo source $kakrc
end
if test (pwd) = "/"
exit 0
end
cd ..
end

32
home/mac-home.nix Normal file
View file

@ -0,0 +1,32 @@
{ config, pkgs, ... }:
{
imports = [ ./common.nix ];
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "nki";
home.homeDirectory = "/Users/nki";
# Additional packages to be used only on this MacBook.
home.packages = with pkgs; [
anki-bin
];
# Additional settings for programs
programs.fish.shellAliases = {
};
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "21.11";
}

36
home/macbook-home.nix Normal file
View file

@ -0,0 +1,36 @@
{ config, pkgs, nixpkgs-unstable, ... }:
let
x86pkgs = import nixpkgs-unstable { system = pkgs.system; config.allowUnsupportedSystem = true; };
in
{
imports = [ ./common.nix ];
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "nki";
home.homeDirectory = "/Users/nki";
# Additional packages to be used only on this MacBook.
home.packages = with pkgs; [
x86pkgs.anki-bin
];
# Additional settings for programs
programs.fish.shellAliases = {
brew64 = "arch -x86_64 /usr/local/bin/brew";
};
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "21.11";
}

17
home/osu.nix Normal file
View file

@ -0,0 +1,17 @@
{ pkgs, config, lib, ... }:
let
pkgsUnstableOsu = import "/home/nki/nixpkgs/osu-lazer" {};
# osu = pkgs.osu-lazer.overrideAttrs (oldAttrs : rec {
# version = "2021.1006.1";
# src = pkgs.fetchFromGitHub {
# owner = "ppy";
# repo = "osu";
# rev = version;
# sha256 = "11qwrsp9kfxgz7dvh56mbgkry252ic3l5mgx3hwchrwzll71f0yd";
# };
# });
in
{
home.packages = [ pkgsUnstableOsu.osu-lazer ];
}