SublimeText / CTags

CTags support for Sublime Text
MIT License
986 stars 167 forks source link

Refactor to optimize for ST3/4 (drops ST2) #344

Closed deathaxe closed 10 months ago

deathaxe commented 1 year ago

This PR proposes to refactor package architecture, which meets ST3 and ST4 better.

ST explicitly loads all modules, located in root of packages to look for EventHandler or Command classes. This may cause issues (duplicated globals, etc.) if those modules are also imported by others, especially when reloading a package after upgrade.

Loading unittests etc. is also not of much value, when starting ST.

This PR therefore proposes to move all modules to sub directories and only keep an initializer module in root directory. Various popular packages have moved to this structure.

This PR proposes a single sub directory plugins with an initializer plugin.py, so ST would display "reloading plugin CTags.plugin" in console.

Modules are updated to use relative imports, which breaks compatibility with ST2. It would still be possible, but I don't see much value in supporting ST2 anymore.

Another ST2 incompatible change is using edit_settings command to open plugin settings side-by-side.

Note To keep current release available for ST2 dedicated st2-0.4.x tags could be added with package_control_channel being updated.

Package Control 4 will however drop support for ST2 anyway.