1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 19:46:06 +01:00

plugins: remove deprecations "after 24.11" or less

Signed-off-by: saygo-png <saygo.mail@proton.me>
This commit is contained in:
saygo-png 2025-10-18 03:34:02 +02:00 committed by Matt Sturgeon
parent be72c48997
commit 29ec33e1a8
86 changed files with 27 additions and 3578 deletions

View file

@ -72,14 +72,6 @@ in
- Dismiss this warning by explicitly setting `autoEnableSources` to `false`;
'';
}
# TODO: Added 2024-09-22; remove after 24.11
{
when = lib.elem "otter" enabledSources;
message = ''
"otter" is listed in `settings.sources`, however it is no longer a cmp source.
Instead, you should enable `plugins.otter` and use the "cmp-nvim-lsp" completion source.
'';
}
];
# If the user has enabled the `foo` and `bar` sources, then `plugins` will look like:

View file

@ -58,13 +58,9 @@ lib.nixvim.plugins.mkNeovimPlugin {
'';
imports = [
# Introduced on 2024 February 21
# TODO: remove ~June 2024
./deprecations.nix
./auto-enable.nix
./sources
];
deprecateExtraOptions = true;
inherit (cmpOptions) settingsOptions settingsExample;
extraOptions = {

View file

@ -1,217 +0,0 @@
{ lib, ... }:
let
inherit (lib) mkRenamedOptionModule mkRemovedOptionModule;
oldPluginBasePath = [
"plugins"
"nvim-cmp"
];
newPluginBasePath = [
"plugins"
"cmp"
];
settingsPath = newPluginBasePath ++ [ "settings" ];
renamedOptions = [
[
"performance"
"debounce"
]
[
"performance"
"throttle"
]
[
"performance"
"fetchingTimeout"
]
[
"performance"
"asyncBudget"
]
[
"performance"
"maxViewEntries"
]
"mapping"
[
"completion"
"keywordLength"
]
[
"completion"
"keywordPattern"
]
[
"completion"
"autocomplete"
]
[
"completion"
"completeopt"
]
[
"confirmation"
"getCommitCharacters"
]
[
"formatting"
"expandableIndicator"
]
[
"formatting"
"fields"
]
[
"formatting"
"format"
]
[
"matching"
"disallowFuzzyMatching"
]
[
"matching"
"disallowFullfuzzyMatching"
]
[
"matching"
"disallowPartialFuzzyMatching"
]
[
"matching"
"disallowPartialMatching"
]
[
"matching"
"disallowPrefixUnmatching"
]
[
"sorting"
"priorityWeight"
]
[
"view"
"entries"
]
[
"view"
"docs"
"autoOpen"
]
[
"window"
"completion"
"border"
]
[
"window"
"completion"
"winhighlight"
]
[
"window"
"completion"
"zindex"
]
[
"window"
"completion"
"scrolloff"
]
[
"window"
"completion"
"colOffset"
]
[
"window"
"completion"
"sidePadding"
]
[
"window"
"completion"
"scrollbar"
]
[
"window"
"documentation"
"border"
]
[
"window"
"documentation"
"winhighlight"
]
[
"window"
"documentation"
"zindex"
]
[
"window"
"documentation"
"maxWidth"
]
[
"window"
"documentation"
"maxHeight"
]
"experimental"
];
renameWarnings =
lib.nixvim.mkSettingsRenamedOptionModules oldPluginBasePath settingsPath
renamedOptions;
in
{
imports = renameWarnings ++ [
(mkRenamedOptionModule (oldPluginBasePath ++ [ "enable" ]) (newPluginBasePath ++ [ "enable" ]))
(mkRenamedOptionModule (oldPluginBasePath ++ [ "autoEnableSources" ]) (
newPluginBasePath ++ [ "autoEnableSources" ]
))
(mkRemovedOptionModule (oldPluginBasePath ++ [ "preselect" ]) ''
Use `plugins.cmp.settings.preselect` option. But watch out, you now have to explicitly write `cmp.PreselectMode.<mode>`.
See the option documentation for more details.
'')
(mkRemovedOptionModule (oldPluginBasePath ++ [ "mappingPresets" ])
"If you want to have a complex mapping logic, express it in raw lua within the `plugins.cmp.settings.mapping` option."
)
(mkRemovedOptionModule
(
oldPluginBasePath
++ [
"snippet"
"expand"
]
)
''
Use `plugins.cmp.settings.snippet.expand` option. But watch out, you can no longer put only the name of the snippet engine.
If you use `luasnip` for instance, set:
```
plugins.cmp.settings.snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
```
''
)
(mkRemovedOptionModule
(
oldPluginBasePath
++ [
"sorting"
"comparators"
]
)
''
Use `plugins.cmp.settings.sorting.comparators` option. But watch out, you can no longer put only the name of the comparators.
See the option documentation for more details.
''
)
(mkRemovedOptionModule (oldPluginBasePath ++ [ "sources" ]) ''
Use `plugins.cmp.settings.sources` option. But watch out, you can no longer provide a list of lists of sources.
For this type of use, directly write lua.
See the option documentation for more details.
'')
];
}