This commit is contained in:
elwrcl committed 2026-08-02 04:07:25 +03:00
1 parent 6960ec0663
commit 20ecde0e15
17 files changed
+556 -1

No files matched your search

@@ -0,0 +1,68 @@
{ ... }:
{
flake.homeModules.home-nushell-completions =
{ pkgs, lib, ... }:
let
inherit (lib.meta) getExe;
carapaceNu = pkgs.runCommand "carapace.nu" { } ''
${getExe pkgs.carapace} _carapace nushell > $out
'';
in
{
home.packages = [ pkgs.carapace ];
programs.nushell.environmentVariables.CARAPACE_BRIDGES = "zsh,fish,bash";
programs.nushell.extraConfig = ''
let menus = [
{
name: completion_menu
only_buffer_difference: false
marker: ($env.PROMPT_INDICATOR? | default "> ")
type: {
layout: ide
min_completion_width: 0
max_completion_width: 150
max_completion_height: 25
padding: 0
border: false
cursor_offset: 0
description_mode: "prefer_right"
min_description_width: 0
max_description_width: 50
max_description_height: 10
description_offset: 1
correct_cursor_pos: true
}
style: {
text: white
selected_text: white_reverse
description_text: yellow
match_text: { attr: u }
selected_match_text: { attr: ur }
}
}
{
name: history_menu
only_buffer_difference: true
marker: ($env.PROMPT_INDICATOR? | default "> ")
type: {
layout: list
page_size: 10
}
style: {
text: white
selected_text: white_reverse
}
}
]
$env.config.menus = $env.config.menus
| where name not-in ($menus | get name)
| append $menus
source ${carapaceNu}
'';
};
}