Split ts lsp into a separate file

This commit is contained in:
Bad 2022-08-17 01:26:57 +02:00
parent 2ff7968a8f
commit 7b37393bc5
3 changed files with 28 additions and 1 deletions

View file

@ -5,6 +5,7 @@ let
in
{
imports = [
./js.nix
./go.nix
./rust.nix
./web_dev.nix

View file

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

View file

@ -2,7 +2,7 @@
{
mae.nvim = {
enable = true;
js.enable = true;
# js.tsserver.enable = true;
nix.enable = true;
rust.enable = true;
clangd.enable = true;