Showing posts with label atom. Show all posts
Showing posts with label atom. Show all posts

Wednesday, June 14, 2023

Disable the project pane in Pulsar

The project pane is nice, unless you're trying to edit a single file and it takes up too much space. Originally an Atom bug/feature, Pulsar's init is now in Javascript.

File > Init script

(function() {
  atom.workspace.onDidOpen(function(arg) {
    var dock, item, itemName;
    item = arg.item;
    itemName = item.constructor.name;
    if (itemName !== 'TreeView') {
      dock = atom.workspace.paneContainerForURI('atom://tree-view');
      if (dock && dock.isVisible()) {
        return dock.hide();
      }
    }
  });

}).call(this);