41 lines
869 B
Nix
41 lines
869 B
Nix
{ lib, pkgs, config, ... }:
|
|
let
|
|
cfg = config.mae.nvim;
|
|
in
|
|
with lib;
|
|
{
|
|
options.mae.nvim.web = {
|
|
enable = mkEnableOption "Enable webdev support in nvim";
|
|
};
|
|
options.mae.nvim.js = {
|
|
enable = mkEnableOption "Enable js/ts support in nvim";
|
|
};
|
|
|
|
config = mkMerge [
|
|
(mkIf cfg.js.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
|
|
'';
|
|
}
|
|
];
|
|
};
|
|
})
|
|
(mkIf cfg.web.enable {
|
|
mae.nvim.js.enable = true;
|
|
programs.neovim = {
|
|
coc.enable = true;
|
|
plugins = with pkgs.vimPlugins; [
|
|
coc-emmet
|
|
coc-html
|
|
];
|
|
};
|
|
})
|
|
];
|
|
}
|