{ lib, pkgs, config, ... }: let cfg = config.mae.nvim; in with lib; { options.mae.nvim.js = { tsserver.enable = mkEnableOption "Enable js/ts support in nvim with tsserver"; }; config = mkIf cfg.js.tsserver.enable { programs.neovim = { coc.enable = true; plugins = with pkgs.vimPlugins; [ coc-tsserver { plugin = vim-jsdoc; config = '' let g:jsdoc_formatter = "tsdoc" let g:typescript_indent_disable = 1 ''; } ]; }; }; }