That’s great! Comment added.
Meanwhile, if someone could point me to some resources, like good existing packages with similar functionality in place, that would be even greater (at least in the short run )
What you’re asking is pretty simple. I added the following to my
atom.commands.add 'atom-workspace', 'custom:open-foo': -> atom.workspace.open().then (editor) -> grammar = atom.grammars.grammarForScopeName('source.gfm') editor.setGrammar(grammar) editor.setText('foo')
I now have an entry in the Command Palette “Custom: Open Foo” that:
- Opens a new editor tab
- Sets the grammar to Github-Flavored Markdown
- Sets the text of the editor tab to “foo”
I have written a helper lib atom-package-reloader, which reloads a package on file change.
(similar to the
Dev Live Reload package)
I think something similar should be included in core and/or documentation.
ctrl+alt+r to update the view should be last resort for developing instead of default.
I think it’s improving all the time (obviously) which is great. But the 2 issues that stick out for me at the moment are;
It’s too easy to lose authorisation (and consequently a
apm publishgoes wrong or the GitHub repo is deleted before
apm unpublish(see #221 for example) so we are left waiting for somebody to manually delete the package namespace from a database.
It would be nicer if we could use a
package.jsonthat also works with
That would be nice for me also. Does npm support it?
That would be nice for me also.
Maybe weigh in on this issue (#464) here… although it was closed already!
Does npm support it?
The npm guys are very stubborn about not supporting it at all, but since
apm is basically a wrapper around it (and clearly most of the Atom ecosystem already accesses the CSON parser) I don’t see why compiling it to
package.json as an intermediate step would be so bad?
It would be nice to have every feature documented in the API.
There are a lot of features of TextEditor that I find in other packages that are not documented anywhere.
I have jumped into Package Development for a week now and after the last update I don’t seem to be able to create a Pane, getting some error with Registering Views and stuff. Imagine me with empty hands after googling for the error (and even View Registering, which I merely know to exist). The First Package Guide is very incomplete and barely has the word View on it. I am still not able to create a pane right.
Am I missing something? Any directions?
Mind sharing your code so that we can see what you’re doing? The best case scenario would be for you to open a new thread on this forum and link to your GitHub repo, then anybody who wants to help can easily download your package and see precisely what you’re seeing.
I get it, but I was using a real example for this discussion. Tough I just realized I am a few months late and this is an “old” thread.
The thread is getting close to three years old and your comment does not appear to have been directed at any previous posts here except perhaps at the original post by an admin who hasn’t logged on in nearly two years.
If you’ve spotted an insufficiency in the guide, and you share what you’re trying to do and don’t understand, that would make it easier for people here to understand where the failure is in the documentation and fix it.
It is true that we don’t cover how to do everything someone might want to do when creating a package in the Atom Flight Manual. We do publish a large number of open source packages though, a few of which do things like open panes, such as the markdown-preview package. You can find the code for opening a new pane here:
And that technique is covered in the API documentation.
I’d be interested to hear ideas on how to properly balance giving people what they need to get started and also not overwhelming them with too much information all at once.
@leedohm, this is actually the package I was scanning for help. I just realized also (trough following your link) that Panes and Panels are not the same thing. And the reason behind the error I was having was because of particular a syntax misinterpretation (my bad).
About the docs, I think it would be a very desirable piece of knowledge to be kept: a dry and simple example of creating a package which uses panels to show their stuff, if you get me.
Hi, I am the author of CodeSideStory atom package. Here is my feedback.
What resources did you use learn how to create packages?
Flight Manual is great start. But most learning is from looking at other similar packages.
Was the documentation helpful? What was missing?
Documentation is good. But would like to see a section that explains “How to do X ?”. E.g I spend a lot of time trying to figure out how to reuse the text editor inside my UI. Have to search through threads to find out there is a mini editor already available. No documentation on it. Also if you want to add to auto complete there are so many versions and variations and even the fact that its another package. Have to go though the source to figure it out.
Was the API reference helpful? Was it helpful?
yes - API ref is to the point and most useful. The best feature is the link to the code. Don’t ever take that off.
Did you look at any code from the open source packages for help? If so, which were the most helpful.
Yes - Nuclide, atom-select-list are most useful. Also want to give a shout out to @mark_hahn and all his contribution to forum. Every time I had trouble he either asked that same question or answered himself.
What is the most important thing we could do to help you write packages?
I like to see articles targeting different UI framework developers. I did my part and created one for React-Redux. I also found the next step after you create the first package using the “Package Generator” is the hardest.
I am new to atom packages. I am building a package using ES6.
They only issue I had faced is there is no documentation for Active Text Editor View.
Most probably everything else was good enough to develop a package.
I had a problem which I’m not able to resolve, can you help me with that… I created a view in atom package. I want it to scroll it up and down with keyboard keys( without using any other package), I’m not able to figure out how to do that.
You have an open thread about that exact question. It’s important to keep each question to one specific thread so that it’s easier for readers to find the answers they need.
it would be very helpful to have an example of each file you can make
i’ve noticed that grammars don’t have an official documentation, i had to look other pre-made packages and tutorials made in another sites
this happens with several files, like snippets, and others,