How do I make large, personal modifications to built-in packages?


#1

(I’m having this issue with basically all built in language packages, but I’m using Ruby as an example)

I think the folding in Ruby’s language package is way too aggressive. It folds basically everything, and I just want it to fold modules, classes and functions. Additionally, I really dislike having hundreds of snippets available, none of which I use. I would much rather define my own limited set of 10-20 snippets, personalised to my coding preferences.

So to solve this, I want to modify the folding rules as well as delete all the snippets in language-ruby and replace them with my own. What’s the cleanest way to do this?

For example, can I copy paste the language-ruby package into my own packages folder and make modifications? Would that stop the build in package from being loaded? Even if that were possible, it sounds like a bad idea to miss out on package updates.

Can I instead override the language-ruby package’s folding without touching the built in package? And can I delete all snippets created by a specific package, also without touching the package itself?

As an additional challenge, I would like to sync these changes to Dropbox so that all my Atom editors on my different computers behave identically.

What would be the cleanest way to accomplish what I’m trying to do?


#2

Yes, you can use the apm develop command to easily clone any Atom package (whether built-in, first- or third-party) for local development. Yes, this would override the built-in package. You could also use standard Git techniques to merge in future updates to your modified version … though I understand why that might seem tiresome over the long term.

Unfortunately, no. Atom’s code folding engine at this point is rather simplistic and based off of indentation.

No, there isn’t a method yet for disabling snippets built in to language packages. Though someone recently added the ability to disable keybindings from a package … so maybe someone will come along and do the same for snippets?

See this topic for lots of ideas on how to do this:

If you have more discussion around syncing and strategies thereof, please continue the conversation on that topic.