-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactored packages #84
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduced new interface item so that every package should implement it.
first one was caused because of calling editor loadSettings more than once. second one was because passing pointer to view to log.Error
we were not unlocking the watcher before calling the callbacks so if one of the callbacks wanted to watch sth else we would stuck on a dead lock what we should do is unlock the lock before the callback and lock it again after the callback finished
changed item interface Load method the method doesn't return error exported watch function in items package each item will load in a separate go routine
unexporting watch function in packages package
removed Init() from packages we can use init for now on editor Init we create window/view closes limetext/lime#539 mentioned some todo's in code for reaching out later
some tweaks in sublime package open new window and file after calling init callbacks on editor.Init()
I tested the frontends against this pr they won't crash but they don't load any packages currently because I need to work a bit on lime-packages repo. |
closes #85 |
bug on loading sublime package settings and keybindings
Because we are initializing setting and keybinding hierarchy on GetEditor() we should remove the checking in loadSettings() and loadKeyBindings()
moved sublime_PackagesPath from generated format to manual because in sublime api packages_path works without passing any value now we don't produce *.pyc files we can get rid of __pycache__ folders
keyInput: make(chan keys.KeyPress, 32), | ||
keyInput: make(chan keys.KeyPress, 32), | ||
defaultSet: new(HasSettings), | ||
platformSet: new(HasSettings), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should probably still be defaultSettings
and platformSettings
for clarity.
All mentioned problems are resolved. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As a whole this pr is about #71 it doesn't resolve all of the issues but it gets us closer to modularity/optionality. Now the core backend doesn't know anything about sublime packages for using them in the frontend we just need to add
closes #64
As there are a lot of commits and changes I'll address the main changes: