thatsIch / sublime-rainmeter

Rainmeter Package for Sublime Text 3
https://thatsich.github.io/sublime-rainmeter/
MIT License
51 stars 3 forks source link

Refresh open skins #3

Open thatsIch opened 7 years ago

thatsIch commented 7 years ago

Even when on other pages e.g. in Lua files, inc files, you want to refresh the main skins. It should be possible to detect all open files and check if they are in source.rainmeter scope.

So if a file contains the [Rainmeter] section, it is considered a main file and thus can be refreshed.

eclectic-tech commented 7 years ago

Just a thought... A valid skin may not contain a [Rainmeter] section (it is optional), but a valid skin MUST contain at least 1 meter, so testing for 'Meter=' may be a better way, if that is possible?

thatsIch commented 7 years ago

that would be a bummer, cause then I need to model the whole project to determine which is the current main file of the file you are currently editing. I wonder, are recursive imports possible?

I guess you are right though, the [Rainmeter] section contains already defaults for the required values thus it can be omitted