···
1
+
{ config, lib, pkgs, ... }:
6
+
extraPackages = with pkgs; [
14
+
plugins = with pkgs.vimPlugins; [
18
+
defaultEditor = true;
24
+
plugins = with pkgs.vimPlugins; [
38
+
indent-blankline-nvim
51
+
nvim-treesitter-context
52
+
nvim-treesitter-textobjects
54
+
nvim-ts-context-commentstring
58
+
telescope-fzf-native-nvim
66
+
{ name = "LuaSnip"; path = luasnip; }
67
+
{ name = "catppuccin"; path = catppuccin-nvim; }
68
+
{ name = "mini.ai"; path = mini-nvim; }
69
+
{ name = "mini.bufremove"; path = mini-nvim; }
70
+
{ name = "mini.comment"; path = mini-nvim; }
71
+
{ name = "mini.indentscope"; path = mini-nvim; }
72
+
{ name = "mini.pairs"; path = mini-nvim; }
73
+
{ name = "mini.surround"; path = mini-nvim; }
75
+
mkEntryFromDrv = drv:
76
+
if lib.isDerivation drv then
77
+
{ name = "${lib.getName drv}"; path = drv; }
80
+
lazyPath = pkgs.linkFarm "lazy-plugins" (builtins.map mkEntryFromDrv plugins);
83
+
require("lazy").setup({
88
+
-- reuse files from pkgs.vimPlugins.*
89
+
path = "${lazyPath}",
91
+
-- fallback to download
95
+
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
96
+
-- The following configs are needed for fixing lazyvim on nix
97
+
-- force enable telescope-fzf-native.nvim
98
+
{ "nvim-telescope/telescope-fzf-native.nvim", enabled = true },
99
+
-- disable mason.nvim, use programs.neovim.extraPackages
100
+
{ "williamboman/mason-lspconfig.nvim", enabled = false },
101
+
{ "williamboman/mason.nvim", enabled = false },
102
+
-- import/override with your plugins
103
+
{ import = "plugins" },
104
+
-- treesitter handled by xdg.configFile."nvim/parser", put this line at the end of spec to clear ensure_installed
105
+
{ "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } },
111
+
# https://github.com/nvim-treesitter/nvim-treesitter#i-get-query-error-invalid-node-type-at-position
112
+
xdg.configFile."nvim/parser".source =
114
+
parsers = pkgs.symlinkJoin {
115
+
name = "treesitter-parsers";
116
+
paths = (pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: with plugins; [
122
+
"${parsers}/parser";
124
+
# Normal LazyVim config here, see https://github.com/LazyVim/starter/tree/main/lua