{"action":"closed","number":42,"pull_request":{"url":"https://api.github.com/repos/tomv564/LSP/pulls/42","id":137068367,"html_url":"https://github.com/tomv564/LSP/pull/42","diff_url":"https://github.com/tomv564/LSP/pull/42.diff","patch_url":"https://github.com/tomv564/LSP/pull/42.patch","issue_url":"https://api.github.com/repos/tomv564/LSP/issues/42","number":42,"state":"closed","locked":false,"title":"Create LspSettings class to manage cached settings","user":{"login":"deathaxe","id":16542113,"avatar_url":"https://avatars0.githubusercontent.com/u/16542113?v=4","gravatar_id":"","url":"https://api.github.com/users/deathaxe","html_url":"https://github.com/deathaxe","followers_url":"https://api.github.com/users/deathaxe/followers","following_url":"https://api.github.com/users/deathaxe/following{/other_user}","gists_url":"https://api.github.com/users/deathaxe/gists{/gist_id}","starred_url":"https://api.github.com/users/deathaxe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deathaxe/subscriptions","organizations_url":"https://api.github.com/users/deathaxe/orgs","repos_url":"https://api.github.com/users/deathaxe/repos","events_url":"https://api.github.com/users/deathaxe/events{/privacy}","received_events_url":"https://api.github.com/users/deathaxe/received_events","type":"User","site_admin":false},"body":"With respect to object oriented programming which is already used for most of the language-server-protocol based stuff, the configuration of the LSP package should follow this approach, if it is intended to cache the settings.\r\n\r\nTherefore a `class LspSettings` is created, which uses a template `LSP_SETTINGS` to initialize the object attributes at startup. In `plugin_loaded()` callback the real values from the _LSP.sublime-settings_ are loaded, mapped to the object attributes and kept up to date by the subscribed the `on_change()` event.\r\n\r\nThe one and only place to define settings to handle is the `LSP_SETTINGS` dictionary.\r\n\r\nAll managed settings can be accessed (read-only) as normal attribute by calling\r\n```\r\n   lsp_settings.my_setting_from_lsp_sublime_settings\r\n```\r\nThe only drawback is mypy which complains about class attributes not found. Therefore several `# type: ignore` statements need to be added.","created_at":"2017-08-22T20:09:37Z","updated_at":"2017-08-31T16:44:39Z","closed_at":"2017-08-31T16:44:39Z","merged_at":null,"merge_commit_sha":"debd1ff808ee83a91fdc2d3e5d7773637d7c2154","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/tomv564/LSP/pulls/42/commits","review_comments_url":"https://api.github.com/repos/tomv564/LSP/pulls/42/comments","review_comment_url":"https://api.github.com/repos/tomv564/LSP/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tomv564/LSP/issues/42/comments","statuses_url":"https://api.github.com/repos/tomv564/LSP/statuses/509486f8ed2b376da1be5e83cded7c9c88bce26b","head":{"label":"deathaxe:pr/settings","ref":"pr/settings","sha":"509486f8ed2b376da1be5e83cded7c9c88bce26b","user":{"login":"deathaxe","id":16542113,"avatar_url":"https://avatars0.githubusercontent.com/u/16542113?v=4","gravatar_id":"","url":"https://api.github.com/users/deathaxe","html_url":"https://github.com/deathaxe","followers_url":"https://api.github.com/users/deathaxe/followers","following_url":"https://api.github.com/users/deathaxe/following{/other_user}","gists_url":"https://api.github.com/users/deathaxe/gists{/gist_id}","starred_url":"https://api.github.com/users/deathaxe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deathaxe/subscriptions","organizations_url":"https://api.github.com/users/deathaxe/orgs","repos_url":"https://api.github.com/users/deathaxe/repos","events_url":"https://api.github.com/users/deathaxe/events{/privacy}","received_events_url":"https://api.github.com/users/deathaxe/received_events","type":"User","site_admin":false},"repo":{"id":100735871,"name":"LSP","full_name":"deathaxe/LSP","owner":{"login":"deathaxe","id":16542113,"avatar_url":"https://avatars0.githubusercontent.com/u/16542113?v=4","gravatar_id":"","url":"https://api.github.com/users/deathaxe","html_url":"https://github.com/deathaxe","followers_url":"https://api.github.com/users/deathaxe/followers","following_url":"https://api.github.com/users/deathaxe/following{/other_user}","gists_url":"https://api.github.com/users/deathaxe/gists{/gist_id}","starred_url":"https://api.github.com/users/deathaxe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deathaxe/subscriptions","organizations_url":"https://api.github.com/users/deathaxe/orgs","repos_url":"https://api.github.com/users/deathaxe/repos","events_url":"https://api.github.com/users/deathaxe/events{/privacy}","received_events_url":"https://api.github.com/users/deathaxe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/deathaxe/LSP","description":"Language Server Protocol support for Sublime Text 3","fork":true,"url":"https://api.github.com/repos/deathaxe/LSP","forks_url":"https://api.github.com/repos/deathaxe/LSP/forks","keys_url":"https://api.github.com/repos/deathaxe/LSP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deathaxe/LSP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deathaxe/LSP/teams","hooks_url":"https://api.github.com/repos/deathaxe/LSP/hooks","issue_events_url":"https://api.github.com/repos/deathaxe/LSP/issues/events{/number}","events_url":"https://api.github.com/repos/deathaxe/LSP/events","assignees_url":"https://api.github.com/repos/deathaxe/LSP/assignees{/user}","branches_url":"https://api.github.com/repos/deathaxe/LSP/branches{/branch}","tags_url":"https://api.github.com/repos/deathaxe/LSP/tags","blobs_url":"https://api.github.com/repos/deathaxe/LSP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deathaxe/LSP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deathaxe/LSP/git/refs{/sha}","trees_url":"https://api.github.com/repos/deathaxe/LSP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deathaxe/LSP/statuses/{sha}","languages_url":"https://api.github.com/repos/deathaxe/LSP/languages","stargazers_url":"https://api.github.com/repos/deathaxe/LSP/stargazers","contributors_url":"https://api.github.com/repos/deathaxe/LSP/contributors","subscribers_url":"https://api.github.com/repos/deathaxe/LSP/subscribers","subscription_url":"https://api.github.com/repos/deathaxe/LSP/subscription","commits_url":"https://api.github.com/repos/deathaxe/LSP/commits{/sha}","git_commits_url":"https://api.github.com/repos/deathaxe/LSP/git/commits{/sha}","comments_url":"https://api.github.com/repos/deathaxe/LSP/comments{/number}","issue_comment_url":"https://api.github.com/repos/deathaxe/LSP/issues/comments{/number}","contents_url":"https://api.github.com/repos/deathaxe/LSP/contents/{+path}","compare_url":"https://api.github.com/repos/deathaxe/LSP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deathaxe/LSP/merges","archive_url":"https://api.github.com/repos/deathaxe/LSP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deathaxe/LSP/downloads","issues_url":"https://api.github.com/repos/deathaxe/LSP/issues{/number}","pulls_url":"https://api.github.com/repos/deathaxe/LSP/pulls{/number}","milestones_url":"https://api.github.com/repos/deathaxe/LSP/milestones{/number}","notifications_url":"https://api.github.com/repos/deathaxe/LSP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deathaxe/LSP/labels{/name}","releases_url":"https://api.github.com/repos/deathaxe/LSP/releases{/id}","deployments_url":"https://api.github.com/repos/deathaxe/LSP/deployments","created_at":"2017-08-18T17:34:52Z","updated_at":"2017-08-18T17:34:53Z","pushed_at":"2017-08-31T16:44:39Z","git_url":"git://github.com/deathaxe/LSP.git","ssh_url":"git@github.com:deathaxe/LSP.git","clone_url":"https://github.com/deathaxe/LSP.git","svn_url":"https://github.com/deathaxe/LSP","homepage":"","size":428,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tomv564:master","ref":"master","sha":"cd07a02c2f1081fb3ce2432222cc9df7aa8cafbf","user":{"login":"tomv564","id":4395832,"avatar_url":"https://avatars0.githubusercontent.com/u/4395832?v=4","gravatar_id":"","url":"https://api.github.com/users/tomv564","html_url":"https://github.com/tomv564","followers_url":"https://api.github.com/users/tomv564/followers","following_url":"https://api.github.com/users/tomv564/following{/other_user}","gists_url":"https://api.github.com/users/tomv564/gists{/gist_id}","starred_url":"https://api.github.com/users/tomv564/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomv564/subscriptions","organizations_url":"https://api.github.com/users/tomv564/orgs","repos_url":"https://api.github.com/users/tomv564/repos","events_url":"https://api.github.com/users/tomv564/events{/privacy}","received_events_url":"https://api.github.com/users/tomv564/received_events","type":"User","site_admin":false},"repo":{"id":87645313,"name":"LSP","full_name":"tomv564/LSP","owner":{"login":"tomv564","id":4395832,"avatar_url":"https://avatars0.githubusercontent.com/u/4395832?v=4","gravatar_id":"","url":"https://api.github.com/users/tomv564","html_url":"https://github.com/tomv564","followers_url":"https://api.github.com/users/tomv564/followers","following_url":"https://api.github.com/users/tomv564/following{/other_user}","gists_url":"https://api.github.com/users/tomv564/gists{/gist_id}","starred_url":"https://api.github.com/users/tomv564/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomv564/subscriptions","organizations_url":"https://api.github.com/users/tomv564/orgs","repos_url":"https://api.github.com/users/tomv564/repos","events_url":"https://api.github.com/users/tomv564/events{/privacy}","received_events_url":"https://api.github.com/users/tomv564/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomv564/LSP","description":"Language Server Protocol support for Sublime Text 3","fork":false,"url":"https://api.github.com/repos/tomv564/LSP","forks_url":"https://api.github.com/repos/tomv564/LSP/forks","keys_url":"https://api.github.com/repos/tomv564/LSP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomv564/LSP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomv564/LSP/teams","hooks_url":"https://api.github.com/repos/tomv564/LSP/hooks","issue_events_url":"https://api.github.com/repos/tomv564/LSP/issues/events{/number}","events_url":"https://api.github.com/repos/tomv564/LSP/events","assignees_url":"https://api.github.com/repos/tomv564/LSP/assignees{/user}","branches_url":"https://api.github.com/repos/tomv564/LSP/branches{/branch}","tags_url":"https://api.github.com/repos/tomv564/LSP/tags","blobs_url":"https://api.github.com/repos/tomv564/LSP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomv564/LSP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomv564/LSP/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomv564/LSP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomv564/LSP/statuses/{sha}","languages_url":"https://api.github.com/repos/tomv564/LSP/languages","stargazers_url":"https://api.github.com/repos/tomv564/LSP/stargazers","contributors_url":"https://api.github.com/repos/tomv564/LSP/contributors","subscribers_url":"https://api.github.com/repos/tomv564/LSP/subscribers","subscription_url":"https://api.github.com/repos/tomv564/LSP/subscription","commits_url":"https://api.github.com/repos/tomv564/LSP/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomv564/LSP/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomv564/LSP/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomv564/LSP/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomv564/LSP/contents/{+path}","compare_url":"https://api.github.com/repos/tomv564/LSP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomv564/LSP/merges","archive_url":"https://api.github.com/repos/tomv564/LSP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomv564/LSP/downloads","issues_url":"https://api.github.com/repos/tomv564/LSP/issues{/number}","pulls_url":"https://api.github.com/repos/tomv564/LSP/pulls{/number}","milestones_url":"https://api.github.com/repos/tomv564/LSP/milestones{/number}","notifications_url":"https://api.github.com/repos/tomv564/LSP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomv564/LSP/labels{/name}","releases_url":"https://api.github.com/repos/tomv564/LSP/releases{/id}","deployments_url":"https://api.github.com/repos/tomv564/LSP/deployments","created_at":"2017-04-08T15:51:20Z","updated_at":"2017-08-29T07:22:14Z","pushed_at":"2017-08-31T06:38:26Z","git_url":"git://github.com/tomv564/LSP.git","ssh_url":"git@github.com:tomv564/LSP.git","clone_url":"https://github.com/tomv564/LSP.git","svn_url":"https://github.com/tomv564/LSP","homepage":"","size":525,"stargazers_count":22,"watchers_count":22,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":19,"forks":5,"open_issues":19,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tomv564/LSP/pulls/42"},"html":{"href":"https://github.com/tomv564/LSP/pull/42"},"issue":{"href":"https://api.github.com/repos/tomv564/LSP/issues/42"},"comments":{"href":"https://api.github.com/repos/tomv564/LSP/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/tomv564/LSP/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/tomv564/LSP/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tomv564/LSP/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/tomv564/LSP/statuses/509486f8ed2b376da1be5e83cded7c9c88bce26b"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":9,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":85,"deletions":83,"changed_files":3}}
{"actor":{"display_login":"deathaxe"}}