{"action":"created","comment":{"url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/pulls/comments/243729132","pull_request_review_id":187583680,"id":243729132,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzcyOTEzMg==","diff_hunk":"@@ -16,17 +16,24 @@ export function fromEditorConfig(\n ): TextEditorOptions {\n \tconst resolved: TextEditorOptions = {\n \t\ttabSize: (config.indent_style === 'tab'\n+\t\t\t|| config.indent_size === 'tab'\n \t\t\t? get(config, 'tab_width', config.indent_size)\n-\t\t\t: get(config, 'indent_size', config.tab_width)\n-\t\t)\n+\t\t\t: config.indent_style === 'space'\n+\t\t\t? get(config, 'indent_size', config.tab_width)\n+\t\t\t: get(config, 'indent_size', config.tab_width, defaults.tabSize)\n+\t\t),\n+\t\tinsertSpaces: config.indent_style\n+\t\t\t? config.indent_style === 'space'\n+\t\t\t: defaults.insertSpaces\n \t};\n-\tif (get(resolved, 'tabSize') === 'tab') {\n-\t\tresolved.tabSize = config.tab_width;\n+\tif ((!config.indent_style || config.indent_style === 'unset')\n+\t\t&& config.indent_size !== 'tab'\n+\t\t&& defaults && Object.keys(defaults).length === 0) {\n+\t\t\tresolved.tabSize = 'auto';","path":"src/Utils.ts","position":21,"original_position":21,"commit_id":"58cbde81cf65ca29d80eabce86e9d8ba2d15ccd4","original_commit_id":"58cbde81cf65ca29d80eabce86e9d8ba2d15ccd4","user":{"login":"jedmao","id":1058243,"node_id":"MDQ6VXNlcjEwNTgyNDM=","avatar_url":"https://avatars2.githubusercontent.com/u/1058243?v=4","gravatar_id":"","url":"https://api.github.com/users/jedmao","html_url":"https://github.com/jedmao","followers_url":"https://api.github.com/users/jedmao/followers","following_url":"https://api.github.com/users/jedmao/following{/other_user}","gists_url":"https://api.github.com/users/jedmao/gists{/gist_id}","starred_url":"https://api.github.com/users/jedmao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedmao/subscriptions","organizations_url":"https://api.github.com/users/jedmao/orgs","repos_url":"https://api.github.com/users/jedmao/repos","events_url":"https://api.github.com/users/jedmao/events{/privacy}","received_events_url":"https://api.github.com/users/jedmao/received_events","type":"User","site_admin":false},"body":"It looks like vscode's default `tabSize` is `4`, which is overridden by the `editor.detectIndentation` setting.\r\n```json\r\n// The number of spaces a tab is equal to.\r\n// This setting is overridden based on the file contents\r\n// when `editor.detectIndentation` is on.\r\n  \"editor.tabSize\": 4,\r\n```\r\nI think it's best that we don't set these values to `auto`, as that's not the default, built-in value. In fact, I'm not sure we have to set it to anything if we want to get the default, built-in value.","created_at":"2018-12-22T07:42:49Z","updated_at":"2018-12-22T07:51:44Z","html_url":"https://github.com/editorconfig/editorconfig-vscode/pull/201#discussion_r243729132","pull_request_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/pulls/201","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/editorconfig/editorconfig-vscode/pulls/comments/243729132"},"html":{"href":"https://github.com/editorconfig/editorconfig-vscode/pull/201#discussion_r243729132"},"pull_request":{"href":"https://api.github.com/repos/editorconfig/editorconfig-vscode/pulls/201"}}},"pull_request":{"url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/pulls/201","id":222424203,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNDI0MjAz","html_url":"https://github.com/editorconfig/editorconfig-vscode/pull/201","diff_url":"https://github.com/editorconfig/editorconfig-vscode/pull/201.diff","patch_url":"https://github.com/editorconfig/editorconfig-vscode/pull/201.patch","issue_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues/201","number":201,"state":"open","locked":false,"title":"allow detection when indent_style = unset","user":{"login":"slartibardfast","id":611170,"node_id":"MDQ6VXNlcjYxMTE3MA==","avatar_url":"https://avatars1.githubusercontent.com/u/611170?v=4","gravatar_id":"","url":"https://api.github.com/users/slartibardfast","html_url":"https://github.com/slartibardfast","followers_url":"https://api.github.com/users/slartibardfast/followers","following_url":"https://api.github.com/users/slartibardfast/following{/other_user}","gists_url":"https://api.github.com/users/slartibardfast/gists{/gist_id}","starred_url":"https://api.github.com/users/slartibardfast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slartibardfast/subscriptions","organizations_url":"https://api.github.com/users/slartibardfast/orgs","repos_url":"https://api.github.com/users/slartibardfast/repos","events_url":"https://api.github.com/users/slartibardfast/events{/privacy}","received_events_url":"https://api.github.com/users/slartibardfast/received_events","type":"User","site_admin":false},"body":"hi, \r\n\r\nI'd like to propose a feature request to allow the detect indent routine of VS Code to run when\r\n\r\nindent_style = unset\r\n\r\nthanks very much for your time.\r\n-dc","created_at":"2018-10-12T10:39:23Z","updated_at":"2018-12-22T07:51:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82ca9ae7d7616ffba8c7346d9d492e11cc6d341f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/pulls/201/commits","review_comments_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/pulls/201/comments","review_comment_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/pulls/comments{/number}","comments_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues/201/comments","statuses_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/statuses/58cbde81cf65ca29d80eabce86e9d8ba2d15ccd4","head":{"label":"slartibardfast:master","ref":"master","sha":"58cbde81cf65ca29d80eabce86e9d8ba2d15ccd4","user":{"login":"slartibardfast","id":611170,"node_id":"MDQ6VXNlcjYxMTE3MA==","avatar_url":"https://avatars1.githubusercontent.com/u/611170?v=4","gravatar_id":"","url":"https://api.github.com/users/slartibardfast","html_url":"https://github.com/slartibardfast","followers_url":"https://api.github.com/users/slartibardfast/followers","following_url":"https://api.github.com/users/slartibardfast/following{/other_user}","gists_url":"https://api.github.com/users/slartibardfast/gists{/gist_id}","starred_url":"https://api.github.com/users/slartibardfast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slartibardfast/subscriptions","organizations_url":"https://api.github.com/users/slartibardfast/orgs","repos_url":"https://api.github.com/users/slartibardfast/repos","events_url":"https://api.github.com/users/slartibardfast/events{/privacy}","received_events_url":"https://api.github.com/users/slartibardfast/received_events","type":"User","site_admin":false},"repo":{"id":152731110,"node_id":"MDEwOlJlcG9zaXRvcnkxNTI3MzExMTA=","name":"editorconfig-vscode","full_name":"slartibardfast/editorconfig-vscode","private":false,"owner":{"login":"slartibardfast","id":611170,"node_id":"MDQ6VXNlcjYxMTE3MA==","avatar_url":"https://avatars1.githubusercontent.com/u/611170?v=4","gravatar_id":"","url":"https://api.github.com/users/slartibardfast","html_url":"https://github.com/slartibardfast","followers_url":"https://api.github.com/users/slartibardfast/followers","following_url":"https://api.github.com/users/slartibardfast/following{/other_user}","gists_url":"https://api.github.com/users/slartibardfast/gists{/gist_id}","starred_url":"https://api.github.com/users/slartibardfast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slartibardfast/subscriptions","organizations_url":"https://api.github.com/users/slartibardfast/orgs","repos_url":"https://api.github.com/users/slartibardfast/repos","events_url":"https://api.github.com/users/slartibardfast/events{/privacy}","received_events_url":"https://api.github.com/users/slartibardfast/received_events","type":"User","site_admin":false},"html_url":"https://github.com/slartibardfast/editorconfig-vscode","description":"EditorConfig extension for Visual Studio Code","fork":true,"url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode","forks_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/forks","keys_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/teams","hooks_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/hooks","issue_events_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/issues/events{/number}","events_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/events","assignees_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/assignees{/user}","branches_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/branches{/branch}","tags_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/tags","blobs_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/git/refs{/sha}","trees_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/statuses/{sha}","languages_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/languages","stargazers_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/stargazers","contributors_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/contributors","subscribers_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/subscribers","subscription_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/subscription","commits_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/commits{/sha}","git_commits_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/git/commits{/sha}","comments_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/comments{/number}","issue_comment_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/issues/comments{/number}","contents_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/contents/{+path}","compare_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/merges","archive_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/downloads","issues_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/issues{/number}","pulls_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/pulls{/number}","milestones_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/milestones{/number}","notifications_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/labels{/name}","releases_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/releases{/id}","deployments_url":"https://api.github.com/repos/slartibardfast/editorconfig-vscode/deployments","created_at":"2018-10-12T09:59:48Z","updated_at":"2018-12-21T23:49:12Z","pushed_at":"2018-12-21T23:49:10Z","git_url":"git://github.com/slartibardfast/editorconfig-vscode.git","ssh_url":"git@github.com:slartibardfast/editorconfig-vscode.git","clone_url":"https://github.com/slartibardfast/editorconfig-vscode.git","svn_url":"https://github.com/slartibardfast/editorconfig-vscode","homepage":"http://editorconfig.org/","size":271,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"editorconfig:master","ref":"master","sha":"1e2e8373ee60ea57d27bf822aa6499e2b2e3ad0a","user":{"login":"editorconfig","id":1165674,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNjU2NzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1165674?v=4","gravatar_id":"","url":"https://api.github.com/users/editorconfig","html_url":"https://github.com/editorconfig","followers_url":"https://api.github.com/users/editorconfig/followers","following_url":"https://api.github.com/users/editorconfig/following{/other_user}","gists_url":"https://api.github.com/users/editorconfig/gists{/gist_id}","starred_url":"https://api.github.com/users/editorconfig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/editorconfig/subscriptions","organizations_url":"https://api.github.com/users/editorconfig/orgs","repos_url":"https://api.github.com/users/editorconfig/repos","events_url":"https://api.github.com/users/editorconfig/events{/privacy}","received_events_url":"https://api.github.com/users/editorconfig/received_events","type":"Organization","site_admin":false},"repo":{"id":51158113,"node_id":"MDEwOlJlcG9zaXRvcnk1MTE1ODExMw==","name":"editorconfig-vscode","full_name":"editorconfig/editorconfig-vscode","private":false,"owner":{"login":"editorconfig","id":1165674,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNjU2NzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1165674?v=4","gravatar_id":"","url":"https://api.github.com/users/editorconfig","html_url":"https://github.com/editorconfig","followers_url":"https://api.github.com/users/editorconfig/followers","following_url":"https://api.github.com/users/editorconfig/following{/other_user}","gists_url":"https://api.github.com/users/editorconfig/gists{/gist_id}","starred_url":"https://api.github.com/users/editorconfig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/editorconfig/subscriptions","organizations_url":"https://api.github.com/users/editorconfig/orgs","repos_url":"https://api.github.com/users/editorconfig/repos","events_url":"https://api.github.com/users/editorconfig/events{/privacy}","received_events_url":"https://api.github.com/users/editorconfig/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/editorconfig/editorconfig-vscode","description":"EditorConfig extension for Visual Studio Code","fork":true,"url":"https://api.github.com/repos/editorconfig/editorconfig-vscode","forks_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/forks","keys_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/teams","hooks_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/hooks","issue_events_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues/events{/number}","events_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/events","assignees_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/assignees{/user}","branches_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/branches{/branch}","tags_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/tags","blobs_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/git/refs{/sha}","trees_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/statuses/{sha}","languages_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/languages","stargazers_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/stargazers","contributors_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/contributors","subscribers_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/subscribers","subscription_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/subscription","commits_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/commits{/sha}","git_commits_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/git/commits{/sha}","comments_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/comments{/number}","issue_comment_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues/comments{/number}","contents_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/contents/{+path}","compare_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/merges","archive_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/downloads","issues_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues{/number}","pulls_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/pulls{/number}","milestones_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/milestones{/number}","notifications_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/labels{/name}","releases_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/releases{/id}","deployments_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/deployments","created_at":"2016-02-05T16:21:01Z","updated_at":"2018-12-18T09:02:38Z","pushed_at":"2018-12-21T23:49:12Z","git_url":"git://github.com/editorconfig/editorconfig-vscode.git","ssh_url":"git@github.com:editorconfig/editorconfig-vscode.git","clone_url":"https://github.com/editorconfig/editorconfig-vscode.git","svn_url":"https://github.com/editorconfig/editorconfig-vscode","homepage":"http://editorconfig.org/","size":262,"stargazers_count":499,"watchers_count":499,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":46,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":46,"open_issues":11,"watchers":499,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/editorconfig/editorconfig-vscode/pulls/201"},"html":{"href":"https://github.com/editorconfig/editorconfig-vscode/pull/201"},"issue":{"href":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues/201"},"comments":{"href":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues/201/comments"},"review_comments":{"href":"https://api.github.com/repos/editorconfig/editorconfig-vscode/pulls/201/comments"},"review_comment":{"href":"https://api.github.com/repos/editorconfig/editorconfig-vscode/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/editorconfig/editorconfig-vscode/pulls/201/commits"},"statuses":{"href":"https://api.github.com/repos/editorconfig/editorconfig-vscode/statuses/58cbde81cf65ca29d80eabce86e9d8ba2d15ccd4"}},"author_association":"NONE"}}
{"actor":{"display_login":"jedmao"}}