aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoload/+init.kak11
-rw-r--r--autoload/build.kak12
l---------autoload/plugins2
-rw-r--r--autoload/snippets/nix.kak26
l---------autoload/standard-library2
5 files changed, 35 insertions, 18 deletions
diff --git a/autoload/+init.kak b/autoload/+init.kak
index 6f5f607..7f0f2f8 100644
--- a/autoload/+init.kak
+++ b/autoload/+init.kak
@@ -9,15 +9,10 @@ nop %sh{
# Disable indent trimming
set-option global disabled_hooks .*-trim-indent
-eval %sh{kak-tree-sitter -dksvv --init "${kak_session}" --with-highlighting --with-text-objects}
+# Disabled treesitter because eh
+# eval %sh{kak-tree-sitter -dksvv --init "${kak_session}" --with-highlighting --with-text-objects}
eval %sh{kcr init kakoune}
-# hook global BufCreate .*[.]tsx %{
-# set-option buffer filetype tsx
-# set-option buffer tree_sitter_lang tsx
-# set-option buffer lsp_language_id typescriptreact
-# }
-
colorscheme phenax
set-option global autoreload yes
set-option global incsearch true
@@ -87,7 +82,7 @@ map global system o ':info %opt{}<left>' -docstring 'Print opt'
map global system v ':info %val{}<left>' -docstring 'Print value'
map global system d ': buffer *debug*<ret>' -docstring 'Switch to debug buffer'
map global system f ':set buffer filetype ' -docstring 'Set filetype'
-map global system M ':set buffer makecmd ""<left>' -docstring 'Set compile command'
+map global system M ':set global makecmd ""<left>' -docstring 'Set global compile command'
map global system m ': make<ret>' -docstring 'Compile'
map global system p ': info %sh{ realpath -s --relative-to="$PWD" "$kak_buffile" }<ret>' -docstring 'Print relative file path'
map global system P ': info %val{buffile}<ret>' -docstring 'Print absolute file path'
diff --git a/autoload/build.kak b/autoload/build.kak
index 903ce47..d8a676c 100644
--- a/autoload/build.kak
+++ b/autoload/build.kak
@@ -1,14 +1,10 @@
set-option global makecmd 'echo "Build command not set"; exit 1'
-# TODO: For some reason <ret> doesnt jump to error
-hook global BufSetOption filetype=(?:typescript|javascript|jsx|tsx) %{
- set-option buffer makecmd "%val{config}/scripts/tsc-vimgrep.sh"
-}
-
-hook global BufSetOption filetype=haskell %{ set-option buffer makecmd "cabal build" }
-
-hook global BufSetOption filetype=rust %{ set-option buffer makecmd "cargo build" }
+define-command makecmd-set-tsc %{ set-option buffer makecmd "%val{config}/scripts/tsc-vimgrep.sh" }
+define-command makecmd-set-cabal %{ set-option buffer makecmd "cabal build" }
+define-command makecmd-set-cargo %{ set-option buffer makecmd "cargo build" }
+# Overriding the make command
provide-module make-override %{
define-command -params .. -override -docstring %{
make [<arguments>]: make utility wrapper
diff --git a/autoload/plugins b/autoload/plugins
index b98db44..9f85c06 120000
--- a/autoload/plugins
+++ b/autoload/plugins
@@ -1 +1 @@
-/nix/store/fp4j8a28ynxjbhl2pjvyxkh6c48c81bq-kakoune-2025.06.03/share/kak/autoload/plugins \ No newline at end of file
+/nix/store/v9k0893wwnagjmj0hn9rs5r57v14p7d8-kakoune-2026.04.12/share/kak/autoload/plugins \ No newline at end of file
diff --git a/autoload/snippets/nix.kak b/autoload/snippets/nix.kak
new file mode 100644
index 0000000..84c637d
--- /dev/null
+++ b/autoload/snippets/nix.kak
@@ -0,0 +1,26 @@
+hook global BufSetOption filetype=(?:nix) %{
+ define-snippet buffer snip-flake-mkderivation
+ define-snippet buffer snip-flake-mkshell
+}
+
+define-command snip-flake-mkderivation %{
+ prompt 'pname: ' %{
+ set-register c %val{text}
+ execute-keys '<esc>,istdenv.mkDerivation {<ret>'
+ execute-keys ' pname = "<c-r>c";<ret>'
+ execute-keys ' version = "0.0.0";<ret>'
+ execute-keys ' src = fetchGithub {<ret>'
+ execute-keys ' owner = "owner";<ret>'
+ execute-keys ' repo = "repo";<ret>'
+ execute-keys ' rev = "master";<ret>'
+ execute-keys ' hash = lib.fakeHash;<ret>'
+ execute-keys ' };<ret>'
+ execute-keys '}'
+ }
+}
+
+define-command snip-flake-mkshell %{
+ execute-keys '<esc>,ipkgs.mkShell {<ret>'
+ execute-keys ' buildInputs = with pkgs; [];<ret>'
+ execute-keys '}'
+}
diff --git a/autoload/standard-library b/autoload/standard-library
index f3c10ee..d72ca43 120000
--- a/autoload/standard-library
+++ b/autoload/standard-library
@@ -1 +1 @@
-/nix/store/fp4j8a28ynxjbhl2pjvyxkh6c48c81bq-kakoune-2025.06.03/share/kak/rc \ No newline at end of file
+/nix/store/v9k0893wwnagjmj0hn9rs5r57v14p7d8-kakoune-2026.04.12/share/kak/rc \ No newline at end of file