-
-
Notifications
You must be signed in to change notification settings - Fork 275
/
deprecation.nix
102 lines (101 loc) · 2.77 KB
/
deprecation.nix
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{ lib, ... }:
let
deprecated = {
# TODO: added 10-23-2024, move to removed after 24.11
"rust-tools" = ''
The `rust-tools` project has been abandoned.
It is recommended to use `rustaceanvim` instead.
'';
};
removed = {
# Added 2023-08-29
treesitter-playground = ''
The `treesitter-playground` plugin has been deprecated since the functionality is included in Neovim.
Use:
- `:Inspect` to show the highlight groups under the cursor
- `:InspectTree` to show the parsed syntax tree ("TSPlayground")
- `:PreviewQuery` to open the Query Editor (Nvim 0.10+)
'';
};
renamed = {
# Added 2024-09-17
surround = "vim-surround";
};
# Added 2024-09-21; remove after 24.11
# `iconsPackage` options were briefly available in the following plugins for ~3 weeks
iconsPackagePlugins = [
"telescope"
"lspsaga"
"nvim-tree"
"neo-tree"
"trouble"
"alpha"
"diffview"
"fzf-lua"
"bufferline"
"barbar"
"chadtree"
];
in
{
imports =
(lib.mapAttrsToList (
name:
lib.mkRemovedOptionModule [
"plugins"
name
]
) removed)
++ (lib.mapAttrsToList (
old: new:
lib.mkRenamedOptionModule
[
"plugins"
old
]
[
"plugins"
new
]
) renamed)
++ builtins.map (
name:
lib.mkRemovedOptionModule
[
"plugins"
name
"iconsPackage"
]
''
Please use `plugins.web-devicons` or `plugins.mini.modules.icons` with `plugins.mini.mockDevIcons` instead.
''
) iconsPackagePlugins
++ [
(
{ config, options, ... }:
{
config = {
warnings =
lib.optionals (options.plugins.web-devicons.enable.highestPrio == 1490) [
''
Nixvim: `plugins.web-devicons` was enabled automatically because the following plugins are enabled.
This behaviour is deprecated. Please explicitly define `plugins.web-devicons.enable` or alternatively
enable `plugins.mini.enable` with `plugins.mini.modules.icons` and `plugins.mini.mockDevIcons`.
${lib.concatMapStringsSep "\n" (name: "plugins.${name}") (
builtins.filter (name: config.plugins.${name}.enable) iconsPackagePlugins
)}
''
]
++ lib.foldlAttrs (
warnings: plugin: msg:
warnings
++ lib.optional config.plugins.${plugin}.enable ''
Nixvim Warning: The `${plugin}` plugin has been deprecated.
${msg}
''
) [ ] deprecated;
};
}
)
];
}