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