Chandra Sivaraman38 downloadsOpen local graph views at a configurable default depth.
Local graph views always open at depth 1, with the controls panel in the way. This plugin opens them at a depth you choose, with the controls collapsed.
Default depth — a slider from 1 to 5, the same range as the depth slider in the local graph controls. The default is 2. Set it to 1 to leave newly opened graphs alone.
Collapse the graph controls — hides the settings panel when a local graph opens. The gear icon brings it back. On by default.
Settings → Community plugins → Browse → search for "Local Graph Depth" → Install → Enable.
main.js and manifest.json from the latest release.<vault>/.obsidian/plugins/local-graph-depth/.A local graph view carries its settings in the options object of its view state: localJumps holds the depth, close collapses the controls panel. On each layout change the plugin looks for local graph panes it has not seen, and writes the keys it wants through view.setState(). The view hands those keys to its graph engine, which is the same route the depth slider and the close button take, so the controls, the options and the rendered graph all stay in step.
Only getState() and setState() are used, both public API. The options keys themselves are undocumented, but they are the format Obsidian persists in workspace.json. If a future release renames them the plugin stops applying its defaults, and fails quietly: the graph still opens, at depth 1.
Tested against Obsidian 1.8.4.
MIT