A collection of example NixOS files that be included into configuration.nix on NixOS.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

vim.nix 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # An example of a stub vim configuration for NixOS
  2. with import <nixpkgs> {};
  3. vim_configurable.customize {
  4. name = "vim"; # Specifies the vim binary name.
  5. # Below you can specify what usually goes into `~/.vimrc`
  6. vimrcConfig.customRC = ''
  7. " Preferred global default settings:
  8. set number " Enable line numbers by default
  9. set background=dark " Set the default background to dark or light
  10. set smartindent " Automatically insert extra level of indentation
  11. set tabstop=4 " Default tabstop
  12. set shiftwidth=4 " Default indent spacing
  13. set expandtab " Expand [TABS] to spaces
  14. syntax enable " Enable syntax highlighting
  15. colorscheme solarized " Set the default colour scheme
  16. set t_Co=256 " use 265 colors in vim
  17. set spell spelllang=en_au " Default spell checking language
  18. hi clear SpellBad " Clear any unwanted default settings
  19. hi SpellBad cterm=underline " Set the spell checking highlight style
  20. hi SpellBad ctermbg=NONE " Set the spell checking highlight background
  21. match ErrorMsg '\s\+$' "
  22. let g:airline_powerline_fonts = 1 " Use powerline fonts
  23. let g:airline_theme='solarized' " Set the airline theme
  24. set laststatus=2 " Set up the status line so it's coloured and always on
  25. " Add more settings below
  26. '';
  27. # store your plugins in Vim packages
  28. vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
  29. start = [ # Plugins loaded on launch
  30. airline # Lean & mean status/tabline for vim that's light as air
  31. solarized # Solarized colours for Vim
  32. vim-airline-themes # Collection of themes for airlin
  33. vim-nix # Support for writing Nix expressions in vim
  34. ];
  35. # manually loadable by calling `:packadd $plugin-name`
  36. # opt = [ phpCompletion elm-vim ];
  37. # To automatically load a plugin when opening a filetype, add vimrc lines like:
  38. # autocmd FileType php :packadd phpCompletion
  39. };
  40. }