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" "jitsi-meet"
"knockknock" "knockknock"
"lulu" "lulu"
"mullvadvpn" # "mullvadvpn"
"origin" "origin"
"rectangle" "rectangle"
"signal" "signal"
"steam" "steam"
"transmission" "transmission"
"twitch" # "twitch"
"utm" # "utm"
"zoom" # "zoom"
]; ];
# Configuration related to casks # Configuration related to casks

View File

@ -163,7 +163,24 @@
"luar-src": "luar-src", "luar-src": "luar-src",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-master": "nixpkgs-master", "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": { "utils": {

View File

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

View File

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

View File

@ -1,16 +1,55 @@
{ pkgs, ... }: { { pkgs, ... }: {
home.packages = [ pkgs.kak-lsp ];
programs.kakoune = { programs.kakoune = {
enable = true; enable = true;
config = { config = {
numberLines = { autoReload = "yes";
enable = true;
highlightCursor = true; colorScheme = "tokyonight";
relative = true;
}; keyMappings = [
ui = { {
enableMouse = true; 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; [ plugins = with pkgs.kakounePlugins; [
active-window-kak active-window-kak
auto-pairs-kak auto-pairs-kak
@ -19,9 +58,11 @@
kakboard kakboard
kakoune-state-save kakoune-state-save
kakoune-vertical-selection kakoune-vertical-selection
powerline-kak
pkgs.tokyonight-kak
# needs luar # needs luar
pkgs.luar # pkgs.luar
tabs-kak # tabs-kak
]; ];
}; };
} }

View File

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