about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authordevhell <devhell@mailfresser.de>2020-11-05 12:22:50 +0000
committerdevhell <devhell@mailfresser.de>2020-11-05 12:22:50 +0000
commitec2ac40359cff351f92d81492f8dd3f6c51db8bc (patch)
treea5be3f503f2ff42846988f22361e8e0b9c3af578 /modules
parent398b64dd7dea2dd3ed9ae3b71010b5c34bf12f68 (diff)
modules/programs: Fix Vim
This config works now. Huge thanks to aszlig for helping! This is only a
bare-bones configurations. There are some parts of SpaceVim I really
enjoy, so over time I'll try to get my Vim configuration to emulate
those parts.
Diffstat (limited to 'modules')
-rw-r--r--modules/user/devhell/programs/vim/default.nix125
1 files changed, 70 insertions, 55 deletions
diff --git a/modules/user/devhell/programs/vim/default.nix b/modules/user/devhell/programs/vim/default.nix
index c21fed6a..7108ec70 100644
--- a/modules/user/devhell/programs/vim/default.nix
+++ b/modules/user/devhell/programs/vim/default.nix
@@ -1,57 +1,72 @@
-{ config, pkgs, lib, ... }:
+{ pkgs, lib, config, ... }:
 
 let
-	cfg = config.vuizvui.user.devhell.programs.vim;
-
-  environment.variables = { EDITOR = "vim"; };
-
-  environment.systemPackages = with pkgs; [
-    (vim_configurable.override.customize {
-      name = "vim";
-      vimrcConfig.packages.myplugins = with pkgs.vimPlugins; {
-        start = [
-					awesome-color-scheme
-          calendar
-          delimitMate
-          goyo
-          i3config-vim
-          latex-box
-          lightline
-          limelight
-          vim-addon-nix
-          vim-nix
-          vim-signify
-          vim-sensible
-        ];
-        opt = [];
-      };
-      vimrcConfig.customRC = ''
-        set nocompatible
-        set showcmd
-        set showmatch
-        set ignorecase
-        set smartcase
-        set incsearch
-        set smarttab
-        set expandtab
-        set smartindent
-        set ruler
-        set tabstop = 4
-        set softtabstop = 4
-        set textwidth = 79
-        set background = dark
-        set history = 500
-        set backspace = indent,eol,start
-      '';
-    }
-  )];
-
-in {
-	options.vuizvui.user.devhell.programs.vim = {
-		enable = lib.mkEnableOption "devhell's Vim";
-	};
-
-	config = lib.mkIf cfg.enable {
-		environment.systemPackages = [ pkgs.vim ];
-	};
-}
+  cfg = config.vuizvui.user.devhell.programs.vim;
+
+  customVim = pkgs.vim_configurable.customize {
+    name = "vim";
+    vimrcConfig.packages.myplugins = with pkgs.vimPlugins; {
+      start = [
+        awesome-vim-colorschemes
+        delimitMate
+        dracula-vim
+        goyo-vim
+        i3config-vim
+        indentLine
+        lightline-vim
+        limelight-vim
+        vim-nix
+        vim-sensible
+        vim-signify
+      ];
+      opt = [ ];
+    };
+    vimrcConfig.customRC = ''
+      "set nocompatible
+      "set showcmd
+      "set showmatch
+      "set ignorecase
+      "set smartcase
+      "set incsearch
+      "set smarttab
+      "set expandtab
+      "set smartindent
+      "set ruler
+      "set tabstop=4
+      "set softtabstop=4
+      "set textwidth=79
+      "set background=dark
+      "set history=500
+      "set backspace=indent,eol,start
+      set nu
+
+      " indentLine Settings
+      let g:indentLine_char_list = ['|', '¦', '┆', '┊']
+      let g:indentLine_setColors=1
+      let g:indentLine_fileTypeExclude=['help', 'main', 'vimfiler', 'json']
+      let g:better_whitespace_filetypes_blacklist = ['diff', 'gitcommit', 'unite',
+      \ 'qf', 'help', 'markdown', 'leaderGuide']
+
+      " goyo Settings
+      autocmd! User GoyoEnter Limelight
+      autocmd! User GoyoLeave Limelight!
+
+      " lightline Settings
+      let g:lightline = {'colorscheme': 'deus'}
+      set noshowmode
+
+      " Load a Colorscheme
+      colorscheme tender
+    '';
+  };
+
+      in {
+        options.vuizvui.user.devhell.programs.vim = {
+          enable = lib.mkEnableOption "devhell's Vim";
+        };
+
+        config = lib.mkIf cfg.enable {
+          environment.variables.EDITOR = "vim";
+          environment.systemPackages = [ customVim ];
+        };
+      }