ternjs / tern_for_sublime

Sublime Text package adding Tern support
MIT License
803 stars 54 forks source link

Refactored the configuration to use a separate settings file #80

Closed svenheden closed 8 years ago

svenheden commented 8 years ago

As discussed in #77 the common way to handle plugin configuration in Sublime is to have the plugin settings in an own file. I have fixed this in this PR and added a couple of menu entries to increase the UX a bit (see the attached screenshots).

In the context menu that appear when right clicking in the editor:

screenshot 2015-07-27 12 39 49

In the Tools main menu:

screenshot 2015-07-27 12 39 57

In the Preferences for managing the configuration settings:

screenshot 2015-07-27 12 40 09

The proposed solution is also backwards compatible so that it still picks up settings specified the old way.

marijnh commented 8 years ago

Is it intentional that when you right-click on something and do 'jump to definition', it'll look for the definition under the old cursor, rather than where you clicked? That seems odd, but maybe it's how ST does things.

svenheden commented 8 years ago

Hmm, good point, that's a bit odd. I'm not aware of a way to work around that though.

marijnh commented 8 years ago

Would you be okay with simply removing the Tern submenu from the context menu? It's already in the top menu (where using the cursor position is the expected behavior), anyway.

svenheden commented 8 years ago

Of course! Just removed it in af4367c.

marijnh commented 8 years ago

Looks great now. Merged as de490f1