dendronhq / dendron

The personal knowledge management (PKM) tool that grows as you do!
https://wiki.dendron.so
Apache License 2.0
6.76k stars 259 forks source link

Automatically reload index after running `Workspace Sync` #1451

Open aleksey-rowan opened 3 years ago

aleksey-rowan commented 3 years ago

Please Select if your Request is Either something new or an Enhancement

Please select the area your request applys to. (Multiple selections are Possible)

Is your feature request related to a problem? Please describe

After running the Workspace Sync command:

Describe the solution you'd like

Dendron automatically reloads its index after the sync is complete.

Describe alternatives you've considered

Use the ryuta46.multi-command extension to sequentially run dendron.sync and dendron.reloadIndex commands:

// settings
"multiCommand.commands": [
  {
      "command": "multiCommand.dendronSyncAndReload",
      "sequence": ["dendron.sync", "dendron.reloadIndex"]
  }
]

// keybindings.json
  {
      "key": "ctrl+k s",
      "command": "extension.multiCommand.execute",
      "args": { "command": "multiCommand.dendronSyncAndReload" }
  }
jonathanyeung commented 3 years ago

Thanks for the suggestion @aleksey-rowan. In the end state, ideally we can remove the reloadIndex command altogether and have the engine do what it needs to do to properly reflect the workspace state at the right times (but with a better implementation than us just running the reloadIndex command behind the scenes all the time, since this can be slow when the workspace is large :) .

This is particularly painful around workspace sync though, since it's a really common operation.

@Harshita-mindfire - can you take a look at this one later?