angular-ui / AngularJS-sublime-package

AngularJS code completion, snippets, go to definition, quick panel search, and more.
MIT License
1.42k stars 169 forks source link

plugins is not working on sublime text 2 #47

Closed rwinzhang closed 10 years ago

rwinzhang commented 10 years ago

I got this error when trying to enable/disable the plugin. It still doesn't work.

reloading /home/erwin/.config/sublime-text-2/Packages/AngularJS/AngularJS-completions.sublime-settings
Traceback (most recent call last):
  File "./AngularJS-sublime-package.py", line 362, in process_attributes
    add_data_prefix = ng.settings.get('enable_data_prefix')
AttributeError: 'NoneType' object has no attribute 'settings'

I am using sublime text 2.0.2 build 2221 on ubuntu 12.04

subhaze commented 10 years ago

I'll look into this later today, thanks for the report.

subhaze commented 10 years ago

Just cut a new release that should get picked up by Package Controller later on today. I wasn't able to duplicate your issue but I made some code adjustments that hopefully resolve this.

rwinzhang commented 10 years ago

@subhaze I have updated the plugin but it still not working. There is still have a problem when enabling the plugin (disable is okay now).

Traceback (most recent call last):
  File "./sublime_plugin.py", line 62, in reload_plugin
  File "./AngularJS-sublime-package.py", line 383, in <module>
    ng.init(isST2=True)
  File "./AngularJS-sublime-package.py", line 25, in init
    self.process_attributes()
  File "./AngularJS-sublime-package.py", line 359, in process_attributes
    for attr in self.settings_completions.get('core_attribute_list'):
TypeError: 'NoneType' object is not iterable
subhaze commented 10 years ago

OK, it looks like I need to add some default values to return. Have you been changing values in the settings file? If so can you paste the settings you have?

Thanks.

rwinzhang commented 10 years ago

@subhaze no, I haven't. I still use the default values.

subhaze commented 10 years ago

@rwinzcyruz

I've setup a VM with ubuntu 12.04 with sublime text 2.0.2 and cannot replicate this issue.

Can you elaborate on what you mean by "I got this error when trying to enable/disable the plugins."

rwinzhang commented 10 years ago

@subhaze when the first time I install this plugin, the auto-completion of core AngularJS directives is not working. That is why I try to disable and enable the plugin again to see if there has any error. I also have set the syntax to HTML (Angular.js) for HTML file that I am working on.

Note: javascript completion is working on my case.

subhaze commented 10 years ago

@rwinzcyruz I'm sorry but I am unable to replicate this behavior without tweaking the settings file, I've setup ubuntu 12.04, installed the latest Sublime Text 2 (2.0.2), install Package Control, installed the AngularJS plugin, and it worked fine out of the box. The only time I was able to replicate this issue

Traceback (most recent call last):
  File "./sublime_plugin.py", line 62, in reload_plugin
  File "./AngularJS-sublime-package.py", line 383, in <module>
    ng.init(isST2=True)
  File "./AngularJS-sublime-package.py", line 25, in init
    self.process_attributes()
  File "./AngularJS-sublime-package.py", line 359, in process_attributes
    for attr in self.settings_completions.get('core_attribute_list'):
TypeError: 'NoneType' object is not iterable

Was by editing the 'Completions - Default' settings file AngularJS-completions.sublime-settings and removing the core_attribute_list property from that file.