devos/users/modules/neovim/js.nix
2022-08-17 01:26:57 +02:00

26 lines
539 B
Nix

{ 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
'';
}
];
};
};
}