about summary refs log tree commit diff
path: root/modules/common/vim
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-02-19 17:50:35 +0300
committerAzat Bahawi <azat@bahawi.net>2023-02-19 17:50:35 +0300
commit91fb4f28ef5d87e8bcf7749928d30ba4a9cbbd34 (patch)
treee07291fcb1cf62a561ffe58d1fd8e2968ff6fcb3 /modules/common/vim
parent2023-02-15 (diff)
2023-02-19
Diffstat (limited to '')
-rw-r--r--modules/common/vim/default.nix (renamed from modules/nixfiles/vim/default.nix)39
-rw-r--r--modules/common/vim/rc.vim (renamed from modules/nixfiles/vim/rc.vim)5
2 files changed, 17 insertions, 27 deletions
diff --git a/modules/nixfiles/vim/default.nix b/modules/common/vim/default.nix
index db46d34..0328e10 100644
--- a/modules/nixfiles/vim/default.nix
+++ b/modules/common/vim/default.nix
@@ -2,6 +2,7 @@
   config,
   lib,
   pkgs,
+  this,
   ...
 }:
 with lib; let
@@ -11,29 +12,21 @@ in {
 
   config = mkIf cfg.enable {
     programs.vim.package = with pkgs;
-      ((vim_configurable.override {features = "normal";}
-          // mapListToAttrs false [
-            "cscopeSupport"
-            "darwinSupport"
-            "guiSupport"
-            "luaSupport"
-            "multibyteSupport"
-            "netbeansSupport"
-            "nlsSupport"
-            "perlSupport"
-            "pythonSupport"
-            "rubySupport"
-            "tclSupport"
-            "ximSupport"
-          ])
-        .overrideAttrs (_: super: {
-          configureFlags =
-            super.configureFlags
-            ++ [
-              "--enable-gpm=no"
-              "--enable-gui=no"
-            ];
-        }))
+      (vim_configurable.override {
+        features = "normal";
+        cscopeSupport = false;
+        darwinSupport = pkgs.stdenv.isDarwin;
+        guiSupport = false;
+        luaSupport = false;
+        multibyteSupport = false;
+        netbeansSupport = false;
+        nlsSupport = false;
+        perlSupport = false;
+        pythonSupport = false;
+        rubySupport = false;
+        tclSupport = false;
+        ximSupport = false;
+      })
       .customize {
         name = "vim";
         vimrcConfig = {
diff --git a/modules/nixfiles/vim/rc.vim b/modules/common/vim/rc.vim
index 1657c6d..945643a 100644
--- a/modules/nixfiles/vim/rc.vim
+++ b/modules/common/vim/rc.vim
@@ -9,6 +9,7 @@ let g:netrw_dirhistmax = 0
 set autoread
 set backspace=indent,eol,start
 
+set clipboard=unnamedplus
 set diffopt+=iwhite
 set hidden
 set history=256
@@ -98,10 +99,6 @@ set tabstop=4
 
 autocmd BufEnter *.* :set colorcolumn=
 
-if has('unnamedplus')
-    set clipboard^=unnamedplus
-endif
-
 if &t_Co == 8 && $TERM !~# '^Eterm'
     set t_Co=16
 endif

Consider giving Nix/NixOS a try! <3