summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--configs/plugins.vimrc13
-rw-r--r--modules/common.nix1
-rw-r--r--modules/vim.nix9
3 files changed, 22 insertions, 1 deletions
diff --git a/configs/plugins.vimrc b/configs/plugins.vimrc
new file mode 100644
index 0000000..cdc2a88
--- /dev/null
+++ b/configs/plugins.vimrc
@@ -0,0 +1,13 @@
+" VIM PLUGIN SETTINGS
+
+" YOUCOMPLETEME:
+
+let g:ycm_language_server =
+  \ [
+  \   {
+  \     'name': 'nix',
+  \     'cmdline': [ '/run/current-system/sw/bin/nil', '--stdio' ],
+  \     'filetypes': [ 'nix' ]
+  \   }
+  \ ]
+
diff --git a/modules/common.nix b/modules/common.nix
index 3b3b6ec..209a385 100644
--- a/modules/common.nix
+++ b/modules/common.nix
@@ -76,6 +76,7 @@
     go gopls delve go-task
     meson cmake
     nil nixfmt-rfc-style direnv
+    ycmd
     helix
 
     wineWowPackages.stagingFull winetricks bottles
diff --git a/modules/vim.nix b/modules/vim.nix
index a511bc1..4fe62fe 100644
--- a/modules/vim.nix
+++ b/modules/vim.nix
@@ -1,13 +1,20 @@
 { pkgs, ... }:
 
 let
+  configs = [
+    ../configs/.vimrc
+    ../configs/plugins.vimrc
+  ];
+
+  customRC = with builtins; foldl' (r: f: r + (readFile f)) "" configs;
+
   vim-configured =
     with pkgs;
     vim-full.customize {
       name = "vim"; # explicitly replace vim
 
       vimrcConfig = {
-        customRC = builtins.readFile ../configs/.vimrc;
+        inherit customRC;
 
         packages.collection = with vimPlugins; {
           start = [