perf: cut nixvim build time
plugins.treesitter.grammarPackages defaulted to every grammar nvim-treesitter ships (~350), forcing ~340 uncached nvim-treesitter-queries-* derivations to build locally on every run. Pin an explicit 23-language list instead. Also disable enableMan (renders the full nixvim option reference via options.json + nixos-render-docs on every build) and drop openscad, which pulled in openscad, zathura + plugins, mupdf and texlive-bin. Cold-store build plan: 370 -> ~54 derivations built, 1095 -> ~285 paths fetched (418 -> ~226 MiB). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
a11a254251
commit
f7a6fa7fcc
1 file changed
+38
-6
+38
-6
@@ -1,6 +1,11 @@
|
|||||||
|
|
||||||
{ pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
# Skip generating the nixvim options manpage. It renders the *entire* nixvim
|
||||||
|
# option reference on every build (options.json + nixos-render-docs + a Python
|
||||||
|
# env) and is pure build-time cost — `:help nixvim` is the only thing lost.
|
||||||
|
enableMan = false;
|
||||||
|
|
||||||
# Extra packages available in Neovim's PATH
|
# Extra packages available in Neovim's PATH
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
ripgrep # Required by Telescope and fzf-lua for fast file content searching (grep)
|
ripgrep # Required by Telescope and fzf-lua for fast file content searching (grep)
|
||||||
@@ -35,8 +40,38 @@
|
|||||||
# Sidebar file explorer for visual project navigation and file management
|
# Sidebar file explorer for visual project navigation and file management
|
||||||
nvim-tree.enable = true;
|
nvim-tree.enable = true;
|
||||||
|
|
||||||
# Syntax-aware highlighting, indentation, and code folding via incremental parsing
|
# Syntax-aware highlighting, indentation, and code folding via incremental parsing.
|
||||||
treesitter.enable = true;
|
# grammarPackages defaults to *every* grammar nvim-treesitter ships (~350),
|
||||||
|
# which forces ~340 query derivations to be built locally and pulls hundreds
|
||||||
|
# of MiB of parsers. Pin an explicit list instead — add languages as needed.
|
||||||
|
treesitter = {
|
||||||
|
enable = true;
|
||||||
|
grammarPackages = with config.plugins.treesitter.package.builtGrammars; [
|
||||||
|
bash
|
||||||
|
c
|
||||||
|
css
|
||||||
|
diff
|
||||||
|
dockerfile
|
||||||
|
git_rebase
|
||||||
|
gitcommit
|
||||||
|
html
|
||||||
|
javascript
|
||||||
|
json
|
||||||
|
lua
|
||||||
|
make
|
||||||
|
markdown
|
||||||
|
markdown_inline
|
||||||
|
nix
|
||||||
|
python
|
||||||
|
query
|
||||||
|
regex
|
||||||
|
toml
|
||||||
|
typescript
|
||||||
|
vim
|
||||||
|
vimdoc
|
||||||
|
yaml
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# Git integration directly in the command line (:Git blame, :Git diff, :Git log, etc.)
|
# Git integration directly in the command line (:Git blame, :Git diff, :Git log, etc.)
|
||||||
fugitive.enable = true;
|
fugitive.enable = true;
|
||||||
@@ -47,9 +82,6 @@
|
|||||||
# Popup that shows available keybindings as you type — great for discovering and remembering mappings
|
# Popup that shows available keybindings as you type — great for discovering and remembering mappings
|
||||||
which-key.enable = true;
|
which-key.enable = true;
|
||||||
|
|
||||||
# Syntax highlighting and preview support for OpenSCAD 3D modeling files
|
|
||||||
openscad.enable = true;
|
|
||||||
|
|
||||||
# Full-featured git UI inside a floating terminal — staging, committing, branching made visual
|
# Full-featured git UI inside a floating terminal — staging, committing, branching made visual
|
||||||
lazygit.enable = true;
|
lazygit.enable = true;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user