astora: nushell with starship prompt and carapace completion

This commit is contained in:
L-Nafaryus 2024-12-16 23:10:48 +05:00
parent ee3ea2b5e4
commit 6d9f582a41
Signed by: L-Nafaryus
GPG Key ID: 553C97999B363D38

View File

@ -116,6 +116,7 @@ in {
kdePackages.kmail
kdePackages.kmail-account-wizard
kdePackages.krdc
flacon
picard
@ -148,6 +149,73 @@ in {
accent = "green";
};
programs = {
nushell = {
enable = true;
# The config.nu can be anywhere you want if you like to edit your Nushell with Nu
#configFile.source = ./.../config.nu;
# for editing directly to config.nu
extraConfig = ''
let carapace_completer = {|spans|
carapace $spans.0 nushell $spans | from json
}
$env.config = {
show_banner: false,
completions: {
case_sensitive: false # case-sensitive completions
quick: true # set to false to prevent auto-selecting completions
partial: true # set to false to prevent partial filling of the prompt
algorithm: "fuzzy"
external: {
enable: true
max_results: 100
completer: $carapace_completer
}
}
}
'';
};
carapace = {
enable = true;
enableNushellIntegration = true;
enableBashIntegration = true;
};
starship = {
enable = true;
enableNushellIntegration = true;
enableBashIntegration = true;
settings = {
add_newline = true;
format = ''
$all $fill $time
$character
'';
fill = {
symbol = " ";
};
line_break = {
disabled = true;
};
directory = {
truncate_to_repo = false;
};
time = {
disabled = false;
use_12hr = true;
};
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
nix_shell = {
symbol = " ";
heuristic = true;
};
};
};
};
programs = {
# General
fish = {