{"action":"created","issue":{"url":"https://api.github.com/repos/pangloss/vim-javascript/issues/427","repository_url":"https://api.github.com/repos/pangloss/vim-javascript","labels_url":"https://api.github.com/repos/pangloss/vim-javascript/issues/427/labels{/name}","comments_url":"https://api.github.com/repos/pangloss/vim-javascript/issues/427/comments","events_url":"https://api.github.com/repos/pangloss/vim-javascript/issues/427/events","html_url":"https://github.com/pangloss/vim-javascript/issues/427","id":153799363,"number":427,"title":"Comment indent wrong between braces with othree/yajs.vim installed","user":{"login":"tweekmonster","id":111942,"avatar_url":"https://avatars.githubusercontent.com/u/111942?v=3","gravatar_id":"","url":"https://api.github.com/users/tweekmonster","html_url":"https://github.com/tweekmonster","followers_url":"https://api.github.com/users/tweekmonster/followers","following_url":"https://api.github.com/users/tweekmonster/following{/other_user}","gists_url":"https://api.github.com/users/tweekmonster/gists{/gist_id}","starred_url":"https://api.github.com/users/tweekmonster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tweekmonster/subscriptions","organizations_url":"https://api.github.com/users/tweekmonster/orgs","repos_url":"https://api.github.com/users/tweekmonster/repos","events_url":"https://api.github.com/users/tweekmonster/events{/privacy}","received_events_url":"https://api.github.com/users/tweekmonster/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-09T15:10:55Z","updated_at":"2016-05-09T18:10:53Z","closed_at":"2016-05-09T15:54:30Z","body":"I'm not sure if this is an issue with [yajs](https://github.com/othree/yajs.vim) or not, but reporting here since this plugin provides the indentation.  I have `yajs` loaded before `vim-javascript` in my vimrc.\r\n\r\nWhen a comment is the first line between braces:\r\n\r\n```javascript\r\n{\r\n  // test\r\ntest1\r\ntest2\r\n}\r\n```\r\n\r\nWhen a comment is not the first line between braces:\r\n\r\n```javascript\r\n{\r\n  test1\r\n    // test\r\n  test2\r\n}\r\n```\r\n\r\nIn the second example, `test2` is at the correct indentation only because the preceding comment causes it to decrease.  If you decreased the indentation of the comment and reindented the `test2` line:\r\n\r\n```javascript\r\n{\r\n  test1\r\n  // test\r\ntest2\r\n}\r\n```\r\n\r\nWithout the braces, the comment will match the previous line's indent:\r\n\r\n```javascript\r\n  test\r\n  // test\r\n```\r\n\r\nBut, if you re-indent the comment line a second time, the indent will increase (the previous line must be indented):\r\n\r\n```javascript\r\n  test\r\n    // test\r\n```\r\n\r\nThe only difference I saw was that `yajs` changes the syntax name from `jsLineComment` to `javascriptLineComment`."},"comment":{"url":"https://api.github.com/repos/pangloss/vim-javascript/issues/comments/217943106","html_url":"https://github.com/pangloss/vim-javascript/issues/427#issuecomment-217943106","issue_url":"https://api.github.com/repos/pangloss/vim-javascript/issues/427","id":217943106,"user":{"login":"bounceme","id":9332107,"avatar_url":"https://avatars.githubusercontent.com/u/9332107?v=3","gravatar_id":"","url":"https://api.github.com/users/bounceme","html_url":"https://github.com/bounceme","followers_url":"https://api.github.com/users/bounceme/followers","following_url":"https://api.github.com/users/bounceme/following{/other_user}","gists_url":"https://api.github.com/users/bounceme/gists{/gist_id}","starred_url":"https://api.github.com/users/bounceme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bounceme/subscriptions","organizations_url":"https://api.github.com/users/bounceme/orgs","repos_url":"https://api.github.com/users/bounceme/repos","events_url":"https://api.github.com/users/bounceme/events{/privacy}","received_events_url":"https://api.github.com/users/bounceme/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T18:10:53Z","updated_at":"2016-05-09T18:10:53Z","body":"I have seen the repo before but a likely conflict occurs when you choose to use a different syntax file than the one which this indent file requires to work properly.Having more than one syntax file for the same language means things like loading order might come into play, maybe @amadeus knows more about this?"}}