kitty and neovim

This commit is contained in:
Schrottkatze 2022-09-01 21:23:12 +02:00
parent a9bd549741
commit 44a85ad4fb
5 changed files with 122 additions and 3 deletions

View file

@ -94,7 +94,7 @@ with builtins;
# missing: menu-qalc picom-jonaburg
environment.systemPackages = with pkgs; [
neovim wget git neofetch pciutils pavucontrol font-manager zip unzip gnutar
wget git neofetch pciutils pavucontrol font-manager zip unzip gnutar
iw btop xdotool xorg.xwininfo nodejs gparted networkmanagerapplet
mailspring betterdiscordctl pulseaudioFull speedtest-cli
librewolf polymc jdk8 jdk11 jdk vlc xfce.thunar xfce.tumbler

View file

@ -3,5 +3,6 @@
imports = [
./desktop.nix
./terminal.nix
./neovim.nix
];
}

114
modules/neovim.nix Normal file
View file

@ -0,0 +1,114 @@
{ config, lib, pkgs, ... }:
let cfg = config.jade.neovim;
in with lib; {
options.jade.neovim = {
enable = mkEnableOption "Enable neovim";
};
config = mkIf cfg.enable {
home-manager.users.jade = { pkgs,... } : {
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
# Plugins {{{
plugins = with pkgs.vimPlugins; [
nerdtree-git-plugin
ctrlp-vim
vim-nerdtree-syntax-highlight
vim-devicons
vim-nix
{
plugin = gruvbox-nvim;
config = "colorscheme gruvbox";
}
{
plugin = nerdtree;
config = "nmap <C-n> :NERDTreeToggle<CR>";
}
{
plugin = nerdcommenter;
config = ''
vmap ++ <plug>NERDCommenterToggle
nmap ++ <plug>NERDCommenterToggle
'';
}
];
# }}}
# Coc {{{
#coc = {
#enable = true;
#};
# }}}
extraConfig = ''
set fdm=marker
nmap H _
vmap H _
nmap L $
vmap L $
" terminal normal mode
tnoremap <Esc> <C-\><C-n>
" j/k move virtual lines (wrapped)
noremap <silent> <expr> j (v:count == 0 ? 'gj' : 'j')
noremap <silent> <expr> k (v:count == 0 ? 'gk' : 'k')
set relativenumber
set number
set smarttab
set cindent
set tabstop=4
set shiftwidth=4
" Emacs Insert mode/command mode hotkeys {{{
" movement
inoremap <C-f> <Right>
inoremap <C-b> <Left>
inoremap <C-p> <Up>
inoremap <C-n> <Down>
cnoremap <C-f> <Right>
cnoremap <C-b> <Left>
cnoremap <C-p> <Up>
cnoremap <C-n> <Down>
inoremap <C-e> <C-o>$
inoremap <C-a> <C-o>_
cnoremap <C-e> <C-o>$
cnoremap <C-a> <C-o>_
inoremap <M-f> <C-Right>
inoremap <M-b> <C-Left>
inoremap <M-e> <C-o>)
inoremap <M-a> <C-o>(
cnoremap <M-f> <C-Right>
cnoremap <M-b> <C-Left>
cnoremap <M-e> <C-o>)
cnoremap <M-a> <C-o>(
inoremap <M-<> <Esc>ggi
inoremap <M->> <Esc>Gi
cnoremap <M-<> <Esc>ggi
cnoremap <M->> <Esc>Gi
" editing
inoremap <C-d> <Del>
inoremap <M-BS> <C-o>db
inoremap <M-d> <C-o>de
cnoremap <C-d> <Del>
cnoremap <M-BS> <C-o>db
cnoremap <M-d> <C-o>de
inoremap <C-s> <C-o>/
inoremap <C-r> <C-o>?
" }}}
'';
};
};
};
}

View file

@ -14,7 +14,8 @@ in with lib; {
size = 11;
};
settings = {
adjust_column_width = "75%";
adjust_column_width = "70%";
color0 = "#282828";
color8 = "#928374";
color1 = "#cc241d";
@ -34,6 +35,8 @@ in with lib; {
foreground = "#ebdbb2";
background = "#282828";
confirm_os_window_close = 0;
};
};
};

View file

@ -22,6 +22,7 @@
desktop.enable = true;
desktop.compositing = true;
terminal.enable = true;
neovim.enable = true;
};
boot.loader.systemd-boot.enable = true;