Skip to content

Commit

Permalink
plugins/markdown-preview: move deprecations to separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Jan 24, 2025
1 parent c269e1b commit ff7570d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 27 deletions.
29 changes: 2 additions & 27 deletions plugins/by-name/markdown-preview/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,6 @@ lib.nixvim.plugins.mkVimPlugin {

maintainers = [ lib.maintainers.GaetanLepage ];

# TODO introduced 2024-03-02: remove 2024-05-02
deprecateExtraConfig = true;
optionsRenamedToSettings = [
"autoStart"
"autoClose"
"refreshSlow"
"commandForGlobal"
"openToTheWorld"
"openIp"
"browser"
"echoPreviewUrl"
"previewOptions"
"markdownCss"
"highlightCss"
"port"
"pageTitle"
"theme"
{
old = "fileTypes";
new = "filetypes";
}
{
old = "browserFunc";
new = "browserfunc";
}
];

settingsOptions = {
auto_start = defaultNullOpts.mkFlagInt 0 ''
Open the preview window after entering the markdown buffer.
Expand Down Expand Up @@ -216,4 +189,6 @@ lib.nixvim.plugins.mkVimPlugin {
page_title = "「\$\{name}」";
theme = "dark";
};

inherit (import ./deprecations.nix) deprecateExtraConfig optionsRenamedToSettings;
}
29 changes: 29 additions & 0 deletions plugins/by-name/markdown-preview/deprecations.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
# TODO introduced 2024-03-02: remove 2024-05-02
deprecateExtraConfig = true;
optionsRenamedToSettings = [
"autoStart"
"autoClose"
"refreshSlow"
"commandForGlobal"
"openToTheWorld"
"openIp"
"browser"
"echoPreviewUrl"
"previewOptions"
"markdownCss"
"highlightCss"
"port"
"pageTitle"
"theme"
{
old = "fileTypes";
new = "filetypes";
}
{
old = "browserFunc";
new = "browserfunc";
}
];

}

0 comments on commit ff7570d

Please sign in to comment.