2
2
mirror of https://git.feal.no/felixalb/nixos-config.git synced 2024-12-22 04:07:28 +01:00

felixalbpc/home/zsh/neovim: Various small QoL improvements and fixes

This commit is contained in:
Felix Albrigtsen 2024-09-30 15:46:31 +02:00
parent 69949e872d
commit 56e92e70f1
4 changed files with 42 additions and 18 deletions

View File

@ -98,11 +98,14 @@ in {
" Nerdtree-settings " Nerdtree-settings
" Toggle nerdtree on Ctrl+t " Toggle nerdtree on Ctrl+t
nmap <silent> <C-t> :NERDTreeToggle<CR> nmap <silent> <C-t> :NERDTreeToggle<CR>
autocmd VimEnter * NERDTree " Autostart nerdtree on vim startup
autocmd VimEnter * wincmd p " Unselect nerdtree window
" Close vim is Nerdtree is the only buffer left " Close vim is Nerdtree is the only buffer left
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
if empty($AERC_ACCOUNT)
autocmd VimEnter * NERDTree " Autostart nerdtree on vim startup
autocmd VimEnter * wincmd p " Unselect nerdtree window
endif
" List and switch buffers on Ctrl+k " List and switch buffers on Ctrl+k
" nnoremap <C-k> :set nomore <Bar> :ls <Bar> :set more <CR>:b<Space> " nnoremap <C-k> :set nomore <Bar> :ls <Bar> :set more <CR>:b<Space>
nnoremap <silent> <C-k> !echo "Did you mean C-a?"<CR> nnoremap <silent> <C-k> !echo "Did you mean C-a?"<CR>
@ -124,9 +127,7 @@ in {
map <Leader><Space> :noh<CR> map <Leader><Space> :noh<CR>
" Start with copilot disabled " Start with copilot disabled
if exists("*Copilot") let g:copilot_enabled = 0
autocmd VimEnter * Copilot disable
endif
''; '';
}; };

View File

@ -39,23 +39,30 @@
zstyle ':completion:*' special-dirs true zstyle ':completion:*' special-dirs true
export PATH="$HOME/.config/emacs/bin:$PATH" export PATH="$HOME/.config/emacs/bin:$PATH"
unalias "gs" unalias "gs"
if [ -f ~/.config/zsh-extras ]; then
source ~/.config/zsh-extras
fi
''; '';
shellAliases = { shellAliases = {
l = "exa -l";
c = "z"; c = "z";
tree = "exa --tree --icons"; em = "emacsclient -c";
emnw = "emacsclient -nw";
grep = "grep --color=auto";
l = "exa -l";
ls = "ls --color=auto";
nd = "nix develop --command zsh";
s = "nix-shell --run zsh"; s = "nix-shell --run zsh";
sp = "nix-shell --run zsh -p"; sp = "nix-shell --run zsh -p";
spu = "nix-shell -I nixpkgs=channel:nixos-unstable --run zsh -p"; spu = "nix-shell -I nixpkgs=channel:nixos-unstable --run zsh -p";
nd = "nix develop --command zsh"; tree = "exa --tree --icons";
em = "emacsclient -c";
emnw = "emacsclient -nw";
gst = "git status -sb";
gcm = "git commit -m";
gps = "git push";
gpl = "git pull";
"git clone git clone" = "git clone"; "git clone git clone" = "git clone";
gcm = "git commit -m";
gpl = "git pull";
gps = "git push";
gst = "git status -sb";
}; };
}; };

View File

@ -97,5 +97,6 @@
}; };
location.provider = "geoclue2"; location.provider = "geoclue2";
security.polkit.enable = true; security.polkit.enable = true;
services.dbus.packages = [ pkgs.gcr ];
services.openssh.settings.X11Forwarding = true; services.openssh.settings.X11Forwarding = true;
} }

View File

@ -1,5 +1,7 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
{ let
emailAddress = "felix.albrigtsen@ntnu.no";
in {
imports = [ imports = [
./../../home/base.nix ./../../home/base.nix
./../../home/alacritty.nix ./../../home/alacritty.nix
@ -11,6 +13,7 @@
dante dante
dig dig
element-desktop element-desktop
gnome.gnome-keyring
hunspellDicts.en_US hunspellDicts.en_US
hunspellDicts.nb_NO hunspellDicts.nb_NO
jq jq
@ -22,8 +25,9 @@
openssl openssl
openstackclient openstackclient
pwgen pwgen
traceroute rofi-rbw-x11
tlclient tlclient
traceroute
w3m w3m
(python311.withPackages (ps: with ps; [ (python311.withPackages (ps: with ps; [
@ -35,10 +39,21 @@
]; ];
programs = { programs = {
aerc.enable = true; aerc = {
enable = true;
package = pkgs.unstable.aerc;
};
alacritty.enable = true; alacritty.enable = true;
firefox.enable = true; firefox.enable = true;
git.extraConfig.user.email = "felix.albrigtsen@ntnu.no"; git.extraConfig.user.email = emailAddress;
rbw = {
enable = true;
settings = {
base_url = "https://bitwarden.it.ntnu.no";
email = emailAddress;
pinentry = pkgs.pinentry-gnome3;
};
};
rofi = { rofi = {
enable = true; enable = true;
theme = "iggy"; theme = "iggy";