mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-14 10:23:45 +01:00
68 lines
1.5 KiB
Text
68 lines
1.5 KiB
Text
let completer = {|spans|
|
|
fish --command $'complete "--do-complete=($spans | str join " ")"'
|
|
| $"value(char tab)description(char newline)" + $in
|
|
| from tsv --flexible --no-infer
|
|
| each { |comp|
|
|
let escaped = $comp.value | str replace --all '"' '\"'
|
|
{
|
|
value: (if ($escaped | str contains " ") { $'"($escaped)"' } else { $escaped })
|
|
description: $comp.description
|
|
}
|
|
}
|
|
}
|
|
|
|
$env.config = {
|
|
show_banner: false
|
|
|
|
table: {
|
|
mode: reinforced
|
|
padding: { left: 0, right: 0 }
|
|
header_on_separator: true
|
|
}
|
|
|
|
completions: {
|
|
algorithm: "fuzzy"
|
|
external: (if (which fish | is-not-empty) { {
|
|
enable: true
|
|
completer: $completer
|
|
} } else { {} })
|
|
}
|
|
|
|
cursor_shape: {
|
|
vi_insert: line
|
|
vi_normal: block
|
|
}
|
|
|
|
edit_mode: vi
|
|
use_kitty_protocol: true
|
|
highlight_resolved_externals: true
|
|
|
|
history: {
|
|
file_format: "sqlite"
|
|
isolation: true
|
|
}
|
|
|
|
keybindings: [
|
|
{
|
|
name: new_line_shift
|
|
modifier: shift
|
|
keycode: enter
|
|
mode: vi_insert
|
|
event: { edit: insertnewline }
|
|
},
|
|
]
|
|
}
|
|
|
|
<!
|
|
local prefix = ".config/nushell/conf.d/"
|
|
local dropins = {}
|
|
for f in cg.fileIter() do
|
|
if f.path:find(prefix, 1, true) == 1 then
|
|
table.insert(dropins, f.path:sub(#prefix))
|
|
end
|
|
end
|
|
table.sort(dropins, function(a, b) return a < b end)
|
|
!>
|
|
<! for _, d in ipairs(dropins) do !>
|
|
source conf.d<% d %>
|
|
<! end !>
|