mirror of
https://github.com/elwrcl/copnix.git
synced 2026-10-31 14:28:02 +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 =
|
flake.homeModules.home-helix-keys =
|
||||||
{ ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
float = cmd: ":sh zellij run --floating --close-on-exit -- ${cmd}";
|
float = cmd: ":sh zellij run --floating --close-on-exit -- ${cmd}";
|
||||||
floatKeep = cmd: ":sh zellij run --floating -- ${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
|
in
|
||||||
{
|
{
|
||||||
|
home.packages = [ pick ];
|
||||||
|
|
||||||
programs.helix.settings.keys = {
|
programs.helix.settings.keys = {
|
||||||
normal = {
|
normal = {
|
||||||
esc = [
|
esc = [
|
||||||
@@ -18,7 +41,8 @@
|
|||||||
q = ":buffer-close";
|
q = ":buffer-close";
|
||||||
Q = ":quit";
|
Q = ":quit";
|
||||||
t = float "nu";
|
t = float "nu";
|
||||||
e = float "yazi";
|
e = float "hx-pick";
|
||||||
|
E = float "hx-pick %{buffer_name}";
|
||||||
n = ":sh zellij action new-tab";
|
n = ":sh zellij action new-tab";
|
||||||
z = ":sh zellij action toggle-floating-panes";
|
z = ":sh zellij action toggle-floating-panes";
|
||||||
|
|
||||||
@@ -47,6 +71,15 @@
|
|||||||
c = ":toggle cursorline";
|
c = ":toggle cursorline";
|
||||||
f = ":toggle auto-format";
|
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
|
# markdown
|
||||||
marksman
|
marksman
|
||||||
|
|
||||||
|
# debug adapters (`space G`)
|
||||||
|
lldb # lldb-dap: rust, c, c++, zig
|
||||||
|
delve # dlv: go
|
||||||
|
|
||||||
# `editor.shell` path
|
# `editor.shell` path
|
||||||
nushell
|
nushell
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
|
|||||||
@@ -38,6 +38,8 @@
|
|||||||
preview-completion-insert = true;
|
preview-completion-insert = true;
|
||||||
trim-trailing-whitespace = true;
|
trim-trailing-whitespace = true;
|
||||||
trim-final-newlines = true;
|
trim-final-newlines = true;
|
||||||
|
editor-config = true;
|
||||||
|
completion-replace = true;
|
||||||
end-of-line-diagnostics = "hint";
|
end-of-line-diagnostics = "hint";
|
||||||
|
|
||||||
statusline = {
|
statusline = {
|
||||||
@@ -71,6 +73,8 @@
|
|||||||
display-progress-messages = true;
|
display-progress-messages = true;
|
||||||
display-inlay-hints = true;
|
display-inlay-hints = true;
|
||||||
auto-signature-help = true;
|
auto-signature-help = true;
|
||||||
|
inlay-hints-length-limit = 30;
|
||||||
|
goto-reference-include-declaration = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
cursor-shape = {
|
cursor-shape = {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
fg = "fgBright";
|
fg = "fgBright";
|
||||||
modifiers = [ "bold" ];
|
modifiers = [ "bold" ];
|
||||||
};
|
};
|
||||||
"ui.window" = "bgSoft";
|
"ui.window" = "gutter";
|
||||||
"ui.cursor" = {
|
"ui.cursor" = {
|
||||||
fg = "bg";
|
fg = "bg";
|
||||||
bg = "fgSoft";
|
bg = "fgSoft";
|
||||||
@@ -193,6 +193,22 @@
|
|||||||
};
|
};
|
||||||
"markup.link.text" = "blue";
|
"markup.link.text" = "blue";
|
||||||
"markup.raw" = "green";
|
"markup.raw" = "green";
|
||||||
|
"markup.heading.marker" = "brown";
|
||||||
|
"markup.list" = "magenta";
|
||||||
|
"markup.quote" = {
|
||||||
|
fg = "fgSoft";
|
||||||
|
modifiers = [ "italic" ];
|
||||||
|
};
|
||||||
|
"markup.link" = "blue";
|
||||||
|
"markup.link.label" = "cyan";
|
||||||
|
"markup.raw.inline" = {
|
||||||
|
fg = "green";
|
||||||
|
bg = "bgAlt";
|
||||||
|
};
|
||||||
|
"markup.raw.block" = "green";
|
||||||
|
"markup.strikethrough" = {
|
||||||
|
modifiers = [ "crossed_out" ];
|
||||||
|
};
|
||||||
|
|
||||||
# diagnostics & diff
|
# diagnostics & diff
|
||||||
"diagnostic.error" = {
|
"diagnostic.error" = {
|
||||||
@@ -224,9 +240,99 @@
|
|||||||
"info" = "blue";
|
"info" = "blue";
|
||||||
"hint" = "cyan";
|
"hint" = "cyan";
|
||||||
|
|
||||||
|
"diagnostic.unnecessary" = {
|
||||||
|
modifiers = [ "dim" ];
|
||||||
|
};
|
||||||
|
"diagnostic.deprecated" = {
|
||||||
|
modifiers = [ "crossed_out" ];
|
||||||
|
};
|
||||||
|
|
||||||
"diff.plus" = "green";
|
"diff.plus" = "green";
|
||||||
"diff.minus" = "red";
|
"diff.minus" = "red";
|
||||||
"diff.delta" = "blue";
|
"diff.delta" = "blue";
|
||||||
|
"diff.plus.gutter" = "green";
|
||||||
|
"diff.minus.gutter" = "red";
|
||||||
|
"diff.delta.gutter" = "blue";
|
||||||
|
|
||||||
|
# ui — pickers, popups, jump labels
|
||||||
|
"ui.highlight" = {
|
||||||
|
bg = "bgSoft";
|
||||||
|
modifiers = [ "bold" ];
|
||||||
|
};
|
||||||
|
"ui.highlight.frameline" = {
|
||||||
|
bg = "selectPrimary";
|
||||||
|
};
|
||||||
|
"ui.menu.scroll" = {
|
||||||
|
fg = "gray";
|
||||||
|
bg = "bgAlt";
|
||||||
|
};
|
||||||
|
"ui.text.inactive" = "gray";
|
||||||
|
"ui.text.info" = "fgSoft";
|
||||||
|
"ui.text.directory" = "blue";
|
||||||
|
"ui.background.separator" = "gutter";
|
||||||
|
"ui.gutter.selected" = {
|
||||||
|
bg = "bgAlt";
|
||||||
|
};
|
||||||
|
"ui.cursorline" = {
|
||||||
|
bg = "bgAlt";
|
||||||
|
};
|
||||||
|
"ui.cursorcolumn.primary" = {
|
||||||
|
bg = "bgAlt";
|
||||||
|
};
|
||||||
|
|
||||||
|
"ui.picker.header" = {
|
||||||
|
fg = "gray";
|
||||||
|
modifiers = [ "bold" ];
|
||||||
|
};
|
||||||
|
"ui.picker.header.column" = "gray";
|
||||||
|
"ui.picker.header.column.active" = {
|
||||||
|
fg = "orange";
|
||||||
|
modifiers = [ "bold" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
"ui.virtual" = "gutter";
|
||||||
|
# `gw`/`gW` labels were rendering in the underlying token colour.
|
||||||
|
"ui.virtual.jump-label" = {
|
||||||
|
fg = "bg";
|
||||||
|
bg = "orange";
|
||||||
|
modifiers = [ "bold" ];
|
||||||
|
};
|
||||||
|
"ui.virtual.wrap" = "gutter";
|
||||||
|
"ui.virtual.inlay-hint.type" = "gray";
|
||||||
|
"ui.virtual.inlay-hint.parameter" = "gray";
|
||||||
|
|
||||||
|
# mode-aware cursors, to match `color-modes`
|
||||||
|
"ui.cursor.normal" = {
|
||||||
|
fg = "bg";
|
||||||
|
bg = "fgSoft";
|
||||||
|
};
|
||||||
|
"ui.cursor.insert" = {
|
||||||
|
fg = "bg";
|
||||||
|
bg = "green";
|
||||||
|
};
|
||||||
|
"ui.cursor.select" = {
|
||||||
|
fg = "bg";
|
||||||
|
bg = "magenta";
|
||||||
|
};
|
||||||
|
"ui.cursor.primary.normal" = {
|
||||||
|
fg = "bg";
|
||||||
|
bg = "fgBright";
|
||||||
|
};
|
||||||
|
"ui.cursor.primary.insert" = {
|
||||||
|
fg = "bg";
|
||||||
|
bg = "green";
|
||||||
|
};
|
||||||
|
"ui.cursor.primary.select" = {
|
||||||
|
fg = "bg";
|
||||||
|
bg = "magenta";
|
||||||
|
};
|
||||||
|
|
||||||
|
# dap
|
||||||
|
"ui.debug" = "orange";
|
||||||
|
"ui.debug.breakpoint" = "red";
|
||||||
|
"ui.debug.active" = "yellow";
|
||||||
|
|
||||||
|
"special" = "brown";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user