{"action":"closed","number":10795,"pull_request":{"url":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/10795","id":192220585,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMjIwNTg1","html_url":"https://github.com/syl20bnr/spacemacs/pull/10795","diff_url":"https://github.com/syl20bnr/spacemacs/pull/10795.diff","patch_url":"https://github.com/syl20bnr/spacemacs/pull/10795.patch","issue_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/10795","number":10795,"state":"closed","locked":false,"title":"Only use lsp-javascript-typescript","user":{"login":"ztlevi","id":16655096,"node_id":"MDQ6VXNlcjE2NjU1MDk2","avatar_url":"https://avatars0.githubusercontent.com/u/16655096?v=4","gravatar_id":"","url":"https://api.github.com/users/ztlevi","html_url":"https://github.com/ztlevi","followers_url":"https://api.github.com/users/ztlevi/followers","following_url":"https://api.github.com/users/ztlevi/following{/other_user}","gists_url":"https://api.github.com/users/ztlevi/gists{/gist_id}","starred_url":"https://api.github.com/users/ztlevi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ztlevi/subscriptions","organizations_url":"https://api.github.com/users/ztlevi/orgs","repos_url":"https://api.github.com/users/ztlevi/repos","events_url":"https://api.github.com/users/ztlevi/events{/privacy}","received_events_url":"https://api.github.com/users/ztlevi/received_events","type":"User","site_admin":false},"body":"Mentioned [here](https://github.com/syl20bnr/spacemacs/issues/10670#issuecomment-388653121), the import completion is not properly enabled and it needs to enable lsp backend for `js-mode`. Not sure why is that but I tested and it should be enabled for that. You can take look at the following screenshot about the discussion. So as the `lsp-typescript`, we have to install the npm package and enable it for the related modes.\r\n\r\n![image](https://user-images.githubusercontent.com/16655096/40881311-fed96c02-6677-11e8-983e-76a6ac96f6da.png)\r\n\r\nAlso, I created a method called `spacemacs//lsp-js-setup-backend` and try to hook it with `js-mode`. \r\n```\r\n(defun spacemacs//lsp-js-setup-backend ()\r\n  \"Setup lsp backend for js-mode\"\r\n  (if (configuration-layer/layer-used-p 'lsp)\r\n      (progn\r\n        (lsp-javascript-typescript-enable)\r\n        (lsp-javascript-flow-enable)\r\n        (lsp-typescript-enable))\r\n    (message (concat \"`lsp' layer is not installed, \"\r\n                     \"please add `lsp' layer to your dotfile.\"))))\r\n```\r\nBut it doesn't have the proper completion if I did so. But it works if I hook the methods like this \r\n```\r\n(add-hook 'js-mode-hook #'lsp-javascript-typescript-enable)\r\n(add-hook 'js-mode-hook #'lsp-javascript-flow-enable)\r\n(add-hook 'js-mode-hook #'lsp-typescript-enable)\r\n```\r\nI am really confuesd with this behavior. Do you guys have any idea on this one? @fiveNinePlusR @sdwolfz\r\n","created_at":"2018-06-02T22:24:03Z","updated_at":"2018-07-18T01:59:28Z","closed_at":"2018-07-18T01:59:27Z","merged_at":null,"merge_commit_sha":"c81974b7689d4969c5e808eebb64947ba85495e7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/10795/commits","review_comments_url":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/10795/comments","review_comment_url":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/10795/comments","statuses_url":"https://api.github.com/repos/syl20bnr/spacemacs/statuses/6220ace290b247265de8fac66bd9e84bef388326","head":{"label":"ztlevi:lsp-javascript","ref":"lsp-javascript","sha":"6220ace290b247265de8fac66bd9e84bef388326","user":{"login":"ztlevi","id":16655096,"node_id":"MDQ6VXNlcjE2NjU1MDk2","avatar_url":"https://avatars0.githubusercontent.com/u/16655096?v=4","gravatar_id":"","url":"https://api.github.com/users/ztlevi","html_url":"https://github.com/ztlevi","followers_url":"https://api.github.com/users/ztlevi/followers","following_url":"https://api.github.com/users/ztlevi/following{/other_user}","gists_url":"https://api.github.com/users/ztlevi/gists{/gist_id}","starred_url":"https://api.github.com/users/ztlevi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ztlevi/subscriptions","organizations_url":"https://api.github.com/users/ztlevi/orgs","repos_url":"https://api.github.com/users/ztlevi/repos","events_url":"https://api.github.com/users/ztlevi/events{/privacy}","received_events_url":"https://api.github.com/users/ztlevi/received_events","type":"User","site_admin":false},"repo":{"id":91291163,"node_id":"MDEwOlJlcG9zaXRvcnk5MTI5MTE2Mw==","name":"spacemacs","full_name":"ztlevi/spacemacs","owner":{"login":"ztlevi","id":16655096,"node_id":"MDQ6VXNlcjE2NjU1MDk2","avatar_url":"https://avatars0.githubusercontent.com/u/16655096?v=4","gravatar_id":"","url":"https://api.github.com/users/ztlevi","html_url":"https://github.com/ztlevi","followers_url":"https://api.github.com/users/ztlevi/followers","following_url":"https://api.github.com/users/ztlevi/following{/other_user}","gists_url":"https://api.github.com/users/ztlevi/gists{/gist_id}","starred_url":"https://api.github.com/users/ztlevi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ztlevi/subscriptions","organizations_url":"https://api.github.com/users/ztlevi/orgs","repos_url":"https://api.github.com/users/ztlevi/repos","events_url":"https://api.github.com/users/ztlevi/events{/privacy}","received_events_url":"https://api.github.com/users/ztlevi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ztlevi/spacemacs","description":"A community-driven Emacs distribution - The best editor is neither Emacs nor Vim,  it's Emacs *and* Vim!","fork":true,"url":"https://api.github.com/repos/ztlevi/spacemacs","forks_url":"https://api.github.com/repos/ztlevi/spacemacs/forks","keys_url":"https://api.github.com/repos/ztlevi/spacemacs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ztlevi/spacemacs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ztlevi/spacemacs/teams","hooks_url":"https://api.github.com/repos/ztlevi/spacemacs/hooks","issue_events_url":"https://api.github.com/repos/ztlevi/spacemacs/issues/events{/number}","events_url":"https://api.github.com/repos/ztlevi/spacemacs/events","assignees_url":"https://api.github.com/repos/ztlevi/spacemacs/assignees{/user}","branches_url":"https://api.github.com/repos/ztlevi/spacemacs/branches{/branch}","tags_url":"https://api.github.com/repos/ztlevi/spacemacs/tags","blobs_url":"https://api.github.com/repos/ztlevi/spacemacs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ztlevi/spacemacs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ztlevi/spacemacs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ztlevi/spacemacs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ztlevi/spacemacs/statuses/{sha}","languages_url":"https://api.github.com/repos/ztlevi/spacemacs/languages","stargazers_url":"https://api.github.com/repos/ztlevi/spacemacs/stargazers","contributors_url":"https://api.github.com/repos/ztlevi/spacemacs/contributors","subscribers_url":"https://api.github.com/repos/ztlevi/spacemacs/subscribers","subscription_url":"https://api.github.com/repos/ztlevi/spacemacs/subscription","commits_url":"https://api.github.com/repos/ztlevi/spacemacs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ztlevi/spacemacs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ztlevi/spacemacs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ztlevi/spacemacs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ztlevi/spacemacs/contents/{+path}","compare_url":"https://api.github.com/repos/ztlevi/spacemacs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ztlevi/spacemacs/merges","archive_url":"https://api.github.com/repos/ztlevi/spacemacs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ztlevi/spacemacs/downloads","issues_url":"https://api.github.com/repos/ztlevi/spacemacs/issues{/number}","pulls_url":"https://api.github.com/repos/ztlevi/spacemacs/pulls{/number}","milestones_url":"https://api.github.com/repos/ztlevi/spacemacs/milestones{/number}","notifications_url":"https://api.github.com/repos/ztlevi/spacemacs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ztlevi/spacemacs/labels{/name}","releases_url":"https://api.github.com/repos/ztlevi/spacemacs/releases{/id}","deployments_url":"https://api.github.com/repos/ztlevi/spacemacs/deployments","created_at":"2017-05-15T03:23:54Z","updated_at":"2017-05-15T03:24:00Z","pushed_at":"2018-07-18T01:59:18Z","git_url":"git://github.com/ztlevi/spacemacs.git","ssh_url":"git@github.com:ztlevi/spacemacs.git","clone_url":"https://github.com/ztlevi/spacemacs.git","svn_url":"https://github.com/ztlevi/spacemacs","homepage":"http://spacemacs.org","size":39887,"stargazers_count":0,"watchers_count":0,"language":"Emacs Lisp","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"syl20bnr:develop","ref":"develop","sha":"2f50f28419440c192a4f5f82a35995c78894ecd8","user":{"login":"syl20bnr","id":1243537,"node_id":"MDQ6VXNlcjEyNDM1Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1243537?v=4","gravatar_id":"","url":"https://api.github.com/users/syl20bnr","html_url":"https://github.com/syl20bnr","followers_url":"https://api.github.com/users/syl20bnr/followers","following_url":"https://api.github.com/users/syl20bnr/following{/other_user}","gists_url":"https://api.github.com/users/syl20bnr/gists{/gist_id}","starred_url":"https://api.github.com/users/syl20bnr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syl20bnr/subscriptions","organizations_url":"https://api.github.com/users/syl20bnr/orgs","repos_url":"https://api.github.com/users/syl20bnr/repos","events_url":"https://api.github.com/users/syl20bnr/events{/privacy}","received_events_url":"https://api.github.com/users/syl20bnr/received_events","type":"User","site_admin":false},"repo":{"id":7212645,"node_id":"MDEwOlJlcG9zaXRvcnk3MjEyNjQ1","name":"spacemacs","full_name":"syl20bnr/spacemacs","owner":{"login":"syl20bnr","id":1243537,"node_id":"MDQ6VXNlcjEyNDM1Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1243537?v=4","gravatar_id":"","url":"https://api.github.com/users/syl20bnr","html_url":"https://github.com/syl20bnr","followers_url":"https://api.github.com/users/syl20bnr/followers","following_url":"https://api.github.com/users/syl20bnr/following{/other_user}","gists_url":"https://api.github.com/users/syl20bnr/gists{/gist_id}","starred_url":"https://api.github.com/users/syl20bnr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syl20bnr/subscriptions","organizations_url":"https://api.github.com/users/syl20bnr/orgs","repos_url":"https://api.github.com/users/syl20bnr/repos","events_url":"https://api.github.com/users/syl20bnr/events{/privacy}","received_events_url":"https://api.github.com/users/syl20bnr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/syl20bnr/spacemacs","description":"A community-driven Emacs distribution - The best editor is neither Emacs nor Vim,  it's Emacs *and* Vim!","fork":false,"url":"https://api.github.com/repos/syl20bnr/spacemacs","forks_url":"https://api.github.com/repos/syl20bnr/spacemacs/forks","keys_url":"https://api.github.com/repos/syl20bnr/spacemacs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/syl20bnr/spacemacs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/syl20bnr/spacemacs/teams","hooks_url":"https://api.github.com/repos/syl20bnr/spacemacs/hooks","issue_events_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/events{/number}","events_url":"https://api.github.com/repos/syl20bnr/spacemacs/events","assignees_url":"https://api.github.com/repos/syl20bnr/spacemacs/assignees{/user}","branches_url":"https://api.github.com/repos/syl20bnr/spacemacs/branches{/branch}","tags_url":"https://api.github.com/repos/syl20bnr/spacemacs/tags","blobs_url":"https://api.github.com/repos/syl20bnr/spacemacs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/syl20bnr/spacemacs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/syl20bnr/spacemacs/git/refs{/sha}","trees_url":"https://api.github.com/repos/syl20bnr/spacemacs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/syl20bnr/spacemacs/statuses/{sha}","languages_url":"https://api.github.com/repos/syl20bnr/spacemacs/languages","stargazers_url":"https://api.github.com/repos/syl20bnr/spacemacs/stargazers","contributors_url":"https://api.github.com/repos/syl20bnr/spacemacs/contributors","subscribers_url":"https://api.github.com/repos/syl20bnr/spacemacs/subscribers","subscription_url":"https://api.github.com/repos/syl20bnr/spacemacs/subscription","commits_url":"https://api.github.com/repos/syl20bnr/spacemacs/commits{/sha}","git_commits_url":"https://api.github.com/repos/syl20bnr/spacemacs/git/commits{/sha}","comments_url":"https://api.github.com/repos/syl20bnr/spacemacs/comments{/number}","issue_comment_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/comments{/number}","contents_url":"https://api.github.com/repos/syl20bnr/spacemacs/contents/{+path}","compare_url":"https://api.github.com/repos/syl20bnr/spacemacs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/syl20bnr/spacemacs/merges","archive_url":"https://api.github.com/repos/syl20bnr/spacemacs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/syl20bnr/spacemacs/downloads","issues_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues{/number}","pulls_url":"https://api.github.com/repos/syl20bnr/spacemacs/pulls{/number}","milestones_url":"https://api.github.com/repos/syl20bnr/spacemacs/milestones{/number}","notifications_url":"https://api.github.com/repos/syl20bnr/spacemacs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/syl20bnr/spacemacs/labels{/name}","releases_url":"https://api.github.com/repos/syl20bnr/spacemacs/releases{/id}","deployments_url":"https://api.github.com/repos/syl20bnr/spacemacs/deployments","created_at":"2012-12-17T21:34:03Z","updated_at":"2018-07-17T19:05:39Z","pushed_at":"2018-07-17T12:58:34Z","git_url":"git://github.com/syl20bnr/spacemacs.git","ssh_url":"git@github.com:syl20bnr/spacemacs.git","clone_url":"https://github.com/syl20bnr/spacemacs.git","svn_url":"https://github.com/syl20bnr/spacemacs","homepage":"http://spacemacs.org","size":40111,"stargazers_count":15407,"watchers_count":15407,"language":"Emacs Lisp","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3902,"mirror_url":null,"archived":false,"open_issues_count":2047,"license":null,"forks":3902,"open_issues":2047,"watchers":15407,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/10795"},"html":{"href":"https://github.com/syl20bnr/spacemacs/pull/10795"},"issue":{"href":"https://api.github.com/repos/syl20bnr/spacemacs/issues/10795"},"comments":{"href":"https://api.github.com/repos/syl20bnr/spacemacs/issues/10795/comments"},"review_comments":{"href":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/10795/comments"},"review_comment":{"href":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/10795/commits"},"statuses":{"href":"https://api.github.com/repos/syl20bnr/spacemacs/statuses/6220ace290b247265de8fac66bd9e84bef388326"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":26,"review_comments":0,"maintainer_can_modify":false,"commits":0,"additions":0,"deletions":0,"changed_files":0}}
{"actor":{"display_login":"ztlevi"}}