|
16 | 16 | MANPAGER = "nvim +Man!"; |
17 | 17 | }; |
18 | 18 |
|
19 | | - xdg.configFile = let |
20 | | - treesitterParsers = pkgs.symlinkJoin { |
21 | | - name = "treesitter-parsers"; |
22 | | - paths = pkgs.vimPlugins.nvim-treesitter.withAllGrammars.dependencies; |
23 | | - # paths = builtins.filter |
24 | | - # (x: (builtins.parseDrvName x.name).name != "vimplugin-treesitter-grammar-javascript") |
25 | | - # pkgs.vimPlugins.nvim-treesitter.withAllGrammars.dependencies; |
26 | | - }; |
27 | | - in { |
| 19 | + xdg.configFile = { |
28 | 20 | # "nvim/init.lua".source = ./init.lua; |
29 | 21 | # "nvim/lua".source = ./lua; |
30 | 22 | # "nvim/ftplugin".source = ./ftplugin; |
|
34 | 26 | "nvim/lua".source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/modules/home/common/nvim/lua"; |
35 | 27 | "nvim/ftplugin".source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/modules/home/common/nvim/ftplugin"; |
36 | 28 | "nvim/after".source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/modules/home/common/nvim/after"; |
37 | | - |
38 | | - "nvim/parser".source = "${treesitterParsers}/parser"; # treesitter master only |
39 | 29 | }; |
40 | 30 |
|
41 | 31 | xdg.dataFile = let |
42 | 32 | vimPlugins = builtins.listToAttrs ( |
43 | 33 | lib.lists.forEach [ |
44 | 34 | "blink-cmp" |
45 | 35 | "conform-nvim" |
46 | | - "diffview-nvim" |
47 | 36 | "friendly-snippets" |
48 | 37 | "kanagawa-nvim" |
49 | 38 | "lazy-nvim" |
|
53 | 42 | "nvim-dap" |
54 | 43 | # "nvim-dap-view" # not in nixpkgs |
55 | 44 | "nvim-lint" |
56 | | - "nvim-treesitter" # uses master |
57 | | - "nvim-treesitter-context" |
58 | | - "nvim-treesitter-textobjects" # uses master |
59 | | - "quicker-nvim" |
60 | | - "snacks-nvim" |
61 | | - # "amp-nvim" |
62 | | - "copilot-lua" |
63 | | - "claudecode-nvim" |
64 | 45 | ] |
65 | 46 | ( |
66 | 47 | name: { |
|
104 | 85 | } |
105 | 86 | ) |
106 | 87 | ); |
| 88 | + treesitterParsers = pkgs.symlinkJoin { |
| 89 | + name = "treesitter-parsers"; |
| 90 | + paths = pkgs.vimPlugins.nvim-treesitter.withAllGrammars.dependencies; |
| 91 | + # paths = builtins.filter |
| 92 | + # (x: (builtins.parseDrvName x.name).name != "vimplugin-treesitter-grammar-javascript") |
| 93 | + # pkgs.vimPlugins.nvim-treesitter.withAllGrammars.dependencies; |
| 94 | + }; |
| 95 | + treesitter = pkgs.fetchFromGitHub { |
| 96 | + owner = "nvim-treesitter"; |
| 97 | + repo = "nvim-treesitter"; |
| 98 | + rev = "main"; |
| 99 | + sha256 = "sha256-kPB4KyhE0+mNfanTIzc4O+4wvw/u8lyHTHoQ368KWXI="; |
| 100 | + }; |
107 | 101 | in |
108 | 102 | { |
109 | | - "nvim/nixpkgs/fzf" = { |
110 | | - source = "${pkgs.fzf}/share/vim-plugins/fzf"; |
111 | | - }; |
112 | | - |
113 | 103 | # treesitter main parsers: |
114 | | - # "nvim/site/queries" = { |
115 | | - # source = "${pkgs.vimPlugins.nvim-treesitter.withAllGrammars}/queries"; |
116 | | - # }; |
117 | | - # "nvim/site/parser".source = "${treesitterParsers}/parser"; |
| 104 | + "nvim/site/queries" = { |
| 105 | + source = "${treesitter}/runtime/queries"; |
| 106 | + }; |
| 107 | + "nvim/site/parser".source = "${treesitterParsers}/parser"; |
118 | 108 |
|
119 | | - # for switching to treesitter main: |
120 | | - # "nvim/nixpkgs/nvim-treesitter-textobjects" = { |
121 | | - # source = pkgs.fetchFromGitHub { |
122 | | - # owner = "nvim-treesitter"; |
123 | | - # repo = "nvim-treesitter-textobjects"; |
124 | | - # rev = "main"; |
125 | | - # sha256 = "sha256-sJdKVaGNXW4HEi6NXEqUhelr8T7/M216m7bPKHAd1do="; |
126 | | - # }; |
127 | | - # }; |
128 | | - # "nvim/nixpkgs/nvim-treesitter" = { |
129 | | - # source = pkgs.fetchFromGitHub { |
130 | | - # owner = "nvim-treesitter"; |
131 | | - # repo = "nvim-treesitter"; |
132 | | - # rev = "main"; |
133 | | - # sha256 = "sha256-m3ShsTug4wSee89K+GaTKodC1cWsskR35y9SjDtVRgU="; |
134 | | - # }; |
135 | | - # }; |
| 109 | + "nvim/nixpkgs/nvim-treesitter-textobjects" = { |
| 110 | + source = pkgs.fetchFromGitHub { |
| 111 | + owner = "nvim-treesitter"; |
| 112 | + repo = "nvim-treesitter-textobjects"; |
| 113 | + rev = "main"; |
| 114 | + sha256 = "sha256-jjKT3bZHwZIVDsTw4m7cJm9G2JW8lUXasKTaiGzT0Ag="; |
| 115 | + }; |
| 116 | + }; |
| 117 | + "nvim/nixpkgs/nvim-treesitter" = { |
| 118 | + source = treesitter; |
| 119 | + }; |
136 | 120 | } |
137 | 121 | // vimPlugins // miniPlugins; |
138 | 122 | } |
0 commit comments