aboutsummaryrefslogtreecommitdiff
path: root/gui/vim.nix
blob: 46ab079fa6bd7ec0bf463da0342edb5d91c39441 (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
35
36
37
38
39
40
41
42
{ config, 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 { inherit pkgs config; };
    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 = {
    gtk3.extraCss = ''
      window#vim-main-window {
          background-color: #161616;
      }
    '';
  };

  programs.fish = {
    enable = true;
    shellAliases = {
      nvim-qt = "nvim-qt --no-ext-tabline ^ /dev/null > /dev/null";
    };
  };
}