I am trying to create some new functionally with Atom. Heres a short description of what I would like to make:
Since I am a neat freak, I like a clean project directory, and all unnecessary files/folders should be hidden from my sight. I think it would be really neat if I could create a file called .hide inside my project folder. In this file there would be paths to folders and files that I would like to hide. And a keyboard shortcut would toggle this feature.
In order to create this, I must have some way to locate these files somehow. Maybe using css selector and setting each element to display:hidden perhaps, but this has turned out to be difficult since the data-path attribute for the folders are placed on the ‘wrong’ element. (should be placed on ancestor+). I started thinking that maybe someone here could have a suggestion.
I have now tried using the tree view API, but the ‘entryForPath(entryPath)’ method just won’t return the correct dom element if the folder is closed in the tree view, ie. the element does not necessarily exist.
Can anyone here think of a smart way to get all dom elements (given the paths in the .hide file(s)) even if they don’t exist in the dom yet? Or maybe tell the tree view not to show certain files and folders(and their content) somehow?