More kakoune tweaks

work
mat ess 2022-07-21 00:38:26 -04:00
parent 6cfc8b3e4a
commit 309c858862
7 changed files with 105 additions and 21 deletions

View File

@ -60,15 +60,15 @@ in
"jitsi-meet"
"knockknock"
"lulu"
"mullvadvpn"
# "mullvadvpn"
"origin"
"rectangle"
"signal"
"steam"
"transmission"
"twitch"
"utm"
"zoom"
# "twitch"
# "utm"
# "zoom"
];
# Configuration related to casks

View File

@ -163,7 +163,24 @@
"luar-src": "luar-src",
"nixpkgs": "nixpkgs",
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-unstable": "nixpkgs-unstable"
"nixpkgs-unstable": "nixpkgs-unstable",
"tokyonight-kak-src": "tokyonight-kak-src"
}
},
"tokyonight-kak-src": {
"flake": false,
"locked": {
"lastModified": 1636104069,
"narHash": "sha256-dFe1iGLDuSGlpdI4AxR613KjhIGjbvKbrK/TPrpMJ4Y=",
"owner": "HeavyRain266",
"repo": "tokyonight.kak",
"rev": "f7ebeea07818df8ee7ea8e71b4dbfd3c0afdc05b",
"type": "github"
},
"original": {
"owner": "HeavyRain266",
"repo": "tokyonight.kak",
"type": "github"
}
},
"utils": {

View File

@ -29,6 +29,11 @@
url = github:gustavo-hms/luar;
flake = false;
};
tokyonight-kak-src = {
url = github:HeavyRain266/tokyonight.kak;
flake = false;
};
};
outputs = { self, darwin, nixpkgs, home-manager, flake-utils, ... }@inputs:
@ -53,7 +58,7 @@
final.callPackage
(./. + "/pkgs/${name}.nix")
{ "${name}-src" = inputs."${name}-src"; };
pkgs = [ "dark-mode-notify" "luar" ];
pkgs = [ "dark-mode-notify" "luar" "tokyonight-kak" ];
in
genAttrs pkgs buildPkg // optionalAttrs
(prev.stdenv.system == "aarch64-darwin")

View File

@ -24,7 +24,5 @@
programs.git.delta.enable = true;
# Gitea CLI
home.packages = with pkgs; [
tea
];
home.packages = [ pkgs.tea ];
}

View File

@ -1,16 +1,55 @@
{ pkgs, ... }: {
home.packages = [ pkgs.kak-lsp ];
programs.kakoune = {
enable = true;
config = {
numberLines = {
enable = true;
highlightCursor = true;
relative = true;
};
ui = {
enableMouse = true;
};
autoReload = "yes";
colorScheme = "tokyonight";
keyMappings = [
{
key = "<c-a-p>";
effect = ": fzf-mode<ret>";
mode = "normal";
docstring = "Open fzf-mode with ctrl-alt-p";
}
{
key = "<c-p>";
effect = ": fzf-mode<ret>f<ret>";
mode = "normal";
docstring = "Open fzf-mode file dialog with ctrl-p";
}
];
hooks = [
{
name = "WinSetOption";
option = "filetype=(haskell)";
commands = ''
lsp-enable-window
'';
}
];
numberLines.enable = true;
numberLines.highlightCursor = true;
numberLines.relative = true;
scrollOff.columns = 4;
scrollOff.lines = 2;
showMatching = true;
ui.enableMouse = true;
};
extraConfig = ''
eval %sh{${pkgs.kak-lsp}/bin/kak-lsp --kakoune -s $kak_session}
powerline-start
'';
plugins = with pkgs.kakounePlugins; [
active-window-kak
auto-pairs-kak
@ -19,9 +58,11 @@
kakboard
kakoune-state-save
kakoune-vertical-selection
powerline-kak
pkgs.tokyonight-kak
# needs luar
pkgs.luar
tabs-kak
# pkgs.luar
# tabs-kak
];
};
}

View File

@ -152,13 +152,18 @@
programs.fish.shellAliases =
let
nixConfigDir = "${config.home.homeDirectory}/dotfiles.nix";
inNix = cmd: "pushd ${nixConfigDir}/; ${cmd}; popd";
in
with pkgs; {
# Nix related
drb = "pushd ${nixConfigDir}/; darwin-rebuild build --flake ${nixConfigDir}/; popd";
drs = "pushd ${nixConfigDir}/; darwin-rebuild switch --flake ${nixConfigDir}/; popd";
# drb = "pushd ${nixConfigDir}/; darwin-rebuild build --flake ${nixConfigDir}/; popd";
drb = inNix "darwin-rebuild flake --flake ${nixConfigDir}/";
# drs = "pushd ${nixConfigDir}/; darwin-rebuild switch --flake ${nixConfigDir}/; popd";
drs = inNix "darwin-rebuild switch --flake ${nixConfigDir}/";
drc = "codium ${nixConfigDir}";
drv = "vim ${nixConfigDir}";
# drk = "pushd ${nixConfigDir}/; kak ./flake.nix; popd";
drk = inNix "kak flake.nix";
flakeup = "nix flake update ${nixConfigDir}/";
nb = "nix build";
nd = "nix develop";

18
pkgs/tokyonight-kak.nix Normal file
View File

@ -0,0 +1,18 @@
{ stdenv, tokyonight-kak-src, ... }:
let
colorsPath = "share/kak/colors";
in
stdenv.mkDerivation rec {
name = "tokyonight";
src = tokyonight-kak-src;
installPhase = ''
runHook preInstall
target=$out/${colorsPath}
mkdir -p $target
cp -r colors/*.kak $target
runHook postInstall
'';
}