mirror of
https://github.com/elwrcl/copnix.git
synced 2026-10-31 22:28:03 +03:00
hx
This commit is contained in:
4 files changed
+150
-3
No files matched your search
@@ -1,12 +1,35 @@
|
||||
{ ... }:
|
||||
{
|
||||
flake.homeModules.home-helix-keys =
|
||||
{ ... }:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
float = cmd: ":sh zellij run --floating --close-on-exit -- ${cmd}";
|
||||
floatKeep = cmd: ":sh zellij run --floating -- ${cmd}";
|
||||
pick = pkgs.writeShellApplication {
|
||||
name = "hx-pick";
|
||||
runtimeInputs = [
|
||||
pkgs.yazi
|
||||
config.programs.zellij.finalPackage
|
||||
pkgs.coreutils
|
||||
];
|
||||
text = ''
|
||||
chooser=$(mktemp -t hx-pick.XXXXXX)
|
||||
trap 'rm -f "$chooser"' EXIT
|
||||
|
||||
yazi "''${1:-.}" --chooser-file="$chooser"
|
||||
|
||||
picked=$(head -n 1 "$chooser")
|
||||
[ -n "$picked" ] || exit 0
|
||||
|
||||
zellij action toggle-floating-panes
|
||||
zellij action write-chars ":open '$picked'"
|
||||
zellij action write 13
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = [ pick ];
|
||||
|
||||
programs.helix.settings.keys = {
|
||||
normal = {
|
||||
esc = [
|
||||
@@ -18,7 +41,8 @@
|
||||
q = ":buffer-close";
|
||||
Q = ":quit";
|
||||
t = float "nu";
|
||||
e = float "yazi";
|
||||
e = float "hx-pick";
|
||||
E = float "hx-pick %{buffer_name}";
|
||||
n = ":sh zellij action new-tab";
|
||||
z = ":sh zellij action toggle-floating-panes";
|
||||
|
||||
@@ -47,6 +71,15 @@
|
||||
c = ":toggle cursorline";
|
||||
f = ":toggle auto-format";
|
||||
};
|
||||
|
||||
# language server
|
||||
l = {
|
||||
r = ":lsp-restart";
|
||||
s = ":lsp-stop";
|
||||
w = ":lsp-workspace-command";
|
||||
l = ":log-open";
|
||||
f = ":format";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -50,6 +50,10 @@
|
||||
# markdown
|
||||
marksman
|
||||
|
||||
# debug adapters (`space G`)
|
||||
lldb # lldb-dap: rust, c, c++, zig
|
||||
delve # dlv: go
|
||||
|
||||
# `editor.shell` path
|
||||
nushell
|
||||
wl-clipboard
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
preview-completion-insert = true;
|
||||
trim-trailing-whitespace = true;
|
||||
trim-final-newlines = true;
|
||||
editor-config = true;
|
||||
completion-replace = true;
|
||||
end-of-line-diagnostics = "hint";
|
||||
|
||||
statusline = {
|
||||
@@ -71,6 +73,8 @@
|
||||
display-progress-messages = true;
|
||||
display-inlay-hints = true;
|
||||
auto-signature-help = true;
|
||||
inlay-hints-length-limit = 30;
|
||||
goto-reference-include-declaration = false;
|
||||
};
|
||||
|
||||
cursor-shape = {
|
||||
|
||||
Reference in new issue
Block a user