darlal/obsidian-switcher-plus

Downrank uncreated files?

szfkamil opened this issue · 1 comments

CleanShot 2023-06-16 at 20 38 50@2x

An ability to adjust the priority result of files that are uncreated.

darlal commented

Hey @szfkamil priority adjustment for unresolved files are not displayed in the settings initially, but it can be added in the plugin's data.json file. So by modifying the json file you could add adjustment for unresolved, after which it would show up in the settings panel. If you're comfortable editing a plain text json file, do the following:

  1. Close Obsidian
  2. Make a backup copy of the plugin's data.json file
  3. Open the data.json file in a text editor
  4. Search for the keyword matchPriorityAdjustments, there should only be one match
  5. You'll want to add to this key a value for unresolved

By default, it might look something like this:

  "matchPriorityAdjustments": {
    "isOpenInEditor": 0,
    "isBookmarked": 0,
    "isRecent": 0,
    "file": 0,
    "alias": 0,
    "h1": 0
  },

Add a new line after the matchPriorityAdjustments line so that when you're done, it to look like this:

  "matchPriorityAdjustments": {
    "unresolved": 0,
    "isOpenInEditor": 0,
    "isBookmarked": 0,
    "isRecent": 0,
    "file": 0,
    "alias": 0,
    "h1": 0
  },

Notice there's now a new line after matchPriorityAdjustments that says unresolved. Save the data.json file, restart Obsidian, and now you should see a slider for "Unresolved filenames" in the settings panel which should do what you want.