Split ts lsp into a separate file
This commit is contained in:
parent
2ff7968a8f
commit
7b37393bc5
3 changed files with 28 additions and 1 deletions
|
@ -5,6 +5,7 @@ let
|
|||
in
|
||||
{
|
||||
imports = [
|
||||
./js.nix
|
||||
./go.nix
|
||||
./rust.nix
|
||||
./web_dev.nix
|
||||
|
|
26
users/modules/neovim/js.nix
Normal file
26
users/modules/neovim/js.nix
Normal 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
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
mae.nvim = {
|
||||
enable = true;
|
||||
js.enable = true;
|
||||
# js.tsserver.enable = true;
|
||||
nix.enable = true;
|
||||
rust.enable = true;
|
||||
clangd.enable = true;
|
||||
|
|
Loading…
Reference in a new issue