summary refs log tree commit diff stats
path: root/user/modules/nvim-coc.nix
blob: bc8fbb195b849d1fc640ef379d5a6c5c9699fbb8 (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
{
  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);
    };
  };
}