diff --git a/dotfiles/kakoune.nix b/dotfiles/kakoune.nix index 506761f..e87b6b9 100644 --- a/dotfiles/kakoune.nix +++ b/dotfiles/kakoune.nix @@ -47,6 +47,17 @@ let name = "auto-pairs.kak"; src = ../vendor/auto-pairs.kak/rc; }) + ((kakoune.mkPlugin { + name = "kakoune-idris"; + src = sources.kakoune-idris; + }).overrideAttrs (attrs: { + patches = [ + (builtins.fetchurl + "https://patch-diff.githubusercontent.com/raw/stoand/kakoune-idris/pull/8.patch") + (builtins.fetchurl + "https://patch-diff.githubusercontent.com/raw/stoand/kakoune-idris/pull/9.patch") + ]; + })) ]; colorAttrs = lib.mapAttrs (name: source: @@ -358,6 +369,16 @@ in { set-option buffer tabstop 2 set-option buffer indentwidth 2 } + + hook global WinSetOption filetype=idris %{ + expandtab + set-option buffer softtabstop 2 + set-option buffer tabstop 2 + set-option buffer indentwidth 2 + + set buffer idris_node_binary_path "${pkgs.nodejs}/bin/node" + map global user d ': enter-user-mode idris-ide' -docstring 'Idris IDE' + } ''; }; diff --git a/nix/sources.json b/nix/sources.json index e816feb..7e267ac 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -74,6 +74,18 @@ "url": "https://github.com/occivink/kakoune-find/archive/cd6efb6da4ab7460ff8d87e27a4bf134b4632244.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, + "kakoune-idris": { + "branch": "master", + "description": "Idris 2 IDE Protocol Integration for Kakoune", + "homepage": "", + "owner": "stoand", + "repo": "kakoune-idris", + "rev": "1acdfb5d89e3951ae4bdf4a5fa2377b36448083d", + "sha256": "06qny8790j9d7vjs0pfyw71xvc6hmkjl8ssi483mbwbxs0zv6j9r", + "type": "tarball", + "url": "https://github.com/stoand/kakoune-idris/archive/1acdfb5d89e3951ae4bdf4a5fa2377b36448083d.tar.gz", + "url_template": "https://github.com///archive/.tar.gz" + }, "kakoune-palette": { "branch": "master", "description": "Preview face colors in kakoune",