summaryrefslogtreecommitdiff
path: root/home-modules/apps/nvim/default.nix
blob: fc73d2d25cb97efb97247d0f3964023d563995fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
  pkgs,
  config,
  lib,
  ...
}:
let
  ts_ls = pkgs.typescript-language-server;
  vue_ls = pkgs.vue-language-server;
in
{
  options.homeapps.nvim = {
    enable = lib.mkEnableOption "Enables neovim configuration";
    lsp = lib.mkEnableOption "Enables LSP Support and the needed servers";
  };

  config = lib.mkIf config.homeapps.nvim.enable {
    programs.neovim = {
      enable = true;
      defaultEditor = true;
      viAlias = true;
      vimAlias = true;
      vimdiffAlias = true;
      withPython3 = true;
      withNodeJs = true;
      withRuby = true;

      coc.enable = false;
      plugins = [
      ];
    };

    home.file."./.config/nvim/lua/wilkuu/nix.lua".text = ''
      return { 
        vue_ts_plugin = "${lib.getBin vue_ls}/lib/node_modules/@vue/language-server/node_modules/@vue/typescript-plugin/"
      } 
    '';

    home.sessionPath = [
      "/home/wilkuu/.npm/bin/"
    ];

    home.packages = lib.mkIf config.homeapps.nvim.lsp (
      with pkgs;
      [
        lua
        lua-language-server
        gopls
        go
        typescript
        nodejs_22
        rustup
        nil
        statix
        nixfmt
        # phpactor
        pyright
        nodePackages.intelephense
        texlive.combined.scheme-medium
        texlab
        mermaid-cli
        ltex-ls
        deno
      ]
      ++ [
        ts_ls
        vue_ls
      ]
    );
  };
}