mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
plugins/obsidian: move deprecations
This commit is contained in:
parent
e68b8e9c91
commit
86cc03863f
2 changed files with 176 additions and 166 deletions
|
@ -14,172 +14,11 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
|
||||
## DEPRECATIONS
|
||||
# Introduced 2024-03-12
|
||||
# TODO: remove 2024-05-12
|
||||
deprecateExtraOptions = true;
|
||||
optionsRenamedToSettings = [
|
||||
"dir"
|
||||
"logLevel"
|
||||
"notesSubdir"
|
||||
[
|
||||
"templates"
|
||||
"subdir"
|
||||
]
|
||||
[
|
||||
"templates"
|
||||
"dateFormat"
|
||||
]
|
||||
[
|
||||
"templates"
|
||||
"timeFormat"
|
||||
]
|
||||
[
|
||||
"templates"
|
||||
"substitutions"
|
||||
]
|
||||
"noteIdFunc"
|
||||
"followUrlFunc"
|
||||
"noteFrontmatterFunc"
|
||||
"disableFrontmatter"
|
||||
[
|
||||
"completion"
|
||||
"nvimCmp"
|
||||
]
|
||||
[
|
||||
"completion"
|
||||
"minChars"
|
||||
]
|
||||
"mappings"
|
||||
[
|
||||
"dailyNotes"
|
||||
"folder"
|
||||
]
|
||||
[
|
||||
"dailyNotes"
|
||||
"dateFormat"
|
||||
]
|
||||
[
|
||||
"dailyNotes"
|
||||
"aliasFormat"
|
||||
]
|
||||
[
|
||||
"dailyNotes"
|
||||
"template"
|
||||
]
|
||||
"useAdvancedUri"
|
||||
"openAppForeground"
|
||||
"sortBy"
|
||||
"sortReversed"
|
||||
"openNotesIn"
|
||||
[
|
||||
"ui"
|
||||
"enable"
|
||||
]
|
||||
[
|
||||
"ui"
|
||||
"updateDebounce"
|
||||
]
|
||||
[
|
||||
"ui"
|
||||
"externalLinkIcon"
|
||||
"char"
|
||||
]
|
||||
[
|
||||
"ui"
|
||||
"externalLinkIcon"
|
||||
"hlGroup"
|
||||
]
|
||||
[
|
||||
"ui"
|
||||
"referenceText"
|
||||
"hlGroup"
|
||||
]
|
||||
[
|
||||
"ui"
|
||||
"highlightText"
|
||||
"hlGroup"
|
||||
]
|
||||
[
|
||||
"ui"
|
||||
"tags"
|
||||
"hlGroup"
|
||||
]
|
||||
[
|
||||
"ui"
|
||||
"hlGroups"
|
||||
]
|
||||
[
|
||||
"attachments"
|
||||
"imgFolder"
|
||||
]
|
||||
[
|
||||
"attachments"
|
||||
"imgTextFunc"
|
||||
]
|
||||
"yamlParser"
|
||||
{
|
||||
old = "finder";
|
||||
new = [
|
||||
"settings"
|
||||
"picker"
|
||||
"name"
|
||||
];
|
||||
}
|
||||
# https://github.com/epwalsh/obsidian.nvim/blob/656d9c2c64528839db8b2d9a091843b3c90155a2/CHANGELOG.md?plain=1#L184
|
||||
{
|
||||
old = [
|
||||
"completion"
|
||||
"newNotesLocation"
|
||||
];
|
||||
new = "new_notes_location";
|
||||
}
|
||||
];
|
||||
imports =
|
||||
let
|
||||
basePluginPath = [
|
||||
"plugins"
|
||||
"obsidian"
|
||||
];
|
||||
in
|
||||
[
|
||||
(
|
||||
# We have to remove the option here because the user could set old-style camelCase options in each workspaces element.
|
||||
mkRemovedOptionModule (
|
||||
basePluginPath ++ [ "workspaces" ]
|
||||
) "Please use `plugins.obsidian.settings.workspaces` instead."
|
||||
)
|
||||
(
|
||||
# We have to remove the option here because the user could set old-style camelCase options in each checkbox element.
|
||||
mkRemovedOptionModule (
|
||||
basePluginPath
|
||||
++ [
|
||||
"ui"
|
||||
"checkboxes"
|
||||
]
|
||||
) "Please use `plugins.obsidian.settings.ui.checkboxes` instead."
|
||||
)
|
||||
]
|
||||
++ (map
|
||||
(
|
||||
optionPath:
|
||||
mkRemovedOptionModule (basePluginPath ++ optionPath) "This option was deprecated by upstream."
|
||||
)
|
||||
[
|
||||
[ "detectCwd" ]
|
||||
[ "backlinks" ]
|
||||
[
|
||||
"completion"
|
||||
"prependNoteId"
|
||||
]
|
||||
[
|
||||
"completion"
|
||||
"prependNotePath"
|
||||
]
|
||||
[
|
||||
"completion"
|
||||
"usePathOnly"
|
||||
]
|
||||
]
|
||||
);
|
||||
inherit (import ./deprecations.nix { inherit lib; })
|
||||
imports
|
||||
deprecateExtraOptions
|
||||
optionsRenamedToSettings
|
||||
;
|
||||
|
||||
settingsOptions =
|
||||
let
|
||||
|
|
171
plugins/by-name/obsidian/deprecations.nix
Normal file
171
plugins/by-name/obsidian/deprecations.nix
Normal file
|
@ -0,0 +1,171 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib) mkRemovedOptionModule;
|
||||
in
|
||||
{
|
||||
deprecateExtraOptions = true;
|
||||
optionsRenamedToSettings = [
|
||||
"dir"
|
||||
"logLevel"
|
||||
"notesSubdir"
|
||||
[
|
||||
"templates"
|
||||
"subdir"
|
||||
]
|
||||
[
|
||||
"templates"
|
||||
"dateFormat"
|
||||
]
|
||||
[
|
||||
"templates"
|
||||
"timeFormat"
|
||||
]
|
||||
[
|
||||
"templates"
|
||||
"substitutions"
|
||||
]
|
||||
"noteIdFunc"
|
||||
"followUrlFunc"
|
||||
"noteFrontmatterFunc"
|
||||
"disableFrontmatter"
|
||||
[
|
||||
"completion"
|
||||
"nvimCmp"
|
||||
]
|
||||
[
|
||||
"completion"
|
||||
"minChars"
|
||||
]
|
||||
"mappings"
|
||||
[
|
||||
"dailyNotes"
|
||||
"folder"
|
||||
]
|
||||
[
|
||||
"dailyNotes"
|
||||
"dateFormat"
|
||||
]
|
||||
[
|
||||
"dailyNotes"
|
||||
"aliasFormat"
|
||||
]
|
||||
[
|
||||
"dailyNotes"
|
||||
"template"
|
||||
]
|
||||
"useAdvancedUri"
|
||||
"openAppForeground"
|
||||
"sortBy"
|
||||
"sortReversed"
|
||||
"openNotesIn"
|
||||
[
|
||||
"ui"
|
||||
"enable"
|
||||
]
|
||||
[
|
||||
"ui"
|
||||
"updateDebounce"
|
||||
]
|
||||
[
|
||||
"ui"
|
||||
"externalLinkIcon"
|
||||
"char"
|
||||
]
|
||||
[
|
||||
"ui"
|
||||
"externalLinkIcon"
|
||||
"hlGroup"
|
||||
]
|
||||
[
|
||||
"ui"
|
||||
"referenceText"
|
||||
"hlGroup"
|
||||
]
|
||||
[
|
||||
"ui"
|
||||
"highlightText"
|
||||
"hlGroup"
|
||||
]
|
||||
[
|
||||
"ui"
|
||||
"tags"
|
||||
"hlGroup"
|
||||
]
|
||||
[
|
||||
"ui"
|
||||
"hlGroups"
|
||||
]
|
||||
[
|
||||
"attachments"
|
||||
"imgFolder"
|
||||
]
|
||||
[
|
||||
"attachments"
|
||||
"imgTextFunc"
|
||||
]
|
||||
"yamlParser"
|
||||
{
|
||||
old = "finder";
|
||||
new = [
|
||||
"settings"
|
||||
"picker"
|
||||
"name"
|
||||
];
|
||||
}
|
||||
# https://github.com/epwalsh/obsidian.nvim/blob/656d9c2c64528839db8b2d9a091843b3c90155a2/CHANGELOG.md?plain=1#L184
|
||||
{
|
||||
old = [
|
||||
"completion"
|
||||
"newNotesLocation"
|
||||
];
|
||||
new = "new_notes_location";
|
||||
}
|
||||
];
|
||||
imports =
|
||||
let
|
||||
basePluginPath = [
|
||||
"plugins"
|
||||
"obsidian"
|
||||
];
|
||||
in
|
||||
[
|
||||
(
|
||||
# We have to remove the option here because the user could set old-style camelCase options in each workspaces element.
|
||||
mkRemovedOptionModule (
|
||||
basePluginPath ++ [ "workspaces" ]
|
||||
) "Please use `plugins.obsidian.settings.workspaces` instead."
|
||||
)
|
||||
(
|
||||
# We have to remove the option here because the user could set old-style camelCase options in each checkbox element.
|
||||
mkRemovedOptionModule (
|
||||
basePluginPath
|
||||
++ [
|
||||
"ui"
|
||||
"checkboxes"
|
||||
]
|
||||
) "Please use `plugins.obsidian.settings.ui.checkboxes` instead."
|
||||
)
|
||||
]
|
||||
++ (map
|
||||
(
|
||||
optionPath:
|
||||
mkRemovedOptionModule (basePluginPath ++ optionPath) "This option was deprecated by upstream."
|
||||
)
|
||||
[
|
||||
[ "detectCwd" ]
|
||||
[ "backlinks" ]
|
||||
[
|
||||
"completion"
|
||||
"prependNoteId"
|
||||
]
|
||||
[
|
||||
"completion"
|
||||
"prependNotePath"
|
||||
]
|
||||
[
|
||||
"completion"
|
||||
"usePathOnly"
|
||||
]
|
||||
]
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue