mirror of
https://github.com/elwrcl/copnix.git
synced 2026-10-31 14:28:02 +03:00
nu
This commit is contained in:
10 files changed
+9
-9
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}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user