mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
Compare commits
2 commits
7fe07dd10e
...
4891753215
| Author | SHA1 | Date | |
|---|---|---|---|
| 4891753215 | |||
| 0d871a7411 |
2 changed files with 39 additions and 25 deletions
|
|
@ -12,18 +12,21 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
autocd = true;
|
autocd = true;
|
||||||
autosuggestion.enable = true;
|
autosuggestion.enable = true;
|
||||||
syntaxHighlighting = {
|
#syntaxHighlighting = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
highlighters = [
|
# highlighters = [
|
||||||
"main"
|
# "main"
|
||||||
"brackets"
|
# "brackets"
|
||||||
"pattern"
|
# "pattern"
|
||||||
"regexp"
|
# "regexp"
|
||||||
"cursor"
|
# "cursor"
|
||||||
"root"
|
# "root"
|
||||||
"line"
|
# "line"
|
||||||
];
|
# ];
|
||||||
};
|
#};
|
||||||
|
|
||||||
|
defaultKeymap = "viins";
|
||||||
|
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
# enableGlobalCompInit = true; # Should be a thing according to NixOS options but is not a thing?
|
# enableGlobalCompInit = true; # Should be a thing according to NixOS options but is not a thing?
|
||||||
|
|
||||||
|
|
@ -44,6 +47,7 @@
|
||||||
SAVEHIST = 10000000;
|
SAVEHIST = 10000000;
|
||||||
HISTFILE = "~/.zsh_history";
|
HISTFILE = "~/.zsh_history";
|
||||||
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE = 1;
|
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE = 1;
|
||||||
|
KEYTIMEOUT = 1; # make Vi-mode transitions faster
|
||||||
};
|
};
|
||||||
|
|
||||||
initContent = ''
|
initContent = ''
|
||||||
|
|
@ -139,7 +143,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
# Enter a 'nix shell' with packages selected by fzf
|
# Enter a 'nix shell' with packages selected by fzf
|
||||||
source ${pkgs.nix-search-fzf.zsh-shell-widget}
|
source ${pkgs.nix-search-fzf.zsh-shell-widget}/bin/nix-search-fzf-shell-widget
|
||||||
zle -N nix-search-fzf-shell-widget
|
zle -N nix-search-fzf-shell-widget
|
||||||
bindkey '^O' nix-search-fzf-shell-widget
|
bindkey '^O' nix-search-fzf-shell-widget
|
||||||
|
|
||||||
|
|
@ -228,16 +232,16 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
plugins = with pkgs; [
|
plugins = with pkgs; [
|
||||||
#{
|
{
|
||||||
# name = "zsh-syntax-highlighting";
|
name = "zsh-syntax-highlighting";
|
||||||
# src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
# owner = "zsh-users";
|
owner = "zsh-users";
|
||||||
# repo = "zsh-syntax-highlighting";
|
repo = "zsh-syntax-highlighting";
|
||||||
# rev = "0.6.0";
|
rev = "0.6.0";
|
||||||
# sha256 = "0zmq66dzasmr5pwribyh4kbkk23jxbpdw4rjxx0i7dx8jjp2lzl4";
|
sha256 = "0zmq66dzasmr5pwribyh4kbkk23jxbpdw4rjxx0i7dx8jjp2lzl4";
|
||||||
# };
|
};
|
||||||
# file = "zsh-syntax-highlighting.zsh";
|
file = "zsh-syntax-highlighting.zsh";
|
||||||
#}
|
}
|
||||||
{
|
{
|
||||||
name = "zsh-autopair";
|
name = "zsh-autopair";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
|
|
@ -248,6 +252,16 @@
|
||||||
};
|
};
|
||||||
file = "autopair.zsh";
|
file = "autopair.zsh";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "zsh-vi-mode";
|
||||||
|
file = "zsh-vi-mode.plugin.zsh";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "jeffreytse";
|
||||||
|
repo = "zsh-vi-mode";
|
||||||
|
rev = "3eeca1bc6db172edee5a2ca13d9ff588b305b455";
|
||||||
|
sha256 = "0na6b5b46k4473c53mv1wkb009i6b592gxpjq94bdnlz1kkcqwg6";
|
||||||
|
};
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
coreutils,
|
coreutils,
|
||||||
bash,
|
bash,
|
||||||
nix-search-fzf,
|
nix-search-fzf,
|
||||||
writeShellScript,
|
writeShellScriptBin,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
@ -28,7 +28,7 @@ createScript "nix-search-fzf" src {
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enter a 'nix shell' with packages selected by this script
|
# Enter a 'nix shell' with packages selected by this script
|
||||||
passthru.zsh-shell-widget = writeShellScript "nix-search-fzf-shell-widget" ''
|
passthru.zsh-shell-widget = writeShellScriptBin "nix-search-fzf-shell-widget" ''
|
||||||
nix-search-fzf-shell-widget() {
|
nix-search-fzf-shell-widget() {
|
||||||
setopt localoptions pipefail no_aliases 2> /dev/null
|
setopt localoptions pipefail no_aliases 2> /dev/null
|
||||||
local cmd="$(eval "${nix-search-fzf}/bin/nix-search-fzf -c")"
|
local cmd="$(eval "${nix-search-fzf}/bin/nix-search-fzf -c")"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue