Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Add autoopen option #1346

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/tree-view-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ class TreeViewPackage {
}))

const treeView = this.getTreeViewInstance()
const showOnAttach = !atom.workspace.getActivePaneItem()
const showOnAttach = (
atom.config.get('tree-view.showOnAttach') &&
!atom.workspace.getActivePaneItem()
)
this.treeViewOpenPromise = atom.workspace.open(treeView, {
activatePane: showOnAttach,
activateItem: showOnAttach
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@
"type": "boolean",
"default": false,
"description": "When opening a file, always focus an already-existing view of the file even if it's in another pane."
},
"showOnAttach": {
"type": "boolean",
"default": true,
"description": "Show tree view when a new window is opened."
}
}
}