aboutsummaryrefslogtreecommitdiff
path: root/gui/vim.nix
blob: 7c68e1eac1940cca5e8dc0b5f4405cb844a88cb0 (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
{ config, pkgs, ... }:

{
  home = {
    packages = let
      neovim-qt = pkgs.neovim-qt.override {
        neovim = config.custom.pkgs.custom-neovim;
      };
      gnvim = config.custom.nixpkgs-unstable.gnvim.override {
        neovim = config.custom.pkgs.custom-neovim;
      };
    in [
      neovim-qt
      gnvim
      pkgs.xclip # required to access clipboard in nvim-gui
      pkgs.fzf   # required for all kinds of narrow-down-completion
    ];

    file.".config/nvim/ginit.vim".text = ''
      set title
      Guifont! Iosevka:h10
      set guifont=Iosevka:h10
      autocmd FocusGained * :checktime
    '';

    file.".config/nvim/gnvim.vim".text = ''
      set title
      set guifont=Iosevka:h10
      autocmd FocusGained * :checktime
    '';
  };

  programs.fish = {
    enable = true;
    shellAliases = {
      nvim-qt = "nvim-qt --no-ext-tabline ^ /dev/null > /dev/null";
      gnvim = "bash -c \"gnvim --disable-ext-cmdline --disable-ext-tabline -- --cmd \\\"source ~/.config/nvim/gnvim.vim\\\" &> /dev/null & \"";
    };
  };
}