dotfiles/nu/autoload/qol.nu
Gabriel Arazas 2053483224 nu: init autoload files
These might be better as part of the configuration but I find these to
be easier to setup for modular configurations.
2025-01-21 21:15:44 +08:00

35 lines
820 B
Plaintext

$env.config.menus = $env.config.menus | append [
{
name: vars_menu
only_buffer_difference: true
marker: "var "
type: {
layout: list
page_size: 10
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
source: { |buffer, position|
scope variables
| where name =~ $buffer
| sort-by name
| each { |row| {value: $row.name description: $row.type} }
}
}
]
$env.config.keybindings = $env.config.keybindings | append [
{
name: vars_menu
modifier: control
keycode: char_u
mode: [emacs vi_normal vi_insert]
event: {
send: menu name: vars_menu
}
}
]