diff --git a/users/modules/neovim/default.nix b/users/modules/neovim/default.nix index 79775b6..3ac1c7d 100644 --- a/users/modules/neovim/default.nix +++ b/users/modules/neovim/default.nix @@ -5,6 +5,7 @@ let in { imports = [ + ./js.nix ./go.nix ./rust.nix ./web_dev.nix diff --git a/users/modules/neovim/js.nix b/users/modules/neovim/js.nix new file mode 100644 index 0000000..f210c4e --- /dev/null +++ b/users/modules/neovim/js.nix @@ -0,0 +1,26 @@ +{ 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 + ''; + } + ]; + }; + }; +} diff --git a/users/profiles/neovim/default.nix b/users/profiles/neovim/default.nix index ace38a0..438b923 100644 --- a/users/profiles/neovim/default.nix +++ b/users/profiles/neovim/default.nix @@ -2,7 +2,7 @@ { mae.nvim = { enable = true; - js.enable = true; + # js.tsserver.enable = true; nix.enable = true; rust.enable = true; clangd.enable = true;