robballou / drupal-sublimetext

A package for Drupal snippets, autocomplete support, and info file syntax highlighting for Sublime Text
Other
39 stars 14 forks source link

Is there a roadmap for Drupal 8 support? #10

Open dafeder opened 9 years ago

dafeder commented 9 years ago

I suppose there would need to be a way to identify which drupal version you're using. PHPStorm handles this pretty well.

robballou commented 9 years ago

I haven't looked into how to handle this, so it may be a good process to start. Some thoughts:

rodrigoaguilera commented 9 years ago

For identifying the core you can use https://api.drupal.org/api/drupal/core!modules!update!update.module/function/update_verify_update_archive/8

Checking if the files needed are present

robballou commented 9 years ago

Sweet, that could be helpful at least to poach into a script (it requires a few Drupal constants/functions but we could make a vanilla PHP version probably pretty easy).

I haven't spent much time with D8 in a while, so I am also looking for people to help here. I think the one thing that will be difficult is I don't know if there is a good way to get snippets for different framework versions in a single package. Some snippets may change, some snippets may not exist between versions, and some will likely not change. Thinking aloud, one solution would be to somehow scope the files with the Drupal version, but I haven't looked into doing that just yet.

rodrigoaguilera commented 9 years ago

I'm not a sublime user. I use vim https://www.drupal.org/project/vimrc This plugin checks for the version on drupal and loads the correspondent snippets with a folder for common snippets.

I'm interested in this project because of the snippets. The vim drupal project will be grateful if you provide some kind of license that allows this, right now there's only an empty file.

robballou commented 9 years ago

@rodrigoaguilera I'm definitely interested in helping out. Add an issue or pull request with an appropriate license and I'll take a look!

rodrigoaguilera commented 9 years ago

I'm not a lawyer but Is kind of messy to do a pull request for a license with your name and email in it since I'm not the copyright holder. I did a quick overview and most of the sublime plugins use the MIT license.

https://github.com/apiaryio/api-blueprint-sublime-plugin/blob/master/LICENSE

My plan is to convert the snippets to the vim format with a script. I wish there was an standard format for snippets :_(

robballou commented 9 years ago

I beginning to think a standard or somewhat standard format would be the way to go. Then contributors can help craft the snippet converters for specific editors. I haven't looked into it yet, but I know one of the issues will be editor specific things in snippets (Sublime and Textmate have placeholders that don't work in Atom, and I'm sure vim has similar things that don't work in both :)).

I contributed these snippets to atom-drupal and there's also an issue there for D8: https://github.com/FavishInc/atom-drupal/issues/5

rodrigoaguilera commented 9 years ago

Another snippet format :_( Just a list:

vim (ultisnips and snipmate) phpstorm sublime atom

I don't know much about the features of each one.

My ideal scenario will be to setup a repo with folders for each format and inside each one drupal6 drupal7 drupal8 shared (maybe only the ones shared between drupal 7 and 8)

and scripts to convert from one format to another and try to keep them in sync.

Having a standard will allow us to have a master reference to convert from.

Anyway this is not the issue to talk about this but since you mentioned it...

robballou commented 9 years ago

Created this: https://github.com/robballou/drupal-snippets/issues/1 :)