changes
Signed-off-by: Bloxx12 <charlie@charlieroot.dev> Change-Id: I6a6a696407aaf040f34e2ef257545f441b621c99
This commit is contained in:
parent
467155afc6
commit
d276dea712
9 changed files with 107 additions and 210 deletions
|
@ -14,8 +14,8 @@
|
|||
gdb,
|
||||
kdePackages,
|
||||
lib,
|
||||
nil,
|
||||
ruff,
|
||||
nixVersions,
|
||||
rustPlatform,
|
||||
shfmt,
|
||||
typescript-language-server,
|
||||
|
@ -30,24 +30,18 @@ let
|
|||
|
||||
nixfmt = callPackage "${sources.nixfmt}/default.nix" { };
|
||||
|
||||
# a newer nil version, for pipes support.
|
||||
new-nil = nil.overrideAttrs (_: {
|
||||
version = "unstable-18-07-2025";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "oxalica";
|
||||
repo = "nil";
|
||||
rev = "524ae2d67dd84d99a10f409ed6cd8e4e7b3cae3f";
|
||||
hash = "sha256-Uy2qzd+fMoBcp4NPSO7DavEC1pGMegmAqoEMvmXbIQU=";
|
||||
nil = rustPlatform.buildRustPackage {
|
||||
pname = "nil";
|
||||
version = "unstable";
|
||||
src = sources.nil;
|
||||
cargoLock = {
|
||||
lockFile = "${sources.nil}/Cargo.lock";
|
||||
allowBuiltinFetchGit = false;
|
||||
};
|
||||
nativeBuildInputs = [ nixVersions.latest ];
|
||||
|
||||
doInstallCheck = false;
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit (new-nil) src;
|
||||
hash = "sha256-Sljr3ff8hl/qm/0wqc1GXsEr1wWn7NAXmdrd5wHzUX8=";
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
new-deadnix = deadnix.overrideAttrs (
|
||||
finalAttrs: previousAttrs: {
|
||||
|
@ -65,6 +59,7 @@ let
|
|||
inherit (new-deadnix) src;
|
||||
hash = "sha256-O8yhqyPflOvQXAA19k1XpbrHysgV5VNWLBX0l5Q5GkM=";
|
||||
};
|
||||
meta.mainProgram = "nil";
|
||||
}
|
||||
);
|
||||
helix-languages = {
|
||||
|
@ -274,7 +269,7 @@ let
|
|||
};
|
||||
|
||||
nil = {
|
||||
command = getExe new-nil;
|
||||
command = getExe nil;
|
||||
config.nil = {
|
||||
formatting.command = [ "${getExe nixfmt}" ];
|
||||
diagnostics = {
|
||||
|
|
|
@ -107,28 +107,54 @@ $env.config.hooks = {
|
|||
}
|
||||
}
|
||||
|
||||
$env.config.menus = [
|
||||
let menus = [
|
||||
{
|
||||
marker: $"(ansi yellow)╋ "
|
||||
name: help_menu
|
||||
only_buffer_difference: true
|
||||
style: {
|
||||
description_text: yellow
|
||||
selected_text: red_reverse
|
||||
text: yellow
|
||||
}
|
||||
name: completion_menu
|
||||
only_buffer_difference: false
|
||||
marker: "(ansi yellow)╋ "
|
||||
type: {
|
||||
col_padding: 2
|
||||
col_width: 20
|
||||
columns: 4
|
||||
description_rows: 10
|
||||
layout: description
|
||||
selection_rows: 4
|
||||
layout: ide
|
||||
min_completion_width: 0
|
||||
max_completion_width: 150
|
||||
max_completion_height: 25
|
||||
padding: 0
|
||||
border: false
|
||||
cursor_offset: 0
|
||||
description_mode: "prefer_right"
|
||||
min_description_width: 0
|
||||
max_description_width: 50
|
||||
max_description_height: 10
|
||||
description_offset: 1
|
||||
correct_cursor_pos: true
|
||||
}
|
||||
style: {
|
||||
text: white
|
||||
selected_text: white_reverse
|
||||
description_text: yellow
|
||||
match_text: { attr: u }
|
||||
selected_match_text: { attr: ur }
|
||||
}
|
||||
}
|
||||
{
|
||||
name: history_menu
|
||||
only_buffer_difference: true
|
||||
marker: $env.PROMPT_INDICATOR
|
||||
type: {
|
||||
layout: list
|
||||
page_size: 10
|
||||
}
|
||||
style: {
|
||||
text: white
|
||||
selected_text: white_reverse
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
$env.config.keybindings = [
|
||||
$env.config.menus = $env.config.menus
|
||||
| where name not-in ($menus | get name)
|
||||
| append $menus
|
||||
|
||||
$env.config.keybindings ++= [
|
||||
{
|
||||
name: copy_commandline
|
||||
modifier: alt
|
||||
|
@ -139,158 +165,6 @@ $env.config.keybindings = [
|
|||
cmd: 'commandline | nu-highlight | $"```ansi\n($in)\n```" | wl-copy $in'
|
||||
}
|
||||
}
|
||||
{
|
||||
name: escape
|
||||
modifier: none
|
||||
keycode: escape
|
||||
mode: [vi_normal vi_insert]
|
||||
event: {send: esc}
|
||||
}
|
||||
{
|
||||
name: cancel_command
|
||||
modifier: control
|
||||
keycode: char_c
|
||||
mode: [vi_normal vi_insert]
|
||||
event: {send: ctrlc}
|
||||
}
|
||||
{
|
||||
name: quit_shell
|
||||
modifier: control
|
||||
keycode: char_d
|
||||
mode: [vi_normal vi_insert]
|
||||
event: {send: ctrld}
|
||||
}
|
||||
{
|
||||
name: clear_screen
|
||||
modifier: control
|
||||
keycode: char_l
|
||||
mode: [vi_normal vi_insert]
|
||||
event: {send: clearscreen}
|
||||
}
|
||||
{
|
||||
name: open_command_editor
|
||||
modifier: control
|
||||
keycode: char_o
|
||||
mode: [vi_normal vi_insert]
|
||||
event: {send: openeditor}
|
||||
}
|
||||
{
|
||||
name: abbr
|
||||
modifier: control
|
||||
keycode: space
|
||||
mode: [vi_normal vi_insert]
|
||||
event: [
|
||||
{send: menu name: abbr_menu}
|
||||
{edit: insertchar value: " "}
|
||||
]
|
||||
}
|
||||
{
|
||||
name: move_down
|
||||
modifier: none
|
||||
keycode: down
|
||||
mode: [vi_normal vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: menudown}
|
||||
{send: down}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_left
|
||||
modifier: none
|
||||
keycode: left
|
||||
mode: [vi_normal vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: menuleft}
|
||||
{send: left}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_right_or_take_history_hint
|
||||
modifier: none
|
||||
keycode: right
|
||||
mode: [vi_normal vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintcomplete}
|
||||
{send: menuright}
|
||||
{send: right}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_one_word_left
|
||||
modifier: control
|
||||
keycode: left
|
||||
mode: [vi_normal vi_insert]
|
||||
event: {edit: movewordleft}
|
||||
}
|
||||
{
|
||||
name: move_one_word_right_or_take_history_hint
|
||||
modifier: control
|
||||
keycode: right
|
||||
mode: [vi_normal vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintwordcomplete}
|
||||
{edit: movewordright}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: move_to_line_start
|
||||
modifier: control
|
||||
keycode: char_a
|
||||
mode: [vi_normal vi_insert]
|
||||
event: {edit: movetolinestart}
|
||||
}
|
||||
{
|
||||
name: move_to_line_end_or_take_history_hint
|
||||
modifier: control
|
||||
keycode: char_e
|
||||
mode: [vi_normal vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintcomplete}
|
||||
{edit: movetolineend}
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
name: delete_one_character_backward
|
||||
modifier: none
|
||||
keycode: backspace
|
||||
mode: vi_insert
|
||||
event: {edit: backspace}
|
||||
}
|
||||
{
|
||||
name: delete_one_word_backward
|
||||
modifier: control
|
||||
keycode: backspace
|
||||
mode: vi_insert
|
||||
event: {edit: backspaceword}
|
||||
}
|
||||
{
|
||||
name: newline_or_run_command
|
||||
modifier: none
|
||||
keycode: enter
|
||||
mode: vi_insert
|
||||
event: {send: enter}
|
||||
}
|
||||
{
|
||||
name: take_history_hint
|
||||
modifier: control
|
||||
keycode: char_f
|
||||
mode: [vi_normal vi_insert]
|
||||
event: {
|
||||
until: [
|
||||
{send: historyhintcomplete}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
let env_vars_file = '/tmp/nushell-env-vars'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue