nu: use carapace for completion (if found), add nocaps alias

This commit is contained in:
Łukasz Pankowski 2024-02-09 21:55:28 +01:00
parent 2cb9042040
commit 71355aa027

View File

@ -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