summary refs log tree commit diff stats
path: root/user/modules
diff options
context:
space:
mode:
authorAlan Pearce2020-12-12 21:46:43 +0100
committerAlan Pearce2020-12-12 21:46:43 +0100
commitade124a556ce83405cad824d2a571ffe776b0f30 (patch)
treea8e3917830bc670ad90c2522aa29e8d9b06f4f2c /user/modules
parent35c5fef705308b8278f9e3135fd5aa919d9e0497 (diff)
downloadnixfiles-ade124a556ce83405cad824d2a571ffe776b0f30.tar.lz
nixfiles-ade124a556ce83405cad824d2a571ffe776b0f30.tar.zst
nixfiles-ade124a556ce83405cad824d2a571ffe776b0f30.zip
neovim: configure coc.nvim via nix
Diffstat (limited to 'user/modules')
-rw-r--r--user/modules/nvim-coc.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/user/modules/nvim-coc.nix b/user/modules/nvim-coc.nix
new file mode 100644
index 00000000..5aa462f0
--- /dev/null
+++ b/user/modules/nvim-coc.nix
@@ -0,0 +1,25 @@
+{ config,  lib, pkgs, ... }:
+
+with lib;
+
+let
+  inherit (pkgs) stdenv;
+  cfg = config.programs.neovim.coc;
+in
+{
+  options.programs.neovim.coc = {
+    config = mkOption {
+      type = types.attrs;
+      default = {};
+      description = ''
+        Settings for coc.nvim
+      '';
+    };
+  };
+
+  config = {
+    xdg.configFile."nvim/coc-settings.json" = {
+      source = pkgs.writeText "coc-settings.json" (builtins.toJSON cfg.config);
+    };
+  };
+}