Skip to content

Commit

Permalink
chore(nu): cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed Aug 1, 2024
1 parent 1b56e44 commit aa827b2
Show file tree
Hide file tree
Showing 4 changed files with 317 additions and 321 deletions.
14 changes: 7 additions & 7 deletions home/apps/nu.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,18 @@ in

extraConfig =
''
$env.config = ($env.config? | default {})
$env.config.hooks = ($env.config.hooks? | default {})
$env.config = $env.config? | default {}
$env.config.hooks = $env.config.hooks? | default {}
$env.config.hooks.command_not_found = {|cmd_name|
try { ${command-not-found} $cmd_name }
}
source ${nu_scripts}/aliases/git/git-aliases.nu
source ${./nu/keybindings.nu}
''
+ shellAliases
+ "\n"
+ mkCompletions completions;
+ lib.concatStringsSep "\n" [
shellAliases
(mkCompletions completions)
];
};

xdg.configFile."nushell/config".source = ./nu/config;
}
8 changes: 2 additions & 6 deletions home/apps/nu/config.nu
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use ($nu.default-config-dir | path join 'config/keybindings.nu')

# use prompt indicators from starship
$env.PROMPT_INDICATOR = ""
$env.PROMPT_INDICATOR_VI_INSERT = ""
Expand Down Expand Up @@ -191,7 +189,7 @@ $env.config = {
# true or false to enable or disable right prompt to be rendered on last line of the prompt.
render_right_prompt_on_last_line: false
# enables keyboard enhancement protocol implemented by kitty console, only if your terminal support this.
use_kitty_protocol: $in_supported_termprogram,
use_kitty_protocol: (($env.TERM_PROGRAM? == "WezTerm") or ($env.TERM? == "xterm-kitty"))
# true enables highlighting of external commands in the repl resolved by which.
highlight_resolved_externals: false
# the maximum number of times nushell allows recursion before stopping it
Expand All @@ -200,7 +198,7 @@ $env.config = {
hooks: {
env_change: {
PWD: [
{if (".git" | path exists) {
{if ((".git" | path exists) and not (which onefetch | is-empty)) {
onefetch --no-merges --no-bots --no-color-palette --true-color=never --text-colors 1 1 3 4 4
}}
]
Expand All @@ -210,6 +208,4 @@ $env.config = {
# return an error message when a command is not found
command_not_found: { null }
}

keybindings: (keybindings)
}
308 changes: 0 additions & 308 deletions home/apps/nu/config/keybindings.nu

This file was deleted.

Loading

0 comments on commit aa827b2

Please sign in to comment.