Adding missing plugins in my vimrc

This commit is contained in:
eeva 2017-03-19 02:12:14 +01:00
parent 745cc894e9
commit 4a14f4505b
2 changed files with 61 additions and 32 deletions

View file

@ -33,7 +33,7 @@
oh-my-zsh stow oh-my-zsh stow
lemonbar git st lemonbar git st
nethogs nethogs
(import ./vim.nix) (import ./vim.nix)
ghostscript ghostscript
pavucontrol pavucontrol
arandr arandr
@ -55,7 +55,7 @@
consoleFont = "Lat2-Terminus16"; consoleFont = "Lat2-Terminus16";
consoleKeyMap = "fr-bepo"; consoleKeyMap = "fr-bepo";
defaultLocale = "en_US.UTF-8"; defaultLocale = "en_US.UTF-8";
supportedLocales = [ supportedLocales = [
"de_DE.UTF-8/UTF-8" "de_DE.UTF-8/UTF-8"
"en_US.UTF-8/UTF-8" "en_US.UTF-8/UTF-8"
"fr_FR.UTF-8/UTF-8" "fr_FR.UTF-8/UTF-8"
@ -94,7 +94,7 @@
security = { security = {
sudo.wheelNeedsPassword = false; sudo.wheelNeedsPassword = false;
pki.certificates = [ pki.certificates = [
'' ''
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIDPTCCAiWgAwIBAgIJAMbx5WIu+oU+MA0GCSqGSIb3DQEBBQUAMDUxCzAJBgNV MIIDPTCCAiWgAwIBAgIJAMbx5WIu+oU+MA0GCSqGSIb3DQEBBQUAMDUxCzAJBgNV
@ -122,8 +122,8 @@
services = { services = {
udev.packages = with pkgs; [ crda ]; udev.packages = with pkgs; [ crda ];
peerflix = { peerflix = {
enable = true; enable = true;
stateDir = "/tmp/peerflix"; stateDir = "/tmp/peerflix";
}; };
cron.enable = false; cron.enable = false;
nixosManual.enable = false; nixosManual.enable = false;
@ -146,7 +146,7 @@
enable = true; enable = true;
permitRootLogin = "no"; permitRootLogin = "no";
passwordAuthentication = false; passwordAuthentication = false;
startWhenNeeded = true; startWhenNeeded = true;
}; };
openvpn.servers.client = { openvpn.servers.client = {
@ -239,7 +239,7 @@
sha256 = "b7b25ba01b7ae87ec201ebbb1bf82742d5979788ecc6773a356eebe7d90a9703"; sha256 = "b7b25ba01b7ae87ec201ebbb1bf82742d5979788ecc6773a356eebe7d90a9703";
} }
]; ];
}; };
}) ]; }) ];
} }

79
vim.nix
View file

@ -1,46 +1,74 @@
# Largely adapted from: https://www.mpscholten.de/nixos/2016/04/11/setting-up-vim-on-nixos.html # Largely adapted from: https://www.mpscholten.de/nixos/2016/04/11/setting-up-vim-on-nixos.html
with import <nixpkgs> {}; with import <nixpkgs> {};
vim_configurable.customize { let plugins = let inherit (vimUtils) buildVimPluginFrom2Nix; in {
"better-whitespace" = buildVimPluginFrom2Nix { # created by nix#NixDerivation
name = "better-whitespace";
src = fetchgit {
url = "git://github.com/ntpeters/vim-better-whitespace";
rev = "7729bada7ad8d341b910367da8a900490bd15e86";
sha256 = "0kkj13jjzjyv2b17sk8bka2d55czz7v6xvv0zz1i8qidvg6lbniw";
};
dependencies = [];
};
"systemd-syntax" = buildVimPluginFrom2Nix { # created by nix#NixDerivation
name = "systemd-syntax";
src = fetchgit {
url = "git://github.com/Matt-Deacalion/vim-systemd-syntax";
rev = "05bd51f87628e4b714b9d1d16259e1ead845924a";
sha256 = "04jlbm4cf47kvys22czz1i3fcqzz4zih2h6pkcfns9s8rs6clm3c";
};
dependencies = [];
};
"opencl-syntax" = buildVimPluginFrom2Nix { # created by nix#NixDerivation
name = "opencl-syntax";
src = fetchgit {
url = "git://github.com/petRUShka/vim-opencl";
rev = "a75693fdb1526cf0f2f2d1a6bdc23d6537ac1b6f";
sha256 = "0ba3kj65h2lsn7s0fazhmbaa7nr8b9ssda3i54259mcc4nhwvi7b";
};
dependencies = [];
};
}; in vim_configurable.customize {
name = "vim"; name = "vim";
vimrcConfig.vam.knownPlugins = pkgs.vimPlugins; vimrcConfig.vam.knownPlugins = pkgs.vimPlugins // plugins;
vimrcConfig.vam.pluginDictionaries = [ vimrcConfig.vam.pluginDictionaries = [
{ names = [ { names = [
"vim-nix"
"Solarized" "Solarized"
"better-whitespace"
"systemd-syntax"
"opencl-syntax"
"elm-vim"
"fugitive" "fugitive"
"surround" "surround"
"elm-vim" "vim-nix"
"vimtex" "vimtex"
#https://github.com/vim-voom/VOoM #https://github.com/vim-voom/VOoM
#https://github.com/ntpeters/vim-better-whitespace
#https://github.com/Matt-Deacalion/vim-systemd-syntax
#https://github.com/tpope/vim-obsession #https://github.com/tpope/vim-obsession
#https://github.com/petRUShka/vim-opencl
]; } ]; }
]; ];
vimrcConfig.customRC = '' vimrcConfig.customRC = ''
" Must have for vim " Must have for vim
set nocompatible set nocompatible
" Display nbsp " Display nbsp
set listchars=tab:\|\ ,nbsp:· set listchars=tab:\|\ ,nbsp:·
set list set list
" Remap ESC on ,, " Remap ESC on ,,
map ,, <ESC> map ,, <ESC>
imap ,, <ESC> imap ,, <ESC>
scriptencoding utf-8 scriptencoding utf-8
" Must be *after* pathogen " Must be *after* pathogen
filetype plugin indent on filetype plugin indent on
" Leader " Leader
let mapleader="," let mapleader=","
nnoremap <leader>a :echo("\<leader\> works! It is set to <leader>")<CR> nnoremap <leader>a :echo("\<leader\> works! It is set to <leader>")<CR>
" let maplocalleader = "-" " let maplocalleader = "-"
" Highlighting " Highlighting
syntax enable syntax enable
if has('gui_running') if has('gui_running')
@ -52,45 +80,46 @@ vim_configurable.customize {
" which colors it likes. " which colors it likes.
set background=dark set background=dark
endif endif
let g:solarized_termcolors=16 let g:solarized_termcolors=16
colorscheme solarized colorscheme solarized
" Set line numbering " Set line numbering
set number set number
" Don't wrap lines, it's ugly " Don't wrap lines, it's ugly
set nowrap set nowrap
" Deal with tabs " Deal with tabs
set softtabstop=2 set softtabstop=2
set tabstop=2 " 1 tab = 2 spaces set tabstop=2 " 1 tab = 2 spaces
set shiftwidth=2 " Indent with 2 spaces set shiftwidth=2 " Indent with 2 spaces
set expandtab " Insert spaces instead of tabs set expandtab " Insert spaces instead of tabs
" Set par as default wrapper " Set par as default wrapper
set formatprg=${par.outPath}/bin/par\ -w80 set formatprg=${par.outPath}/bin/par\ -w80
" Set mouse on " Set mouse on
set mouse=a set mouse=a
" Don't set timeout - this breaks the leader use " Don't set timeout - this breaks the leader use
set notimeout set notimeout
set ttimeout set ttimeout
let &colorcolumn=join(range(81,999),",") let &colorcolumn=join(range(81,999),",")
" vimtex options " vimtex options
let g:vimtex_fold_enabled=1 let g:vimtex_fold_enabled=1
let g:vimtex_fold_manual=1 let g:vimtex_fold_manual=1
let g:vimtex_latexmk_enabled=0
" nice pluginless stuff " nice pluginless stuff
set path+=** set path+=**
set wildmenu set wildmenu
" Tag generation " Tag generation
command! MakeTags !ctags -R . command! MakeTags !ctags -R .
" Less noise in netrw " Less noise in netrw
let g:netrw_banner=0 let g:netrw_banner=0
let g:netrw_browse_split=4 let g:netrw_browse_split=4