diff --git a/shell/.config/nushell/config.nu b/shell/.config/nushell/config.nu index 6b9e731..97ddfbb 100644 --- a/shell/.config/nushell/config.nu +++ b/shell/.config/nushell/config.nu @@ -137,9 +137,11 @@ let light_theme = { } # External completer example -# let carapace_completer = {|spans| -# carapace $spans.0 nushell $spans | from json -# } +let carapace_completer = if (which carapace | is-empty) { + null +} else { + {|spans| carapace $spans.0 nushell ...$spans | from json} +} # The default config record. This is where much of your global configuration is setup. $env.config = { @@ -210,7 +212,7 @@ $env.config = { external: { enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up may be very slow max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options - completer: null # check 'carapace_completer' above as an example + completer: $carapace_completer } } @@ -814,6 +816,7 @@ alias v = nvim alias tl = tmux list-sessions alias tn = tmux new -s alias ta = tmux attach -t +alias nocaps = setxkbmap pl -option ctrl:nocaps def gst [] { git status -s | detect columns -n | rename status file