aboutsummaryrefslogtreecommitdiff
path: root/user/kakoune/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'user/kakoune/default.nix')
-rw-r--r--user/kakoune/default.nix60
1 files changed, 60 insertions, 0 deletions
diff --git a/user/kakoune/default.nix b/user/kakoune/default.nix
new file mode 100644
index 0000000..8ccad3e
--- /dev/null
+++ b/user/kakoune/default.nix
@@ -0,0 +1,60 @@
+{ config, pkgs, ... }:
+{
+ programs.kakoune = {
+ enable = true;
+ colorSchemePackage = pkgs.kakounePlugins.kakoune-catppuccin;
+ config = {
+ colorScheme = "catppuccin_mocha";
+ hooks = [
+ {
+ commands = "set window indentwidth 2";
+ group = "indentwidth";
+ name = "WinSetOption";
+ option = "filetype=(nix)";
+ }
+ {
+ commands = "lsp-enable-window";
+ name = "WinSetOption";
+ option = "filetype=(javascript|kotlin|typescript|zig)";
+ }
+ {
+ commands = ''
+ set-option buffer lsp_servers %{
+ [kotlin-language-server]
+ root_globs = ["build.gradle.kts"]
+ }
+ '';
+ name = "BufSetOption";
+ option = "filetype=kotlin";
+ }
+ ];
+
+ keyMappings = [
+ {
+ docstring = "Opens a new editor window";
+ effect = ":new<ret>";
+ key = "<c-w>";
+ mode = "normal";
+ }
+ ];
+
+ numberLines = {
+ enable = true;
+ highlightCursor = true;
+ };
+
+ ui = {
+ assistant = "cat";
+ setTitle = true;
+ };
+ };
+
+ defaultEditor = true;
+ extraConfig = builtins.readFile ./kakrc;
+ plugins = with pkgs.kakounePlugins; [
+ auto-pairs-kak
+ kakoune-extra-filetypes
+ kakoune-lsp
+ ];
+ };
+}