blob: 81a6f2f50aa5c01abe87966234eac63625ba560e (
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
72
|
final: prev: {
vimPlugins = prev.vimPlugins // {
minitab-nvim = prev.vimUtils.buildVimPlugin rec {
pname = "minitab.nvim";
version = "2024-11-28";
rev = "f6183e8cb6f408e54dd5d1d13c0075376655a3ec";
src = prev.fetchzip {
url = "https://git.tjkeller.xyz/${pname}/snapshot/${pname}-${rev}.tar.xz";
sha256 = "sha256-INJC+6GNTF5MpvtOh6/eYD5CMiXxlP6aHT5TX2lJqiM=";
};
meta.homepage = "https://git.tjkeller.xyz/minitab.nvim";
};
tree-sitter-jinja2 = prev.vimUtils.buildVimPlugin rec {
pname = "tree-sitter-jinja2";
version = "2026-07-17";
src = prev.fetchFromGitHub {
owner = "geigerzaehler";
repo = "tree-sitter-jinja2";
rev = "7af726f7ac42db3fe798d45ee375078bbef28a41";
sha256 = "sha256-6lw38wvrQP/c3z7m40ygXNij60Gh2owx+Ibvfzwa47s=";
};
nativeBuildInputs = [ prev.tree-sitter ];
buildPhase = ''
# Provide tree-sitter with a place it can write to
mkdir -p $TMPDIR/.cache/tree-sitter
export XDG_CACHE_HOME=$TMPDIR/.cache
# Copy build instructions from repo
tree-sitter build --output parser/jinja2.so
'';
meta.homepage = "https://github.com/geigerzaehler/tree-sitter-jinja2";
};
rainbow-delimiters-nvim = prev.vimPlugins.rainbow-delimiters-nvim.overrideAttrs (finalAttrs: previousAttrs: {
patches = [
# Add support for htmljinja
(prev.fetchpatch {
url = "https://github.com/HiPhish/rainbow-delimiters.nvim/pull/194.diff";
sha256 = "sha256-ulJJnBUACs1evBbKoAg7LVJ4p2rdz+nhRKAP757Ysrc=";
})
];
});
# TODO replace plugin for simple grammar
#nvim-treesitter-parsers = prev.vimPlugins.nvim-treesitter-parsers // {
# jinja2 = prev.tree-sitter.buildGrammar rec {
# language = "jinja2";
# version = "2026-07-17";
# src = prev.fetchFromGitHub {
# owner = "geigerzaehler";
# repo = "tree-sitter-jinja2";
# rev = "7af726f7ac42db3fe798d45ee375078bbef28a41";
# sha256 = "sha256-6lw38wvrQP/c3z7m40ygXNij60Gh2owx+Ibvfzwa47s=";
# };
# nativeBuildInputs = [ prev.tree-sitter prev.jq ];
# buildPhase = ''
# mkdir -p $TMPDIR/.cache/tree-sitter
# export XDG_CACHE_HOME=$TMPDIR/.cache
# tree-sitter build --output parser/jinja2.so
# # FIXME the parser needs to be built with tree_sitter_htmljinja as the
# #grammar name instead of jinja2.
# # The plugin registers htmljinja to use the jinja2 parser within nvim.
# # But if you want this to be a "dumb" solution without any lua commands
# # to register the language then it needs to be built with the correct
# # symbol.
# #ln -s jinja2.so parsers/htmljinja.so
# '';
# meta.homepage = "https://github.com/geigerzaehler/tree-sitter-jinja2";
# };
#};
};
}
|