{"action":"created","issue":{"url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues/178","repository_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode","labels_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues/178/comments","events_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues/178/events","html_url":"https://github.com/editorconfig/editorconfig-vscode/issues/178","id":268738696,"number":178,"title":"Settings do not apply if .editorconfig file is not in curently opened folder / workspace","user":{"login":"gardient","id":6323263,"avatar_url":"https://avatars2.githubusercontent.com/u/6323263?v=4","gravatar_id":"","url":"https://api.github.com/users/gardient","html_url":"https://github.com/gardient","followers_url":"https://api.github.com/users/gardient/followers","following_url":"https://api.github.com/users/gardient/following{/other_user}","gists_url":"https://api.github.com/users/gardient/gists{/gist_id}","starred_url":"https://api.github.com/users/gardient/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gardient/subscriptions","organizations_url":"https://api.github.com/users/gardient/orgs","repos_url":"https://api.github.com/users/gardient/repos","events_url":"https://api.github.com/users/gardient/events{/privacy}","received_events_url":"https://api.github.com/users/gardient/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-10-26T12:22:03Z","updated_at":"2017-12-21T09:52:00Z","closed_at":null,"author_association":"NONE","body":"Please fill-in this template.\r\n\r\n- [x] I have a question that is specific to this extension; thus, inappropriate for the main [EditorConfig issue tracker](https://github.com/editorconfig/editorconfig/issues).\r\n- [ ] I tried running `code --disable-extensions` and the issue did **NOT** present itself. **(Does not apply as my problem is with the extensions functionality)**\r\n\r\nDelete the following condition if it doesn't apply to your case:\r\n\r\nIf the extension is not picking up the expected configuration for a file:\r\n- [x] I tried `npm install editorconfig -g` and ran `editorconfig [file-in-question]` and the configuration was what I expected. If not, please file on the [`editorconfig-core-js` issue tracker](https://github.com/editorconfig/editorconfig-core-js/issues).\r\n\r\n## Issue\r\n\r\n|             | Visual Studio Code | editorconfig-vscode |\r\n|-------------|--------------------|---------------------|\r\n| **Version** | `1.17.2`            | `0.11.1`             |\r\n\r\n### Root `.editorconfig` File\r\n\r\n```ini\r\nroot = true\r\n\r\n[*]\r\ninsert_final_newline = true\r\ntrim_trailing_whitespace = true\r\nindent_style = space\r\nindent_size = 4\r\nend_of_line = crlf\r\n```\r\n\r\nAre there any other relevant `.editorconfig` files in your project? **No**\r\n\r\n| Visual Studio Code Setting     | Default | User    | Workspace |\r\n|--------------------------------|---------|---------|-----------|\r\n| `editor.insertSpaces`          | `true`  | `true`  | `____`    |\r\n| `editor.tabSize`               | `4`     | `2`     | `_`       |\r\n| `editor.trimAutoWhitespace`    | `true`  | `true`  | `____`    |\r\n| `files.autoSave`               | `\"off\"` | `\"off\"` | `\"___\"`   |\r\n| `files.insertFinalNewline`     | `false` | `false` | `_____`   |\r\n| `files.trimTrailingWhitespace` | `false` | `false` | `_____`   |\r\n\r\n### File opened\r\n\r\nrelative to root .editorconfig: `./dir1/dir2/dir3/dir4/foo.sql`  \r\nrelative to folder opened in VS Code: `./dir4/foo.sql`\r\n\r\n### Expected behavior\r\n\r\n```ini\r\ninsert_final_newline = true\r\ntrim_trailing_whitespace = true\r\nindent_style = space\r\nindent_size = 4\r\nend_of_line = crlf\r\n```\r\n\r\n### Actual behavior\r\n\r\nVS Code settings\r\n\r\n### Additional comments or steps to reproduce\r\n\r\nThe .editorconfig file is 3 directories up from directory opened in VS Code\r\n"},"comment":{"url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues/comments/353307752","html_url":"https://github.com/editorconfig/editorconfig-vscode/issues/178#issuecomment-353307752","issue_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues/178","id":353307752,"user":{"login":"AKFourSeven","id":1001256,"avatar_url":"https://avatars3.githubusercontent.com/u/1001256?v=4","gravatar_id":"","url":"https://api.github.com/users/AKFourSeven","html_url":"https://github.com/AKFourSeven","followers_url":"https://api.github.com/users/AKFourSeven/followers","following_url":"https://api.github.com/users/AKFourSeven/following{/other_user}","gists_url":"https://api.github.com/users/AKFourSeven/gists{/gist_id}","starred_url":"https://api.github.com/users/AKFourSeven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AKFourSeven/subscriptions","organizations_url":"https://api.github.com/users/AKFourSeven/orgs","repos_url":"https://api.github.com/users/AKFourSeven/repos","events_url":"https://api.github.com/users/AKFourSeven/events{/privacy}","received_events_url":"https://api.github.com/users/AKFourSeven/received_events","type":"User","site_admin":false},"created_at":"2017-12-21T09:52:00Z","updated_at":"2017-12-21T09:52:00Z","author_association":"NONE","body":"My issue is similar to that of @gardient (I also try the same fixes he did), but the editorconfig settings are still not applied:\r\n\r\nExpected Settings: \r\n```\r\nroot = true\r\n\r\n[*]\r\nend_of_line = lf\r\ninsert_final_newline = true\r\ncharset = utf-8\r\nindent_size = 4\r\nindent_style = space\r\n\r\n[{*.json}]\r\nindent_size = 2\r\n```\r\n\r\nTried:\r\n`editorconfig ./src/components/StatelessRadio.js`\r\n\r\nGot the actual settings:\r\n\r\n```\r\nend_of_line=lf\r\ninsert_final_newline=true\r\ncharset=utf-8\r\nindent_size=4\r\nindent_style=space\r\ntab_width=4\r\n```\r\n\r\nI don't know where `tab_width=4`came from and my eslint is still shouting like crazy..."}}
{"actor":{"display_login":"AKFourSeven"}}