aboutsummaryrefslogtreecommitdiff
path: root/gui/vim.nix
blob: 76912e64315b22dd8dad041c34efdbc1a4ab905a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ pkgs, ... }:

{
  home = {
    # vim is configured globally for all users but common is the only GUI user
    file.".gvimrc".text = ''
      set guifont=Iosevka\ 10
      set linespace=2
      set guioptions=agi
    '';

    # nvim-qt using vim configuration
    packages = let
      nvim-gui = import ./pkgs/nvim-gui.nix pkgs;
    in [
      nvim-gui
      pkgs.xclip # required to access clipboard in nvim-gui
    ];

    file.".config/nvim/ginit.vim".text = ''
      set title
      Guifont! Iosevka:h10

      autocmd FocusGained * :checktime
    '';
  };

  gtk = {
    gtk2.extraConfig = ''
      style "vimfix" { bg[NORMAL] = "#161616" }
      widget "vim-main-window.*GtkForm" style "vimfix"
    '';
  };
}