feat: add nushell

This commit is contained in:
Michael Mandl 2023-12-11 20:04:42 +01:00
parent 36d1bb4252
commit cdcebfde46
Signed by: mandlm
GPG key ID: 4AA25D647AA54CC7
5 changed files with 40 additions and 1 deletions

View file

@ -5,6 +5,7 @@
direnv = {
enable = true;
enableZshIntegration = true;
enableNushellIntegration = true;
nix-direnv.enable = true;
};
};

View file

@ -86,6 +86,7 @@ local servers = {
},
},
["marksman"] = {},
["nushell"] = {},
["pylsp"] = {
pylsp = {
plugins = {

36
home-manager/nushell.nix Normal file
View file

@ -0,0 +1,36 @@
{ config, lib, pkgs, user, theme, ... }:
{
programs.nushell = {
enable = true;
extraConfig = ''
let carapace_completer = {|spans|
carapace $spans.0 nushell $spans | from json
}
$env.config = {
show_banner: false,
edit_mode: vi
shell_integration: true
use_kitty_protocol: true
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" # prefix or fuzzy
external: {
# set to false to prevent nushell looking into $env.PATH to find more suggestions
enable: true
# set to lower can improve completion performance at the cost of omitting some options
max_results: 100
completer: $carapace_completer # check 'carapace_completer'
}
}
}
$env.PATH = ($env.PATH |
split row (char esep) |
prepend /home/myuser/.apps |
append /usr/bin/env
)
'';
};
}